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

Side by Side Diff: webkit/dom_storage/dom_storage_host.h

Issue 10413018: Add the HasAreaOpen method to DomStorageHost. Intended for use to make event propagation less chatt… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
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 | Annotate | Revision Log
« no previous file with comments | « no previous file | webkit/dom_storage/dom_storage_host.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef WEBKIT_DOM_STORAGE_DOM_STORAGE_HOST_H_ 5 #ifndef WEBKIT_DOM_STORAGE_DOM_STORAGE_HOST_H_
6 #define WEBKIT_DOM_STORAGE_DOM_STORAGE_HOST_H_ 6 #define WEBKIT_DOM_STORAGE_DOM_STORAGE_HOST_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 10
(...skipping 28 matching lines...) Expand all
39 unsigned GetAreaLength(int connection_id); 39 unsigned GetAreaLength(int connection_id);
40 NullableString16 GetAreaKey(int connection_id, unsigned index); 40 NullableString16 GetAreaKey(int connection_id, unsigned index);
41 NullableString16 GetAreaItem(int connection_id, const string16& key); 41 NullableString16 GetAreaItem(int connection_id, const string16& key);
42 bool SetAreaItem(int connection_id, const string16& key, 42 bool SetAreaItem(int connection_id, const string16& key,
43 const string16& value, const GURL& page_url, 43 const string16& value, const GURL& page_url,
44 NullableString16* old_value); 44 NullableString16* old_value);
45 bool RemoveAreaItem(int connection_id, const string16& key, 45 bool RemoveAreaItem(int connection_id, const string16& key,
46 const GURL& page_url, 46 const GURL& page_url,
47 string16* old_value); 47 string16* old_value);
48 bool ClearArea(int connection_id, const GURL& page_url); 48 bool ClearArea(int connection_id, const GURL& page_url);
49 bool HasAreaOpen(int namespace_id, const GURL& origin) const;
49 50
50 private: 51 private:
51 // Struct to hold references needed for areas that are open 52 // Struct to hold references needed for areas that are open
52 // within our associated client process. 53 // within our associated client process.
53 struct NamespaceAndArea { 54 struct NamespaceAndArea {
54 scoped_refptr<DomStorageNamespace> namespace_; 55 scoped_refptr<DomStorageNamespace> namespace_;
55 scoped_refptr<DomStorageArea> area_; 56 scoped_refptr<DomStorageArea> area_;
56 NamespaceAndArea(); 57 NamespaceAndArea();
57 ~NamespaceAndArea(); 58 ~NamespaceAndArea();
58 }; 59 };
59 typedef std::map<int, NamespaceAndArea > AreaMap; 60 typedef std::map<int, NamespaceAndArea > AreaMap;
60 61
61 DomStorageArea* GetOpenArea(int connection_id); 62 DomStorageArea* GetOpenArea(int connection_id);
62 63
63 scoped_refptr<DomStorageContext> context_; 64 scoped_refptr<DomStorageContext> context_;
64 AreaMap connections_; 65 AreaMap connections_;
65 }; 66 };
66 67
67 } // namespace dom_storage 68 } // namespace dom_storage
68 69
69 #endif // WEBKIT_DOM_STORAGE_DOM_STORAGE_HOST_H_ 70 #endif // WEBKIT_DOM_STORAGE_DOM_STORAGE_HOST_H_
OLDNEW
« no previous file with comments | « no previous file | webkit/dom_storage/dom_storage_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698