OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef WEBKIT_DOM_STORAGE_CACHED_AREA_H_ |
| 6 #define WEBKIT_DOM_STORAGE_CACHED_AREA_H_ |
| 7 #pragma once |
| 8 |
| 9 #include "base/bind.h" |
| 10 #include "base/memory/ref_counted.h" |
| 11 #include "base/nullable_string16.h" |
| 12 #include "base/string16.h" |
| 13 #include "googleurl/src/gurl.h" |
| 14 #include "webkit/dom_storage/dom_storage_types.h" |
| 15 |
| 16 namespace dom_storage { |
| 17 |
| 18 // Abstract interface for cached area renderer to browser communications. |
| 19 class DomStorageProxy : public base::RefCounted<DomStorageProxy> { |
| 20 public: |
| 21 typedef base::Callback<void(bool)> AsyncOperationCallback; |
| 22 |
| 23 virtual void LoadArea(int connection_id, ValuesMap* values, |
| 24 const AsyncOperationCallback& callback) = 0; |
| 25 |
| 26 virtual void SetItem(int connection_id, const string16& key, |
| 27 const string16& value, const GURL& page_url, |
| 28 const AsyncOperationCallback& callback) = 0; |
| 29 |
| 30 virtual void RemoveItem(int connection_id, const string16& key, |
| 31 const GURL& page_url, |
| 32 const AsyncOperationCallback& callback) = 0; |
| 33 |
| 34 virtual void ClearArea(int connection_id, |
| 35 const GURL& page_url, |
| 36 const AsyncOperationCallback& callback) = 0; |
| 37 protected: |
| 38 friend class base::RefCounted<DomStorageProxy>; |
| 39 virtual ~DomStorageProxy() {} |
| 40 }; |
| 41 |
| 42 } // namespace dom_storage |
| 43 |
| 44 #endif // WEBKIT_DOM_STORAGE_DOM_STORAGE_AREA_H_ |
OLD | NEW |