Make USB permissions work in the new permission message system
[chromium-blink-merge.git] / content / renderer / dom_storage / dom_storage_proxy.h
blob80cd87cdcc42fe450d8b7807e388ac01656fa79e
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.
5 #ifndef CONTENT_RENDERER_DOM_STORAGE_DOM_STORAGE_PROXY_H_
6 #define CONTENT_RENDERER_DOM_STORAGE_DOM_STORAGE_PROXY_H_
8 #include "base/bind.h"
9 #include "base/memory/ref_counted.h"
10 #include "base/strings/nullable_string16.h"
11 #include "base/strings/string16.h"
12 #include "content/common/dom_storage/dom_storage_types.h"
13 #include "url/gurl.h"
15 namespace content {
17 // Abstract interface for cached area, renderer to browser communications.
18 class DOMStorageProxy : public base::RefCounted<DOMStorageProxy> {
19 public:
20 typedef base::Callback<void(bool)> CompletionCallback;
22 virtual void LoadArea(int connection_id,
23 DOMStorageValuesMap* values,
24 const CompletionCallback& callback) = 0;
26 virtual void SetItem(int connection_id,
27 const base::string16& key,
28 const base::string16& value,
29 const GURL& page_url,
30 const CompletionCallback& callback) = 0;
32 virtual void RemoveItem(int connection_id,
33 const base::string16& key,
34 const GURL& page_url,
35 const CompletionCallback& callback) = 0;
37 virtual void ClearArea(int connection_id,
38 const GURL& page_url,
39 const CompletionCallback& callback) = 0;
41 protected:
42 friend class base::RefCounted<DOMStorageProxy>;
43 virtual ~DOMStorageProxy() {}
46 } // namespace content
48 #endif // CONTENT_RENDERER_DOM_STORAGE_DOM_STORAGE_PROXY_H_