OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_SETTINGS_SETTINGS_OBSERVER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_STORAGE_SETTINGS_OBSERVER_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_SETTINGS_SETTINGS_OBSERVER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_STORAGE_SETTINGS_OBSERVER_H_ |
7 | 7 |
8 #include "base/observer_list_threadsafe.h" | 8 #include "base/observer_list_threadsafe.h" |
9 #include "chrome/browser/extensions/settings/settings_namespace.h" | 9 #include "chrome/browser/extensions/api/storage/settings_namespace.h" |
10 | 10 |
11 namespace extensions { | 11 namespace extensions { |
12 | 12 |
13 // Interface for classes that listen to changes to extension settings. | 13 // Interface for classes that listen to changes to extension settings. |
14 class SettingsObserver { | 14 class SettingsObserver { |
15 public: | 15 public: |
16 // Called when a list of settings have changed for an extension. | 16 // Called when a list of settings have changed for an extension. |
17 virtual void OnSettingsChanged( | 17 virtual void OnSettingsChanged( |
18 const std::string& extension_id, | 18 const std::string& extension_id, |
19 settings_namespace::Namespace settings_namespace, | 19 settings_namespace::Namespace settings_namespace, |
20 const std::string& changes_json) = 0; | 20 const std::string& changes_json) = 0; |
21 | 21 |
22 virtual ~SettingsObserver() {} | 22 virtual ~SettingsObserver() {} |
23 }; | 23 }; |
24 | 24 |
25 typedef ObserverListThreadSafe<SettingsObserver> | 25 typedef ObserverListThreadSafe<SettingsObserver> |
26 SettingsObserverList; | 26 SettingsObserverList; |
27 | 27 |
28 } // namespace extensions | 28 } // namespace extensions |
29 | 29 |
30 #endif // CHROME_BROWSER_EXTENSIONS_SETTINGS_SETTINGS_OBSERVER_H_ | 30 #endif // CHROME_BROWSER_EXTENSIONS_API_STORAGE_SETTINGS_OBSERVER_H_ |
OLD | NEW |