Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(60)

Side by Side Diff: webkit/api/src/WebStorageEventDispatcherImpl.cpp

Issue 341030: Moves webview_impl.cc, webframe_impl.cc and webframeloaderclient_impl.cc into... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/api/src/WebFrameImpl.cpp ('k') | webkit/api/src/WebViewImpl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 "WebStorageEventDispatcherImpl.h" 32 #include "WebStorageEventDispatcherImpl.h"
33 33
34 #if ENABLE(DOM_STORAGE) 34 #if ENABLE(DOM_STORAGE)
35 35
36 #include "SecurityOrigin.h" 36 #include "SecurityOrigin.h"
37 37
38 namespace WebKit {
39
38 extern const char* pageGroupName; 40 extern const char* pageGroupName;
39 41
40 namespace WebKit {
41
42 WebStorageEventDispatcher* WebStorageEventDispatcher::create() 42 WebStorageEventDispatcher* WebStorageEventDispatcher::create()
43 { 43 {
44 return new WebStorageEventDispatcherImpl(); 44 return new WebStorageEventDispatcherImpl();
45 } 45 }
46 46
47 WebStorageEventDispatcherImpl::WebStorageEventDispatcherImpl() 47 WebStorageEventDispatcherImpl::WebStorageEventDispatcherImpl()
48 : m_eventDispatcher(new WebCore::StorageEventDispatcherImpl(pageGroupName)) 48 : m_eventDispatcher(new WebCore::StorageEventDispatcherImpl(pageGroupName))
49 { 49 {
50 ASSERT(m_eventDispatcher); 50 ASSERT(m_eventDispatcher);
51 } 51 }
52 52
53 void WebStorageEventDispatcherImpl::dispatchStorageEvent(const WebString& key, const WebString& oldValue, 53 void WebStorageEventDispatcherImpl::dispatchStorageEvent(const WebString& key, const WebString& oldValue,
54 const WebString& newValue, const WebString& origin, 54 const WebString& newValue, const WebString& origin,
55 bool isLocalStorage) 55 bool isLocalStorage)
56 { 56 {
57 WebCore::StorageType storageType = isLocalStorage ? WebCore::LocalStorage : WebCore::SessionStorage; 57 WebCore::StorageType storageType = isLocalStorage ? WebCore::LocalStorage : WebCore::SessionStorage;
58 RefPtr<WebCore::SecurityOrigin> securityOrigin = WebCore::SecurityOrigin::createFromString(origin); 58 RefPtr<WebCore::SecurityOrigin> securityOrigin = WebCore::SecurityOrigin::createFromString(origin);
59 m_eventDispatcher->dispatchStorageEvent(key, oldValue, newValue, storageType, securityOrigin.get()); 59 m_eventDispatcher->dispatchStorageEvent(key, oldValue, newValue, storageType, securityOrigin.get());
60 } 60 }
61 61
62 } // namespace WebKit 62 } // namespace WebKit
63 63
64 #endif // ENABLE(DOM_STORAGE) 64 #endif // ENABLE(DOM_STORAGE)
OLDNEW
« no previous file with comments | « webkit/api/src/WebFrameImpl.cpp ('k') | webkit/api/src/WebViewImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698