OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_SETTINGS_OBSERVER_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SETTINGS_OBSERVER_H_ |
| 7 #pragma once |
| 8 |
| 9 #include "chrome/browser/extensions/extension_setting_changes.h" |
| 10 |
| 11 class Profile; |
| 12 |
| 13 // Interface for classes that listen to changes to extension settings. |
| 14 class ExtensionSettingsObserver { |
| 15 public: |
| 16 // Called when a list of settings have changed for an extension. |
| 17 // |
| 18 // |profile| is the profile of the event originator, or NULL if the event |
| 19 // didn't originate from a background page. This is so that events can avoid |
| 20 // being sent back to the background page which made the change. When the |
| 21 // settings API is exposed to content scripts, this will need to be changed. |
| 22 virtual void OnSettingsChanged( |
| 23 const Profile* profile, |
| 24 const std::string& extension_id, |
| 25 const ExtensionSettingChanges& changes) = 0; |
| 26 |
| 27 protected: |
| 28 virtual ~ExtensionSettingsObserver(); |
| 29 }; |
| 30 |
| 31 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SETTINGS_OBSERVER_H_ |
OLD | NEW |