OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 15 matching lines...) Expand all Loading... |
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 #include "config.h" | 31 #include "config.h" |
32 #include "WebStorageEventDispatcher.h" | 32 #include "WebStorageEventDispatcher.h" |
33 | 33 |
34 #include "StorageAreaProxy.h" | 34 #include "StorageAreaProxy.h" |
35 #include "WebViewImpl.h" | 35 #include "WebViewImpl.h" |
| 36 #include "platform/weborigin/KURL.h" |
| 37 #include "platform/weborigin/SecurityOrigin.h" |
36 #include "public/platform/WebURL.h" | 38 #include "public/platform/WebURL.h" |
37 #include "weborigin/KURL.h" | |
38 #include "weborigin/SecurityOrigin.h" | |
39 #include "wtf/PassOwnPtr.h" | 39 #include "wtf/PassOwnPtr.h" |
40 | 40 |
41 namespace blink { | 41 namespace blink { |
42 | 42 |
43 void WebStorageEventDispatcher::dispatchLocalStorageEvent( | 43 void WebStorageEventDispatcher::dispatchLocalStorageEvent( |
44 const WebString& key, const WebString& oldValue, | 44 const WebString& key, const WebString& oldValue, |
45 const WebString& newValue, const WebURL& origin, | 45 const WebString& newValue, const WebURL& origin, |
46 const WebURL& pageURL, WebStorageArea* sourceAreaInstance, | 46 const WebURL& pageURL, WebStorageArea* sourceAreaInstance, |
47 bool originatedInProcess) | 47 bool originatedInProcess) |
48 { | 48 { |
49 RefPtr<WebCore::SecurityOrigin> securityOrigin = WebCore::SecurityOrigin::cr
eate(origin); | 49 RefPtr<WebCore::SecurityOrigin> securityOrigin = WebCore::SecurityOrigin::cr
eate(origin); |
50 WebCore::StorageAreaProxy::dispatchLocalStorageEvent( | 50 WebCore::StorageAreaProxy::dispatchLocalStorageEvent( |
51 key, oldValue, newValue, securityOrigin.get(), pageURL, | 51 key, oldValue, newValue, securityOrigin.get(), pageURL, |
52 sourceAreaInstance, originatedInProcess); | 52 sourceAreaInstance, originatedInProcess); |
53 } | 53 } |
54 | 54 |
55 void WebStorageEventDispatcher::dispatchSessionStorageEvent( | 55 void WebStorageEventDispatcher::dispatchSessionStorageEvent( |
56 const WebString& key, const WebString& oldValue, | 56 const WebString& key, const WebString& oldValue, |
57 const WebString& newValue, const WebURL& origin, | 57 const WebString& newValue, const WebURL& origin, |
58 const WebURL& pageURL, const WebStorageNamespace& sessionNamespace, | 58 const WebURL& pageURL, const WebStorageNamespace& sessionNamespace, |
59 WebStorageArea* sourceAreaInstance, bool originatedInProcess) | 59 WebStorageArea* sourceAreaInstance, bool originatedInProcess) |
60 { | 60 { |
61 RefPtr<WebCore::SecurityOrigin> securityOrigin = WebCore::SecurityOrigin::cr
eate(origin); | 61 RefPtr<WebCore::SecurityOrigin> securityOrigin = WebCore::SecurityOrigin::cr
eate(origin); |
62 WebCore::StorageAreaProxy::dispatchSessionStorageEvent( | 62 WebCore::StorageAreaProxy::dispatchSessionStorageEvent( |
63 key, oldValue, newValue, securityOrigin.get(), pageURL, | 63 key, oldValue, newValue, securityOrigin.get(), pageURL, |
64 sessionNamespace, sourceAreaInstance, originatedInProcess); | 64 sessionNamespace, sourceAreaInstance, originatedInProcess); |
65 } | 65 } |
66 | 66 |
67 } // namespace blink | 67 } // namespace blink |
OLD | NEW |