diff options
author | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-21 01:19:46 +0000 |
---|---|---|
committer | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-21 01:19:46 +0000 |
commit | 9d72e8a3a4beb44db73b7bbe6b76e0eaef623fec (patch) | |
tree | bf0c34ace7cda675da622b7a1ebdb6bee1f7cf89 /webkit/api | |
parent | 9f20a6d0e6153489efe035c860f249c7cbc28890 (diff) | |
download | chromium_src-9d72e8a3a4beb44db73b7bbe6b76e0eaef623fec.zip chromium_src-9d72e8a3a4beb44db73b7bbe6b76e0eaef623fec.tar.gz chromium_src-9d72e8a3a4beb44db73b7bbe6b76e0eaef623fec.tar.bz2 |
Plumb whiteListAccessFromOrigin() through Chromium's WebKit API
and enable the related layout tests.
BUG=47548,12129
TEST=Covered by layout tests
Review URL: http://codereview.chromium.org/174175
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23931 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/api')
-rw-r--r-- | webkit/api/public/WebKit.h | 8 | ||||
-rw-r--r-- | webkit/api/src/WebKit.cpp | 15 |
2 files changed, 23 insertions, 0 deletions
diff --git a/webkit/api/public/WebKit.h b/webkit/api/public/WebKit.h index 4b5c1a6..e0fc2b7 100644 --- a/webkit/api/public/WebKit.h +++ b/webkit/api/public/WebKit.h @@ -32,6 +32,7 @@ #define WebKit_h #include "WebCommon.h" +#include "WebURL.h" namespace v8 { class Extension; @@ -100,6 +101,13 @@ namespace WebKit { // Enables HTML5 database support. WEBKIT_API void enableDatabases(); WEBKIT_API bool databasesEnabled(); + + // Support for whitelisting access to origins beyond the same-origin policy. + WEBKIT_API void whiteListAccessFromOrigin( + const WebURL& sourceOrigin, const WebString& destinationProtocol, + const WebString& destinationHost, bool allowDestinationSubdomains); + WEBKIT_API void resetOriginAccessWhiteLists(); + } // namespace WebKit #endif diff --git a/webkit/api/src/WebKit.cpp b/webkit/api/src/WebKit.cpp index 93ddc72..55b9088 100644 --- a/webkit/api/src/WebKit.cpp +++ b/webkit/api/src/WebKit.cpp @@ -157,4 +157,19 @@ void enableV8SingleThreadMode() WebCore::enableStringImplCache(); } +void whiteListAccessFromOrigin(const WebURL& sourceOrigin, + const WebString& destinationProtocol, + const WebString& destinationHost, + bool allowDestinationSubdomains) +{ + WebCore::SecurityOrigin::whiteListAccessFromOrigin( + *WebCore::SecurityOrigin::create(sourceOrigin), destinationProtocol, + destinationHost, allowDestinationSubdomains); +} + +void resetOriginAccessWhiteLists() +{ + WebCore::SecurityOrigin::resetOriginAccessWhiteLists(); +} + } // namespace WebKit |