| 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" |
| 38 | 39 |
| 39 namespace blink { | 40 namespace blink { |
| 40 | 41 |
| 41 void WebStorageEventDispatcher::dispatchLocalStorageEvent( | 42 void WebStorageEventDispatcher::dispatchLocalStorageEvent( |
| 42 const WebString& key, const WebString& oldValue, | 43 const WebString& key, const WebString& oldValue, |
| 43 const WebString& newValue, const WebURL& origin, | 44 const WebString& newValue, const WebURL& origin, |
| 44 const WebURL& pageURL, WebStorageArea* sourceAreaInstance) | 45 const WebURL& pageURL, WebStorageArea* sourceAreaInstance) |
| 45 { | 46 { |
| 46 RefPtr<SecurityOrigin> securityOrigin = SecurityOrigin::create(origin); | 47 RefPtr<SecurityOrigin> securityOrigin = SecurityOrigin::create(origin); |
| 47 StorageArea::dispatchLocalStorageEvent( | 48 StorageArea::dispatchLocalStorageEvent( |
| 48 key, oldValue, newValue, securityOrigin.get(), pageURL, | 49 key, oldValue, newValue, securityOrigin.get(), pageURL, |
| 49 sourceAreaInstance); | 50 sourceAreaInstance); |
| 50 } | 51 } |
| 51 | 52 |
| 52 void WebStorageEventDispatcher::dispatchSessionStorageEvent( | 53 void WebStorageEventDispatcher::dispatchSessionStorageEvent( |
| 53 const WebString& key, const WebString& oldValue, | 54 const WebString& key, const WebString& oldValue, |
| 54 const WebString& newValue, const WebURL& origin, | 55 const WebString& newValue, const WebURL& origin, |
| 55 const WebURL& pageURL, const WebStorageNamespace& sessionNamespace, | 56 const WebURL& pageURL, const WebStorageNamespace& sessionNamespace, |
| 56 WebStorageArea* sourceAreaInstance) | 57 WebStorageArea* sourceAreaInstance) |
| 57 { | 58 { |
| 58 RefPtr<SecurityOrigin> securityOrigin = SecurityOrigin::create(origin); | 59 RefPtr<SecurityOrigin> securityOrigin = SecurityOrigin::create(origin); |
| 59 StorageArea::dispatchSessionStorageEvent( | 60 StorageArea::dispatchSessionStorageEvent( |
| 60 key, oldValue, newValue, securityOrigin.get(), pageURL, | 61 key, oldValue, newValue, securityOrigin.get(), pageURL, |
| 61 sessionNamespace, sourceAreaInstance); | 62 sessionNamespace, sourceAreaInstance); |
| 62 } | 63 } |
| 63 | 64 |
| 64 } // namespace blink | 65 } // namespace blink |
| OLD | NEW |