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

Side by Side Diff: Source/WebKit/chromium/src/StorageAreaProxy.h

Issue 10377148: Revert 116712 - Source/WebCore: [chromium] DomStorage events handling needs TLC (2) (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1137/
Patch Set: Created 8 years, 7 months 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
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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 20 matching lines...) Expand all
31 namespace WebKit { 31 namespace WebKit {
32 class WebStorageArea; 32 class WebStorageArea;
33 class WebStorageNamespace; 33 class WebStorageNamespace;
34 } 34 }
35 35
36 namespace WebCore { 36 namespace WebCore {
37 37
38 class Frame; 38 class Frame;
39 class KURL; 39 class KURL;
40 class Page; 40 class Page;
41 class PageGroup;
42 class SecurityOrigin; 41 class SecurityOrigin;
43 class Storage; 42 class Storage;
44 43
45 class StorageAreaProxy : public StorageArea { 44 class StorageAreaProxy : public StorageArea {
46 public: 45 public:
47 StorageAreaProxy(WebKit::WebStorageArea*, StorageType); 46 StorageAreaProxy(WebKit::WebStorageArea*, StorageType);
48 virtual ~StorageAreaProxy(); 47 virtual ~StorageAreaProxy();
49 48
50 // The HTML5 DOM Storage API 49 // The HTML5 DOM Storage API
51 virtual unsigned length(Frame* sourceFrame) const; 50 virtual unsigned length(Frame* sourceFrame) const;
52 virtual String key(unsigned index, Frame* sourceFrame) const; 51 virtual String key(unsigned index, Frame* sourceFrame) const;
53 virtual String getItem(const String& key, Frame* sourceFrame) const; 52 virtual String getItem(const String& key, Frame* sourceFrame) const;
54 virtual void setItem(const String& key, const String& value, ExceptionCode&, Frame* sourceFrame); 53 virtual String setItem(const String& key, const String& value, ExceptionCode & ec, Frame* sourceFrame);
55 virtual void removeItem(const String& key, Frame* sourceFrame); 54 virtual String removeItem(const String& key, Frame* sourceFrame);
56 virtual void clear(Frame* sourceFrame); 55 virtual bool clear(Frame* sourceFrame);
57 virtual bool contains(const String& key, Frame* sourceFrame) const; 56 virtual bool contains(const String& key, Frame* sourceFrame) const;
58 57
59 virtual bool disabledByPrivateBrowsingInFrame(const Frame*) const { return f alse; } 58 virtual bool disabledByPrivateBrowsingInFrame(const Frame*) const { return f alse; }
60 59
61 static void dispatchLocalStorageEvent( 60 static void dispatchLocalStorageEvent(
62 PageGroup*, const String& key, const String& oldValue, const String& newValue, 61 const String& pageGroupName, const String& key, const String& oldVal ue, const String& newValue,
63 SecurityOrigin*, const KURL& pageURL, WebKit::WebStorageArea* source AreaInstance, bool originatedInProcess); 62 SecurityOrigin*, const KURL& pageURL, WebKit::WebStorageArea* source AreaInstance, bool originatedInProcess);
64 static void dispatchSessionStorageEvent( 63 static void dispatchSessionStorageEvent(
65 PageGroup*, const String& key, const String& oldValue, const String& newValue, 64 const String& pageGroupName, const String& key, const String& oldVal ue, const String& newValue,
66 SecurityOrigin*, const KURL& pageURL, const WebKit::WebStorageNamesp ace&, 65 SecurityOrigin*, const KURL& pageURL, const WebKit::WebStorageNamesp ace&,
67 WebKit::WebStorageArea* sourceAreaInstance, bool originatedInProcess ); 66 WebKit::WebStorageArea* sourceAreaInstance, bool originatedInProcess );
68 67
69 private: 68 private:
69 void storageEvent(const String& key, const String& oldValue, const String& n ewValue, StorageType, SecurityOrigin*, Frame* sourceFrame);
70 bool canAccessStorage(Frame*) const; 70 bool canAccessStorage(Frame*) const;
71 71
72 static bool isEventSource(Storage*, WebKit::WebStorageArea* sourceAreaInstan ce); 72 static bool isEventSource(Storage*, WebKit::WebStorageArea* sourceAreaInstan ce);
73 73
74 OwnPtr<WebKit::WebStorageArea> m_storageArea; 74 OwnPtr<WebKit::WebStorageArea> m_storageArea;
75 StorageType m_storageType; 75 StorageType m_storageType;
76 }; 76 };
77 77
78 } // namespace WebCore 78 } // namespace WebCore
79 79
80 #endif // StorageAreaProxy_h 80 #endif // StorageAreaProxy_h
OLDNEW
« no previous file with comments | « Source/WebKit/chromium/public/platform/WebKitPlatformSupport.h ('k') | Source/WebKit/chromium/src/StorageAreaProxy.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698