OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 CHROME_BROWSER_EXTENSIONS_EXTENSION_ACTION_STORAGE_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_ACTION_STORAGE_MANAGER_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_ACTION_STORAGE_MANAGER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_ACTION_STORAGE_MANAGER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 content::WebContents* web_contents, | 37 content::WebContents* web_contents, |
38 content::BrowserContext* browser_context) override; | 38 content::BrowserContext* browser_context) override; |
39 void OnExtensionActionAPIShuttingDown() override; | 39 void OnExtensionActionAPIShuttingDown() override; |
40 | 40 |
41 // ExtensionRegistryObserver: | 41 // ExtensionRegistryObserver: |
42 void OnExtensionLoaded(content::BrowserContext* browser_context, | 42 void OnExtensionLoaded(content::BrowserContext* browser_context, |
43 const Extension* extension) override; | 43 const Extension* extension) override; |
44 | 44 |
45 // Reads/Writes the ExtensionAction's default values to/from storage. | 45 // Reads/Writes the ExtensionAction's default values to/from storage. |
46 void WriteToStorage(ExtensionAction* extension_action); | 46 void WriteToStorage(ExtensionAction* extension_action); |
47 void ReadFromStorage( | 47 void ReadFromStorage(const std::string& extension_id, |
48 const std::string& extension_id, scoped_ptr<base::Value> value); | 48 std::unique_ptr<base::Value> value); |
49 | 49 |
50 // Returns the Extensions StateStore for the |browser_context_|. | 50 // Returns the Extensions StateStore for the |browser_context_|. |
51 // May return NULL. | 51 // May return NULL. |
52 StateStore* GetStateStore(); | 52 StateStore* GetStateStore(); |
53 | 53 |
54 content::BrowserContext* browser_context_; | 54 content::BrowserContext* browser_context_; |
55 | 55 |
56 ScopedObserver<ExtensionActionAPI, ExtensionActionAPI::Observer> | 56 ScopedObserver<ExtensionActionAPI, ExtensionActionAPI::Observer> |
57 extension_action_observer_; | 57 extension_action_observer_; |
58 | 58 |
59 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver> | 59 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver> |
60 extension_registry_observer_; | 60 extension_registry_observer_; |
61 | 61 |
62 base::WeakPtrFactory<ExtensionActionStorageManager> weak_factory_; | 62 base::WeakPtrFactory<ExtensionActionStorageManager> weak_factory_; |
63 | 63 |
64 DISALLOW_COPY_AND_ASSIGN(ExtensionActionStorageManager); | 64 DISALLOW_COPY_AND_ASSIGN(ExtensionActionStorageManager); |
65 }; | 65 }; |
66 | 66 |
67 } // namespace extensions | 67 } // namespace extensions |
68 | 68 |
69 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_ACTION_STORAGE_MANAGER_H_ | 69 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_ACTION_STORAGE_MANAGER_H_ |
OLD | NEW |