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

Side by Side Diff: content/renderer/dom_storage/webstoragearea_impl.h

Issue 11232014: Move a bunch of code in content\renderer to the content namespace. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix mac Created 8 years, 2 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
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 CONTENT_RENDERER_DOM_STORAGE_WEBSTORAGEAREA_IMPL_H_ 5 #ifndef CONTENT_RENDERER_DOM_STORAGE_WEBSTORAGEAREA_IMPL_H_
6 #define CONTENT_RENDERER_DOM_STORAGE_WEBSTORAGEAREA_IMPL_H_ 6 #define CONTENT_RENDERER_DOM_STORAGE_WEBSTORAGEAREA_IMPL_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageArea.h" 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageArea.h"
11 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" 11 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
12 12
13 class GURL; 13 class GURL;
14 14
15 namespace dom_storage { 15 namespace dom_storage {
16 class DomStorageCachedArea; 16 class DomStorageCachedArea;
17 } 17 }
18 18
19 namespace content {
20
19 class WebStorageAreaImpl : public WebKit::WebStorageArea { 21 class WebStorageAreaImpl : public WebKit::WebStorageArea {
20 public: 22 public:
21 static WebStorageAreaImpl* FromConnectionId(int id); 23 static WebStorageAreaImpl* FromConnectionId(int id);
22 24
23 WebStorageAreaImpl(int64 namespace_id, const GURL& origin); 25 WebStorageAreaImpl(int64 namespace_id, const GURL& origin);
24 virtual ~WebStorageAreaImpl(); 26 virtual ~WebStorageAreaImpl();
25 27
26 // See WebStorageArea.h for documentation on these functions. 28 // See WebStorageArea.h for documentation on these functions.
27 virtual unsigned length(); 29 virtual unsigned length();
28 virtual WebKit::WebString key(unsigned index); 30 virtual WebKit::WebString key(unsigned index);
29 virtual WebKit::WebString getItem(const WebKit::WebString& key); 31 virtual WebKit::WebString getItem(const WebKit::WebString& key);
30 virtual void setItem( 32 virtual void setItem(
31 const WebKit::WebString& key, const WebKit::WebString& value, 33 const WebKit::WebString& key, const WebKit::WebString& value,
32 const WebKit::WebURL& page_url, WebStorageArea::Result& result); 34 const WebKit::WebURL& page_url, WebStorageArea::Result& result);
33 virtual void removeItem( 35 virtual void removeItem(
34 const WebKit::WebString& key, const WebKit::WebURL& page_url); 36 const WebKit::WebString& key, const WebKit::WebURL& page_url);
35 virtual void clear(const WebKit::WebURL& url); 37 virtual void clear(const WebKit::WebURL& url);
36 virtual size_t memoryBytesUsedByCache() const; 38 virtual size_t memoryBytesUsedByCache() const;
37 39
38 private: 40 private:
39 int connection_id_; 41 int connection_id_;
40 scoped_refptr<dom_storage::DomStorageCachedArea> cached_area_; 42 scoped_refptr<dom_storage::DomStorageCachedArea> cached_area_;
41 }; 43 };
42 44
45 } // namespace content
46
43 #endif // CONTENT_RENDERER_DOM_STORAGE_WEBSTORAGEAREA_IMPL_H_ 47 #endif // CONTENT_RENDERER_DOM_STORAGE_WEBSTORAGEAREA_IMPL_H_
OLDNEW
« no previous file with comments | « content/renderer/dom_storage/dom_storage_dispatcher.cc ('k') | content/renderer/dom_storage/webstoragearea_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698