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

Unified Diff: chrome/browser/extensions/extension_settings_observer.h

Issue 8177022: Add onChanged events to the extension settings API, both from sync and between (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync again... Created 9 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/extension_settings_observer.h
diff --git a/chrome/browser/extensions/extension_settings_observer.h b/chrome/browser/extensions/extension_settings_observer.h
new file mode 100644
index 0000000000000000000000000000000000000000..2c59a4cdd3e0dc7688f64259468208a9db87f463
--- /dev/null
+++ b/chrome/browser/extensions/extension_settings_observer.h
@@ -0,0 +1,31 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_SETTINGS_OBSERVER_H_
+#define CHROME_BROWSER_EXTENSIONS_EXTENSION_SETTINGS_OBSERVER_H_
+#pragma once
+
+#include "chrome/browser/extensions/extension_settings_changes.h"
+
+class Profile;
+
+// Interface for classes that listen to changes to extension settings.
+class ExtensionSettingsObserver {
+ public:
+ // Called when a list of settings have changed for an extension.
+ //
+ // |profile| is the profile of the event originator, or NULL if the event
akalin 2011/10/14 10:31:49 is profile actually used, or is it only for disamb
not at google - send to devlin 2011/10/17 00:04:33 Only for disambiguation. Done.
+ // didn't originate from a background page. This is so that events can avoid
+ // being sent back to the background page which made the change. When the
+ // settings API is exposed to content scripts, this will need to be changed.
+ virtual void OnSettingsChanged(
+ Profile* profile,
+ const std::string& extension_id,
+ const ExtensionSettingsChanges& changes) = 0;
+
+ protected:
+ virtual ~ExtensionSettingsObserver();
+};
+
+#endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SETTINGS_OBSERVER_H_

Powered by Google App Engine
This is Rietveld 408576698