diff options
author | gab@chromium.org <gab@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-14 17:13:44 +0000 |
---|---|---|
committer | gab@chromium.org <gab@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-14 17:13:44 +0000 |
commit | ad694eb0fddfdbcb74e31d13e473ce277c680ca8 (patch) | |
tree | 64902f246a5d97214b3a77b61444c0bc981e9b7b /chrome/browser/ui/window_sizer | |
parent | adf2a23786f8de00a908d5aae74edf71014fc485 (diff) | |
download | chromium_src-ad694eb0fddfdbcb74e31d13e473ce277c680ca8.zip chromium_src-ad694eb0fddfdbcb74e31d13e473ce277c680ca8.tar.gz chromium_src-ad694eb0fddfdbcb74e31d13e473ce277c680ca8.tar.bz2 |
Replace static/native-desktop-only BrowserList::const_reverse_iterator by desktop specific reverse iterators as appropriate.
BUG=129187
Originally committed in: https://src.chromium.org/viewvc/chrome?view=rev&revision=182463
Reverted in: https://src.chromium.org/viewvc/chrome?view=rev&revision=182476 (breaks ChromeLauncherControllerPerAppTest.BrowserMenuGeneration in unit_tests on win7_aura)
Review URL: https://codereview.chromium.org/12262019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@182484 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/window_sizer')
-rw-r--r-- | chrome/browser/ui/window_sizer/window_sizer.cc | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/chrome/browser/ui/window_sizer/window_sizer.cc b/chrome/browser/ui/window_sizer/window_sizer.cc index da1f2d4..2afc78d 100644 --- a/chrome/browser/ui/window_sizer/window_sizer.cc +++ b/chrome/browser/ui/window_sizer/window_sizer.cc @@ -11,9 +11,10 @@ #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/ash/ash_init.h" #include "chrome/browser/ui/browser.h" -#include "chrome/browser/ui/browser_list.h" +#include "chrome/browser/ui/browser_list_impl.h" #include "chrome/browser/ui/browser_window.h" #include "chrome/browser/ui/browser_window_state.h" +#include "chrome/browser/ui/host_desktop.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/pref_names.h" #include "ui/gfx/screen.h" @@ -112,9 +113,16 @@ class DefaultStateProvider : public WindowSizer::StateProvider { if (browser_ && browser_->window() && !browser_->window()->IsPanel()) { window = browser_->window(); } else { - BrowserList::const_reverse_iterator it = BrowserList::begin_last_active(); - BrowserList::const_reverse_iterator end = BrowserList::end_last_active(); - for (; (it != end); ++it) { + // This code is only ran on the native desktop (on the ash desktop, + // GetBoundsOverrideAsh should take over below before this is reached). + // TODO(gab): This code should go in a native desktop specific window + // sizer as part of fixing crbug.com/175812. + const chrome::BrowserListImpl* native_browser_list = + chrome::BrowserListImpl::GetInstance( + chrome::HOST_DESKTOP_TYPE_NATIVE); + for (chrome::BrowserListImpl::const_reverse_iterator it = + native_browser_list->begin_last_active(); + it != native_browser_list->end_last_active(); ++it) { Browser* last_active = *it; if (last_active && last_active->is_type_tabbed()) { window = last_active->window(); |