2001-09-28 20:14:13 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 11:12:37 +00: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-16 20:00:20 +00:00
|
|
|
|
|
|
|
#ifndef nsViewSourceHandler_h___
|
|
|
|
#define nsViewSourceHandler_h___
|
|
|
|
|
|
|
|
#include "nsIProtocolHandler.h"
|
2012-06-06 03:18:25 +00:00
|
|
|
#include "mozilla/Attributes.h"
|
2001-04-16 20:00:20 +00:00
|
|
|
|
2012-06-06 03:18:25 +00:00
|
|
|
class nsViewSourceHandler MOZ_FINAL : public nsIProtocolHandler
|
2001-04-16 20:00:20 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_NSIPROTOCOLHANDLER
|
2013-06-29 03:04:42 +00:00
|
|
|
|
|
|
|
nsViewSourceHandler();
|
|
|
|
|
|
|
|
// Creates a new nsViewSourceChannel to view the source of an about:srcdoc
|
|
|
|
// URI with contents specified by srcdoc.
|
2014-02-06 14:46:29 +00:00
|
|
|
nsresult NewSrcdocChannel(nsIURI* uri, const nsAString &srcdoc,
|
2014-11-05 00:34:00 +00:00
|
|
|
nsIChannel** result);
|
2013-06-29 03:04:42 +00:00
|
|
|
|
|
|
|
static nsViewSourceHandler* GetInstance();
|
|
|
|
|
|
|
|
private:
|
2014-06-24 16:36:44 +00:00
|
|
|
~nsViewSourceHandler();
|
2013-06-29 03:04:42 +00:00
|
|
|
|
2014-06-24 16:36:44 +00:00
|
|
|
static nsViewSourceHandler* gInstance;
|
2001-04-16 20:00:20 +00:00
|
|
|
};
|
|
|
|
|
2004-07-01 23:45:34 +00:00
|
|
|
#endif /* !defined( nsViewSourceHandler_h___ ) */
|