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

Unified Diff: chrome/browser/automation/testing_automation_provider.cc

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 | « no previous file | chrome/browser/ui/browser_list.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/automation/testing_automation_provider.cc
diff --git a/chrome/browser/automation/testing_automation_provider.cc b/chrome/browser/automation/testing_automation_provider.cc
index fe99a4cf698436ce627f710e5dc5c52ccdc20f8b..2ad5160848cc6af8d0813200b311074ba060963f 100644
--- a/chrome/browser/automation/testing_automation_provider.cc
+++ b/chrome/browser/automation/testing_automation_provider.cc
@@ -93,6 +93,7 @@
#include "chrome/browser/ui/browser_finder.h"
#include "chrome/browser/ui/browser_instant_controller.h"
#include "chrome/browser/ui/browser_iterator.h"
+#include "chrome/browser/ui/browser_list.h"
#include "chrome/browser/ui/browser_list_impl.h"
#include "chrome/browser/ui/browser_tabstrip.h"
#include "chrome/browser/ui/browser_window.h"
@@ -254,9 +255,7 @@ TestingAutomationProvider::TestingAutomationProvider(Profile* profile)
, power_manager_observer_(NULL)
#endif
{
- // The automation layer doesn't support non-native desktops.
- chrome::BrowserListImpl::GetInstance(
- chrome::HOST_DESKTOP_TYPE_NATIVE)->AddObserver(this);
+ BrowserList::AddObserver(this);
registrar_.Add(this, chrome::NOTIFICATION_SESSION_END,
content::NotificationService::AllSources());
#if defined(OS_CHROMEOS)
@@ -268,9 +267,7 @@ TestingAutomationProvider::~TestingAutomationProvider() {
#if defined(OS_CHROMEOS)
RemoveChromeosObservers();
#endif
- // The automation layer doesn't support non-native desktops.
- chrome::BrowserListImpl::GetInstance(
- chrome::HOST_DESKTOP_TYPE_NATIVE)->RemoveObserver(this);
+ BrowserList::RemoveObserver(this);
}
IPC::Channel::Mode TestingAutomationProvider::GetChannelMode(
« no previous file with comments | « no previous file | chrome/browser/ui/browser_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698