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

Unified Diff: chrome/browser/ui/browser_list_impl.h

Issue 12258019: Make BrowserList::(Add|Remove)Observer add the observer to every desktop's browser list. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Need to friend the methods directly since they are static (otherwise linux_clang doesn't like it) Created 7 years, 10 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/ui/browser_list.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser_list_impl.h
diff --git a/chrome/browser/ui/browser_list_impl.h b/chrome/browser/ui/browser_list_impl.h
index 2801a6e2b0db02f192eac0ceb77d89d4dd848c14..3ff167ce54e92ee02af0fed8c85a123eb64d3c81 100644
--- a/chrome/browser/ui/browser_list_impl.h
+++ b/chrome/browser/ui/browser_list_impl.h
@@ -6,10 +6,10 @@
#define CHROME_BROWSER_UI_BROWSER_LIST_IMPL_H_
#include "base/observer_list.h"
+#include "chrome/browser/ui/browser_list.h"
#include "chrome/browser/ui/host_desktop.h"
class Browser;
-class BrowserList;
class Profile;
namespace chrome {
@@ -33,9 +33,6 @@ class BrowserListImpl {
void AddBrowser(Browser* browser);
void RemoveBrowser(Browser* browser);
- void AddObserver(BrowserListObserver* observer);
- void RemoveObserver(BrowserListObserver* observer);
-
// Called by Browser objects when their window is activated (focused). This
// allows us to determine what the last active Browser was.
void SetLastActive(Browser* browser);
@@ -73,6 +70,14 @@ class BrowserListImpl {
BrowserListImpl();
~BrowserListImpl();
+ // Only callable by BrowserList::(Add|Remove)Observer.
+ // TODO(gab): Merge BrowserListImpl into BrowserList removing the need for
+ // friend.
+ friend void BrowserList::AddObserver(chrome::BrowserListObserver*);
+ friend void BrowserList::RemoveObserver(chrome::BrowserListObserver*);
+ void AddObserver(BrowserListObserver* observer);
+ void RemoveObserver(BrowserListObserver* observer);
+
// Helper method to remove a browser instance from a list of browsers
void RemoveBrowserFrom(Browser* browser, BrowserVector* browser_list);
« no previous file with comments | « chrome/browser/ui/browser_list.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698