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

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

Issue 10777004: Support chrome.windows extension API events for browserless Panels. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Synced Created 8 years, 5 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
« no previous file with comments | « chrome/browser/extensions/window_controller.cc ('k') | chrome/browser/extensions/window_controller_list.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/window_controller_list.h
diff --git a/chrome/browser/extensions/window_controller_list.h b/chrome/browser/extensions/window_controller_list.h
index 3c6915b036739b54346f90d1358ebf9cae407fe8..a32baf6a31218b667646aed2795413103cd9e52d 100644
--- a/chrome/browser/extensions/window_controller_list.h
+++ b/chrome/browser/extensions/window_controller_list.h
@@ -9,6 +9,7 @@
#include "base/compiler_specific.h"
#include "base/memory/singleton.h"
+#include "base/observer_list.h"
#include "chrome/browser/extensions/window_controller.h"
class Profile;
@@ -16,6 +17,8 @@ class UIThreadExtensionFunction;
namespace extensions {
+class WindowControllerListObserver;
+
// Class to maintain a list of WindowControllers.
class WindowControllerList {
public:
@@ -27,6 +30,9 @@ class WindowControllerList {
void AddExtensionWindow(WindowController* window);
void RemoveExtensionWindow(WindowController* window);
+ void AddObserver(WindowControllerListObserver* observer);
+ void RemoveObserver(WindowControllerListObserver* observer);
+
// Returns a window matching the context the function was invoked in.
WindowController* FindWindowForFunctionById(
const UIThreadExtensionFunction* function,
@@ -47,6 +53,8 @@ class WindowControllerList {
// Entries are not owned by this class and must be removed when destroyed.
ControllerList windows_;
+ ObserverList<WindowControllerListObserver> observers_;
+
DISALLOW_COPY_AND_ASSIGN(WindowControllerList);
};
« no previous file with comments | « chrome/browser/extensions/window_controller.cc ('k') | chrome/browser/extensions/window_controller_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698