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

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: 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
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 embedders of the extensions module to customize their support for
27 // API features.
28 class ExtensionsApiClient {
29 public:
30 ExtensionsApiClient();
31 virtual ~ExtensionsApiClient();
32
33 // Storage API support.
34
35 // Add any additional value store caches (e.g. for chrome.storage.managed)
36 // to |caches|. By default adds nothing.
37 virtual void AddAdditionalValueStoreCaches(
38 content::BrowserContext* context,
39 scoped_refptr<SettingsStorageFactory> factory,
40 scoped_refptr<ObserverListThreadSafe<SettingsObserver> > observers,
41 std::map<settings_namespace::Namespace, ValueStoreCache*>* caches);
42
43 // Returns the single instance of |this|.
44 static ExtensionsApiClient* Get();
45
46 // Initializes the single instance. Does not take ownership.
47 static void Set(ExtensionsApiClient* client);
48 };
49
50 } // namespace extensions
51
52 #endif // EXTENSIONS_BROWSER_API_EXTENSIONS_API_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698