content/base/src/nsDataDocumentContentPolicy.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/content/base/src/nsDataDocumentContentPolicy.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,38 @@
     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 +/*
    1.10 + * Content policy implementation that prevents all loads of images,
    1.11 + * subframes, etc from documents loaded as data (eg documents loaded
    1.12 + * via XMLHttpRequest).
    1.13 + */
    1.14 +
    1.15 +#ifndef nsDataDocumentContentPolicy_h__
    1.16 +#define nsDataDocumentContentPolicy_h__
    1.17 +
    1.18 +/* 1147d32c-215b-4014-b180-07fe7aedf915 */
    1.19 +#define NS_DATADOCUMENTCONTENTPOLICY_CID \
    1.20 + {0x1147d32c, 0x215b, 0x4014, {0xb1, 0x80, 0x07, 0xfe, 0x7a, 0xed, 0xf9, 0x15}}
    1.21 +#define NS_DATADOCUMENTCONTENTPOLICY_CONTRACTID \
    1.22 + "@mozilla.org/data-document-content-policy;1"
    1.23 +
    1.24 +
    1.25 +#include "nsIContentPolicy.h"
    1.26 +#include "mozilla/Attributes.h"
    1.27 +
    1.28 +class nsDataDocumentContentPolicy MOZ_FINAL : public nsIContentPolicy
    1.29 +{
    1.30 +public:
    1.31 +  NS_DECL_ISUPPORTS
    1.32 +  NS_DECL_NSICONTENTPOLICY
    1.33 +
    1.34 +  nsDataDocumentContentPolicy()
    1.35 +  {}
    1.36 +  ~nsDataDocumentContentPolicy()
    1.37 +  {}
    1.38 +};
    1.39 +
    1.40 +
    1.41 +#endif /* nsDataDocumentContentPolicy_h__ */

mercurial