1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/content/base/src/nsMixedContentBlocker.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,39 @@ 1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 + 1.9 +#ifndef nsMixedContentBlocker_h___ 1.10 +#define nsMixedContentBlocker_h___ 1.11 + 1.12 +#define NS_MIXEDCONTENTBLOCKER_CONTRACTID "@mozilla.org/mixedcontentblocker;1" 1.13 +/* daf1461b-bf29-4f88-8d0e-4bcdf332c862 */ 1.14 +#define NS_MIXEDCONTENTBLOCKER_CID \ 1.15 +{ 0xdaf1461b, 0xbf29, 0x4f88, \ 1.16 + { 0x8d, 0x0e, 0x4b, 0xcd, 0xf3, 0x32, 0xc8, 0x62 } } 1.17 + 1.18 +// This enum defines type of content that is detected when an 1.19 +// nsMixedContentEvent fires 1.20 +enum MixedContentTypes { 1.21 + // "Active" content, such as fonts, plugin content, JavaScript, stylesheets, 1.22 + // iframes, WebSockets, and XHR 1.23 + eMixedScript, 1.24 + // "Display" content, such as images, audio, video, and <a ping> 1.25 + eMixedDisplay 1.26 +}; 1.27 + 1.28 +#include "nsIContentPolicy.h" 1.29 + 1.30 +class nsMixedContentBlocker : public nsIContentPolicy 1.31 +{ 1.32 +public: 1.33 + NS_DECL_ISUPPORTS 1.34 + NS_DECL_NSICONTENTPOLICY 1.35 + 1.36 + nsMixedContentBlocker(); 1.37 + virtual ~nsMixedContentBlocker(); 1.38 + static bool sBlockMixedScript; 1.39 + static bool sBlockMixedDisplay; 1.40 +}; 1.41 + 1.42 +#endif /* nsMixedContentBlocker_h___ */