summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/browser_event_router.cc
diff options
context:
space:
mode:
authorgab@chromium.org <gab@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-01 05:59:14 +0000
committergab@chromium.org <gab@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-01 05:59:14 +0000
commit3539929f65938785aa42fc0138603c51d6bf28ac (patch)
treebca1b4c239c04ae453c800b810043fae58046da1 /chrome/browser/extensions/browser_event_router.cc
parentdb556fe2511c54ab336b6f32221761bb0de993b3 (diff)
downloadchromium_src-3539929f65938785aa42fc0138603c51d6bf28ac.zip
chromium_src-3539929f65938785aa42fc0138603c51d6bf28ac.tar.gz
chromium_src-3539929f65938785aa42fc0138603c51d6bf28ac.tar.bz2
Swap BrowserList::const_iterator for the multi-desktop aware BrowserIterator in many scenarios.
Some of these are trivial; some others will potentially require more thinking for the feature to be right (e.g., we might want "Continue where I left off" to be per-desktop, etc.), but at least they now work (i.e., do something) on multi-desktop environments. Clear candidates for separate desktop-specific iteration were left out in this CL as well as non-trivial swaps which I'll put in their own CL. This CL is making progress towards getting rid of BrowserList::const_iterator (non-multi-desktop aware) and removes BrowserList::iterator which was already no longer used. BUG=129187, 170753 Review URL: https://chromiumcodereview.appspot.com/12114034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@180095 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/browser_event_router.cc')
-rw-r--r--chrome/browser/extensions/browser_event_router.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/chrome/browser/extensions/browser_event_router.cc b/chrome/browser/extensions/browser_event_router.cc
index c41a8dd..7b701f2 100644
--- a/chrome/browser/extensions/browser_event_router.cc
+++ b/chrome/browser/extensions/browser_event_router.cc
@@ -18,6 +18,7 @@
#include "chrome/browser/extensions/window_controller.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
+#include "chrome/browser/ui/browser_iterator.h"
#include "chrome/browser/ui/browser_list.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/common/extensions/api/extension_action/action_info.h"
@@ -81,12 +82,11 @@ BrowserEventRouter::BrowserEventRouter(Profile* profile)
// Init() can happen after the browser is running, so catch up with any
// windows that already exist.
- for (BrowserList::const_iterator iter = BrowserList::begin();
- iter != BrowserList::end(); ++iter) {
- RegisterForBrowserNotifications(*iter);
+ for (chrome::BrowserIterator it; !it.done(); it.Next()) {
+ RegisterForBrowserNotifications(*it);
// Also catch up our internal bookkeeping of tab entries.
- Browser* browser = *iter;
+ Browser* browser = *it;
if (browser->tab_strip_model()) {
for (int i = 0; i < browser->tab_strip_model()->count(); ++i) {
WebContents* contents = browser->tab_strip_model()->GetWebContentsAt(i);