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

Side by Side Diff: extensions/browser/api/extensions_api_client.h

Issue 180213008: Add ExtensionsApiClient interface, use it in the storage API SettingsFrontend (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix windows (delegate_storage_api) Created 6 years, 9 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 | « chrome/chrome_browser_extensions.gypi ('k') | extensions/browser/api/extensions_api_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 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 EXTENSIONS_BROWSER_API_EXTENSIONS_API_CLIENT_H_
6 #define EXTENSIONS_BROWSER_API_EXTENSIONS_API_CLIENT_H_
7
8 #include <map>
9
10 #include "base/memory/ref_counted.h"
11 #include "extensions/browser/api/storage/settings_namespace.h"
12
13 template <class T>
14 class ObserverListThreadSafe;
15
16 namespace content {
17 class BrowserContext;
18 }
19
20 namespace extensions {
21
22 class SettingsObserver;
23 class SettingsStorageFactory;
24 class ValueStoreCache;
25
26 // Allows the embedder of the extensions module to customize its support for
27 // API features. The embedder must create a single instance in the browser
28 // process. Provides a default implementation that does nothing.
29 class ExtensionsAPIClient {
30 public:
31 // Construction sets the single instance.
32 ExtensionsAPIClient();
33
34 // Destruction clears the single instance.
35 virtual ~ExtensionsAPIClient();
36
37 // Returns the single instance of |this|.
38 static ExtensionsAPIClient* Get();
39
40 // Storage API support.
41
42 // Add any additional value store caches (e.g. for chrome.storage.managed)
43 // to |caches|. By default adds nothing.
44 virtual void AddAdditionalValueStoreCaches(
45 content::BrowserContext* context,
46 const scoped_refptr<SettingsStorageFactory>& factory,
47 const scoped_refptr<ObserverListThreadSafe<SettingsObserver> >& observers,
48 std::map<settings_namespace::Namespace, ValueStoreCache*>* caches);
49
50 // NOTE: If this interface gains too many methods (perhaps more than 20) it
51 // should be split into one interface per API.
52 };
53
54 } // namespace extensions
55
56 #endif // EXTENSIONS_BROWSER_API_EXTENSIONS_API_CLIENT_H_
OLDNEW
« no previous file with comments | « chrome/chrome_browser_extensions.gypi ('k') | extensions/browser/api/extensions_api_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698