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 17 matching lines...) Expand all Loading... |
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 "public/web/WebStorageEventDispatcher.h" | 31 #include "public/web/WebStorageEventDispatcher.h" |
32 | 32 |
33 #include "modules/storage/StorageArea.h" | 33 #include "modules/storage/StorageArea.h" |
34 #include "platform/weborigin/KURL.h" | 34 #include "platform/weborigin/KURL.h" |
35 #include "platform/weborigin/SecurityOrigin.h" | 35 #include "platform/weborigin/SecurityOrigin.h" |
36 #include "public/platform/WebURL.h" | 36 #include "public/platform/WebURL.h" |
37 #include "web/WebViewImpl.h" | 37 #include "web/WebViewImpl.h" |
38 #include "wtf/PassOwnPtr.h" | |
39 | 38 |
40 namespace blink { | 39 namespace blink { |
41 | 40 |
42 void WebStorageEventDispatcher::dispatchLocalStorageEvent( | 41 void WebStorageEventDispatcher::dispatchLocalStorageEvent( |
43 const WebString& key, const WebString& oldValue, | 42 const WebString& key, const WebString& oldValue, |
44 const WebString& newValue, const WebURL& origin, | 43 const WebString& newValue, const WebURL& origin, |
45 const WebURL& pageURL, WebStorageArea* sourceAreaInstance) | 44 const WebURL& pageURL, WebStorageArea* sourceAreaInstance) |
46 { | 45 { |
47 RefPtr<SecurityOrigin> securityOrigin = SecurityOrigin::create(origin); | 46 RefPtr<SecurityOrigin> securityOrigin = SecurityOrigin::create(origin); |
48 StorageArea::dispatchLocalStorageEvent( | 47 StorageArea::dispatchLocalStorageEvent( |
49 key, oldValue, newValue, securityOrigin.get(), pageURL, | 48 key, oldValue, newValue, securityOrigin.get(), pageURL, |
50 sourceAreaInstance); | 49 sourceAreaInstance); |
51 } | 50 } |
52 | 51 |
53 void WebStorageEventDispatcher::dispatchSessionStorageEvent( | 52 void WebStorageEventDispatcher::dispatchSessionStorageEvent( |
54 const WebString& key, const WebString& oldValue, | 53 const WebString& key, const WebString& oldValue, |
55 const WebString& newValue, const WebURL& origin, | 54 const WebString& newValue, const WebURL& origin, |
56 const WebURL& pageURL, const WebStorageNamespace& sessionNamespace, | 55 const WebURL& pageURL, const WebStorageNamespace& sessionNamespace, |
57 WebStorageArea* sourceAreaInstance) | 56 WebStorageArea* sourceAreaInstance) |
58 { | 57 { |
59 RefPtr<SecurityOrigin> securityOrigin = SecurityOrigin::create(origin); | 58 RefPtr<SecurityOrigin> securityOrigin = SecurityOrigin::create(origin); |
60 StorageArea::dispatchSessionStorageEvent( | 59 StorageArea::dispatchSessionStorageEvent( |
61 key, oldValue, newValue, securityOrigin.get(), pageURL, | 60 key, oldValue, newValue, securityOrigin.get(), pageURL, |
62 sessionNamespace, sourceAreaInstance); | 61 sessionNamespace, sourceAreaInstance); |
63 } | 62 } |
64 | 63 |
65 } // namespace blink | 64 } // namespace blink |
OLD | NEW |