| Index: Source/core/loader/MixedContentChecker.h
|
| ===================================================================
|
| --- Source/core/loader/MixedContentChecker.h (revision 182628)
|
| +++ Source/core/loader/MixedContentChecker.h (working copy)
|
| @@ -36,6 +36,7 @@
|
|
|
| namespace blink {
|
|
|
| +class FrameLoaderClient;
|
| class LocalFrame;
|
| class KURL;
|
| class SecurityOrigin;
|
| @@ -43,14 +44,35 @@
|
| class MixedContentChecker {
|
| WTF_MAKE_NONCOPYABLE(MixedContentChecker);
|
| public:
|
| - static bool shouldBlockFetch(LocalFrame*, WebURLRequest::RequestContext, WebURLRequest::FrameType, const KURL&);
|
| - static bool shouldBlockWebSocket(LocalFrame*, const KURL&);
|
| - static bool checkFormAction(LocalFrame*, const KURL&);
|
| + explicit MixedContentChecker(LocalFrame*);
|
| +
|
| + static bool shouldBlockFetch(LocalFrame*, const ResourceRequest&, const KURL&);
|
| +
|
| + bool canDisplayInsecureContent(SecurityOrigin* securityOrigin, const KURL& url) const
|
| + {
|
| + return canDisplayInsecureContentInternal(securityOrigin, url, MixedContentChecker::Display);
|
| + }
|
| +
|
| + bool canRunInsecureContent(SecurityOrigin* securityOrigin, const KURL& url) const
|
| + {
|
| + return canRunInsecureContentInternal(securityOrigin, url, MixedContentChecker::Execution);
|
| + }
|
| +
|
| + bool canSubmitToInsecureForm(SecurityOrigin*, const KURL&) const;
|
| + bool canConnectInsecureWebSocket(SecurityOrigin*, const KURL&) const;
|
| + bool canFrameInsecureContent(SecurityOrigin*, const KURL&) const;
|
| static bool isMixedContent(SecurityOrigin*, const KURL&);
|
|
|
| static void checkMixedPrivatePublic(LocalFrame*, const AtomicString& resourceIPAddress);
|
|
|
| private:
|
| + enum MixedContentType {
|
| + Display,
|
| + Execution,
|
| + WebSocket,
|
| + Submission
|
| + };
|
| +
|
| enum ContextType {
|
| ContextTypeBlockable,
|
| ContextTypeOptionallyBlockable,
|
| @@ -58,10 +80,20 @@
|
| ContextTypeBlockableUnlessLax
|
| };
|
|
|
| - static LocalFrame* inWhichFrameIsThisContentMixed(LocalFrame*, WebURLRequest::RequestContext, WebURLRequest::FrameType, const KURL&);
|
| static ContextType contextTypeFromContext(WebURLRequest::RequestContext);
|
| static const char* typeNameFromContext(WebURLRequest::RequestContext);
|
| static void logToConsole(LocalFrame*, const KURL&, WebURLRequest::RequestContext, bool allowed);
|
| +
|
| + // FIXME: This should probably have a separate client from FrameLoader.
|
| + FrameLoaderClient* client() const;
|
| +
|
| + bool canDisplayInsecureContentInternal(SecurityOrigin*, const KURL&, const MixedContentType) const;
|
| +
|
| + bool canRunInsecureContentInternal(SecurityOrigin*, const KURL&, const MixedContentType) const;
|
| +
|
| + void logWarning(bool allowed, const KURL& i, const MixedContentType) const;
|
| +
|
| + LocalFrame* m_frame;
|
| };
|
|
|
| } // namespace blink
|
|
|