| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 } | 51 } |
| 52 bool canSubmitToInsecureForm(SecurityOrigin* securityOrigin, const KURL& url
) const | 52 bool canSubmitToInsecureForm(SecurityOrigin* securityOrigin, const KURL& url
) const |
| 53 { | 53 { |
| 54 return canDisplayInsecureContentInternal(securityOrigin, url, MixedConte
ntChecker::Submission); | 54 return canDisplayInsecureContentInternal(securityOrigin, url, MixedConte
ntChecker::Submission); |
| 55 } | 55 } |
| 56 | 56 |
| 57 bool canRunInsecureContent(SecurityOrigin* securityOrigin, const KURL& url)
const | 57 bool canRunInsecureContent(SecurityOrigin* securityOrigin, const KURL& url)
const |
| 58 { | 58 { |
| 59 return canRunInsecureContentInternal(securityOrigin, url, MixedContentCh
ecker::Execution); | 59 return canRunInsecureContentInternal(securityOrigin, url, MixedContentCh
ecker::Execution); |
| 60 } | 60 } |
| 61 bool canConnectInsecureWebSocket(SecurityOrigin* securityOrigin, const KURL&
url) const | 61 |
| 62 { | 62 bool canConnectInsecureWebSocket(SecurityOrigin*, const KURL&) const; |
| 63 return canRunInsecureContentInternal(securityOrigin, url, MixedContentCh
ecker::WebSocket); | |
| 64 } | |
| 65 static bool isMixedContent(SecurityOrigin*, const KURL&); | 63 static bool isMixedContent(SecurityOrigin*, const KURL&); |
| 66 | 64 |
| 67 private: | 65 private: |
| 68 enum MixedContentType { | 66 enum MixedContentType { |
| 69 Display, | 67 Display, |
| 70 Execution, | 68 Execution, |
| 71 WebSocket, | 69 WebSocket, |
| 72 Submission | 70 Submission |
| 73 }; | 71 }; |
| 74 | 72 |
| 75 // FIXME: This should probably have a separate client from FrameLoader. | 73 // FIXME: This should probably have a separate client from FrameLoader. |
| 76 FrameLoaderClient* client() const; | 74 FrameLoaderClient* client() const; |
| 77 | 75 |
| 78 bool canDisplayInsecureContentInternal(SecurityOrigin*, const KURL&, const M
ixedContentType) const; | 76 bool canDisplayInsecureContentInternal(SecurityOrigin*, const KURL&, const M
ixedContentType) const; |
| 79 | 77 |
| 80 bool canRunInsecureContentInternal(SecurityOrigin*, const KURL&, const Mixed
ContentType) const; | 78 bool canRunInsecureContentInternal(SecurityOrigin*, const KURL&, const Mixed
ContentType) const; |
| 81 | 79 |
| 82 void logWarning(bool allowed, const KURL& i, const MixedContentType) const; | 80 void logWarning(bool allowed, const KURL& i, const MixedContentType) const; |
| 83 | 81 |
| 84 LocalFrame* m_frame; | 82 LocalFrame* m_frame; |
| 85 }; | 83 }; |
| 86 | 84 |
| 87 } // namespace WebCore | 85 } // namespace WebCore |
| 88 | 86 |
| 89 #endif // MixedContentChecker_h | 87 #endif // MixedContentChecker_h |
| OLD | NEW |