Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / extensions / browser / api / storage / settings_observer.h
blobdaa7e6932c0ef13767f966e2b6008294c522ef1a
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.
5 #ifndef EXTENSIONS_BROWSER_API_STORAGE_SETTINGS_OBSERVER_H_
6 #define EXTENSIONS_BROWSER_API_STORAGE_SETTINGS_OBSERVER_H_
8 #include "base/observer_list_threadsafe.h"
9 #include "extensions/browser/api/storage/settings_namespace.h"
11 namespace extensions {
13 // Interface for classes that listen to changes to extension settings.
14 class SettingsObserver {
15 public:
16 // Called when a list of settings have changed for an extension.
17 virtual void OnSettingsChanged(
18 const std::string& extension_id,
19 settings_namespace::Namespace settings_namespace,
20 const std::string& changes_json) = 0;
22 virtual ~SettingsObserver() {}
25 typedef base::ObserverListThreadSafe<SettingsObserver> SettingsObserverList;
27 } // namespace extensions
29 #endif // EXTENSIONS_BROWSER_API_STORAGE_SETTINGS_OBSERVER_H_