2001-09-29 00:14:13 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 15:12:37 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2001-04-17 00:00:20 +04:00
|
|
|
|
|
|
|
#ifndef nsViewSourceHandler_h___
|
|
|
|
#define nsViewSourceHandler_h___
|
|
|
|
|
|
|
|
#include "nsIProtocolHandler.h"
|
2012-06-06 07:18:25 +04:00
|
|
|
#include "mozilla/Attributes.h"
|
2001-04-17 00:00:20 +04:00
|
|
|
|
2012-06-06 07:18:25 +04:00
|
|
|
class nsViewSourceHandler MOZ_FINAL : public nsIProtocolHandler
|
2001-04-17 00:00:20 +04:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_NSIPROTOCOLHANDLER
|
2013-06-29 07:04:42 +04:00
|
|
|
|
|
|
|
nsViewSourceHandler();
|
|
|
|
|
|
|
|
// Creates a new nsViewSourceChannel to view the source of an about:srcdoc
|
|
|
|
// URI with contents specified by srcdoc.
|
2014-02-06 18:46:29 +04:00
|
|
|
nsresult NewSrcdocChannel(nsIURI* uri, const nsAString &srcdoc,
|
|
|
|
nsIURI* baseURI, nsIChannel** result);
|
2013-06-29 07:04:42 +04:00
|
|
|
|
|
|
|
static nsViewSourceHandler* GetInstance();
|
|
|
|
|
|
|
|
private:
|
2014-06-24 20:36:44 +04:00
|
|
|
~nsViewSourceHandler();
|
2013-06-29 07:04:42 +04:00
|
|
|
|
2014-06-24 20:36:44 +04:00
|
|
|
static nsViewSourceHandler* gInstance;
|
2001-04-17 00:00:20 +04:00
|
|
|
};
|
|
|
|
|
2004-07-02 03:45:34 +04:00
|
|
|
#endif /* !defined( nsViewSourceHandler_h___ ) */
|