diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-08 07:16:24 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-08 07:16:24 +0000 |
commit | 8d25881d44dd6ad0d64499c3873d2800f1c777c7 (patch) | |
tree | 23df296f56203c0981a006b75292bcc02ebb7c48 /chrome/browser | |
parent | 4d5cefef845b8d09c6707ec91207b87363898ab7 (diff) | |
download | chromium_src-8d25881d44dd6ad0d64499c3873d2800f1c777c7.zip chromium_src-8d25881d44dd6ad0d64499c3873d2800f1c777c7.tar.gz chromium_src-8d25881d44dd6ad0d64499c3873d2800f1c777c7.tar.bz2 |
Revert 233787 "Eliminate Shell::RootWindowList in favor of aura:..."
> Eliminate Shell::RootWindowList in favor of aura::Window::Windows.
>
> This is necessary as part of my plan to rework RootWindow, specifically making it not be a subclass of Window. (It will eventually be renamed WindowEventDispatcher). Code that expected to get the RootWindow interface from this type can still call GetDispatcher() on members of the returned vector of Windows.
>
> R=oshima@chromium.org
> http://crbug.com/308843
>
> Review URL: https://codereview.chromium.org/64933002
TBR=ben@chromium.org
Review URL: https://codereview.chromium.org/59153004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@233813 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
7 files changed, 33 insertions, 33 deletions
diff --git a/chrome/browser/ui/ash/ash_util.cc b/chrome/browser/ui/ash/ash_util.cc index 8d51b01..f6d6ce2 100644 --- a/chrome/browser/ui/ash/ash_util.cc +++ b/chrome/browser/ui/ash/ash_util.cc @@ -20,10 +20,10 @@ bool IsNativeViewInAsh(gfx::NativeView native_view) { if (!ash::Shell::HasInstance()) return false; - aura::Window::Windows root_windows = + ash::Shell::RootWindowList root_windows = ash::Shell::GetInstance()->GetAllRootWindows(); - for (aura::Window::Windows::const_iterator it = root_windows.begin(); + for (ash::Shell::RootWindowList::const_iterator it = root_windows.begin(); it != root_windows.end(); ++it) { if ((*it)->Contains(native_view)) return true; diff --git a/chrome/browser/ui/ash/launcher/browser_status_monitor.cc b/chrome/browser/ui/ash/launcher/browser_status_monitor.cc index 8d889dc..2f1b526 100644 --- a/chrome/browser/ui/ash/launcher/browser_status_monitor.cc +++ b/chrome/browser/ui/ash/launcher/browser_status_monitor.cc @@ -60,8 +60,8 @@ BrowserStatusMonitor::BrowserStatusMonitor( if (ash::Shell::HasInstance()) { // We can't assume all RootWindows have the same ActivationClient. // Add a RootWindow and its ActivationClient to the observed list. - aura::Window::Windows root_windows = ash::Shell::GetAllRootWindows(); - aura::Window::Windows::const_iterator iter = root_windows.begin(); + ash::Shell::RootWindowList root_windows = ash::Shell::GetAllRootWindows(); + ash::Shell::RootWindowList::const_iterator iter = root_windows.begin(); for (; iter != root_windows.end(); ++iter) { // |observed_activation_clients_| can have the same activation client // multiple times - which would be handled by the used diff --git a/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc b/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc index ba69ae8..019736f 100644 --- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc +++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc @@ -1658,9 +1658,9 @@ void ChromeLauncherController::SetShelfAutoHideBehaviorPrefs( } void ChromeLauncherController::SetShelfAutoHideBehaviorFromPrefs() { - aura::Window::Windows root_windows = ash::Shell::GetAllRootWindows(); + ash::Shell::RootWindowList root_windows = ash::Shell::GetAllRootWindows(); - for (aura::Window::Windows::const_iterator iter = root_windows.begin(); + for (ash::Shell::RootWindowList::const_iterator iter = root_windows.begin(); iter != root_windows.end(); ++iter) { ash::Shell::GetInstance()->SetShelfAutoHideBehavior( GetShelfAutoHideBehavior(*iter), *iter); @@ -1671,9 +1671,9 @@ void ChromeLauncherController::SetShelfAlignmentFromPrefs() { if (!ash::ShelfWidget::ShelfAlignmentAllowed()) return; - aura::Window::Windows root_windows = ash::Shell::GetAllRootWindows(); + ash::Shell::RootWindowList root_windows = ash::Shell::GetAllRootWindows(); - for (aura::Window::Windows::const_iterator iter = root_windows.begin(); + for (ash::Shell::RootWindowList::const_iterator iter = root_windows.begin(); iter != root_windows.end(); ++iter) { // See comment in |kShelfAlignment| as to why we consider two prefs. const std::string alignment_value( diff --git a/chrome/browser/ui/ash/multi_user_window_manager.cc b/chrome/browser/ui/ash/multi_user_window_manager.cc index 6df5012..1acf615 100644 --- a/chrome/browser/ui/ash/multi_user_window_manager.cc +++ b/chrome/browser/ui/ash/multi_user_window_manager.cc @@ -69,11 +69,11 @@ bool IsProcessingUserEvent() { // anymore) and the root window should therefore still have the event which // lead to the menu invocation, but it is not. By fixing that problem this // would "magically work". - aura::Window::Windows root_window_list = ash::Shell::GetAllRootWindows(); - for (aura::Window::Windows::iterator it = root_window_list.begin(); + ash::Shell::RootWindowList root_window_list = ash::Shell::GetAllRootWindows(); + for (ash::Shell::RootWindowList::iterator it = root_window_list.begin(); it != root_window_list.end(); ++it) { - if (IsUserEvent((*it)->GetDispatcher()->current_event())) + if (IsUserEvent((*it)->current_event())) return true; } return false; diff --git a/chrome/browser/ui/ash/screenshot_taker.cc b/chrome/browser/ui/ash/screenshot_taker.cc index 880d0f8..169e85b 100644 --- a/chrome/browser/ui/ash/screenshot_taker.cc +++ b/chrome/browser/ui/ash/screenshot_taker.cc @@ -341,7 +341,7 @@ void ScreenshotTaker::HandleTakeScreenshotForAllRootWindows() { std::string screenshot_basename = !screenshot_basename_for_test_.empty() ? screenshot_basename_for_test_ : GetScreenshotBaseFilename(); - aura::Window::Windows root_windows = ash::Shell::GetAllRootWindows(); + ash::Shell::RootWindowList root_windows = ash::Shell::GetAllRootWindows(); // Reorder root_windows to take the primary root window's snapshot at first. aura::Window* primary_root = ash::Shell::GetPrimaryRootWindow(); if (*(root_windows.begin()) != primary_root) { @@ -350,7 +350,7 @@ void ScreenshotTaker::HandleTakeScreenshotForAllRootWindows() { root_windows.insert(root_windows.begin(), primary_root->GetDispatcher()); } for (size_t i = 0; i < root_windows.size(); ++i) { - aura::Window* root_window = root_windows[i]; + aura::RootWindow* root_window = root_windows[i]; scoped_refptr<base::RefCountedBytes> png_data(new base::RefCountedBytes); std::string basename = screenshot_basename; gfx::Rect rect = root_window->bounds(); diff --git a/chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.cc b/chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.cc index 80159fa..8a07bb4 100644 --- a/chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.cc +++ b/chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.cc @@ -1392,9 +1392,9 @@ IN_PROC_BROWSER_TEST_P(DetachToBrowserInSeparateDisplayTabDragControllerTest, // With the touch input the browser cannot be dragged from one screen // to another and the window stays on the first screen. if (input_source() == INPUT_SOURCE_MOUSE) { - aura::Window::Windows roots = ash::Shell::GetAllRootWindows(); + std::vector<aura::RootWindow*> roots(ash::Shell::GetAllRootWindows()); ASSERT_EQ(2u, roots.size()); - aura::Window* second_root = roots[1]; + aura::RootWindow* second_root = roots[1]; EXPECT_EQ(second_root, new_browser->window()->GetNativeWindow()->GetRootWindow()); } @@ -1444,9 +1444,9 @@ IN_PROC_BROWSER_TEST_P(DetachToBrowserInSeparateDisplayTabDragControllerTest, ResetIDs(browser2->tab_strip_model(), 100); // Move the second browser to the second display. - aura::Window::Windows roots = ash::Shell::GetAllRootWindows(); + std::vector<aura::RootWindow*> roots(ash::Shell::GetAllRootWindows()); ASSERT_EQ(2u, roots.size()); - aura::Window* second_root = roots[1]; + aura::RootWindow* second_root = roots[1]; gfx::Rect work_area = gfx::Screen::GetNativeScreen()->GetDisplayNearestWindow( second_root).work_area(); browser2->window()->SetBounds(work_area); @@ -1494,9 +1494,9 @@ IN_PROC_BROWSER_TEST_P(DetachToBrowserInSeparateDisplayTabDragControllerTest, ResetIDs(browser2->tab_strip_model(), 100); // Move both browsers to the second display. - aura::Window::Windows roots = ash::Shell::GetAllRootWindows(); + std::vector<aura::RootWindow*> roots(ash::Shell::GetAllRootWindows()); ASSERT_EQ(2u, roots.size()); - aura::Window* second_root = roots[1]; + aura::RootWindow* second_root = roots[1]; gfx::Rect work_area = gfx::Screen::GetNativeScreen()->GetDisplayNearestWindow( second_root).work_area(); browser()->window()->SetBounds(work_area); @@ -1553,10 +1553,10 @@ IN_PROC_BROWSER_TEST_P(DetachToBrowserInSeparateDisplayTabDragControllerTest, TabStrip* tab_strip = GetTabStripForBrowser(browser()); // Create another browser on the second display. - aura::Window::Windows roots = ash::Shell::GetAllRootWindows(); + std::vector<aura::RootWindow*> roots(ash::Shell::GetAllRootWindows()); ASSERT_EQ(2u, roots.size()); - aura::Window* first_root = roots[0]; - aura::Window* second_root = roots[1]; + aura::RootWindow* first_root = roots[0]; + aura::RootWindow* second_root = roots[1]; gfx::Rect work_area = gfx::Screen::GetNativeScreen()->GetDisplayNearestWindow( second_root).work_area(); work_area.Inset(20,20,20,60); @@ -1626,9 +1626,9 @@ IN_PROC_BROWSER_TEST_P(DetachToBrowserInSeparateDisplayTabDragControllerTest, ResetIDs(browser2->tab_strip_model(), 100); // Move the second browser to the second display. - aura::Window::Windows roots = ash::Shell::GetAllRootWindows(); + std::vector<aura::RootWindow*> roots(ash::Shell::GetAllRootWindows()); ASSERT_EQ(2u, roots.size()); - aura::Window* second_root = roots[1]; + aura::RootWindow* second_root = roots[1]; gfx::Rect work_area = gfx::Screen::GetNativeScreen()->GetDisplayNearestWindow( second_root).work_area(); browser2->window()->SetBounds(work_area); @@ -1772,7 +1772,7 @@ IN_PROC_BROWSER_TEST_P(DifferentDeviceScaleFactorDisplayTabDragControllerTest, TabStrip* tab_strip = GetTabStripForBrowser(browser()); // Move the second browser to the second display. - aura::Window::Windows roots = ash::Shell::GetAllRootWindows(); + std::vector<aura::RootWindow*> roots(ash::Shell::GetAllRootWindows()); ASSERT_EQ(2u, roots.size()); // Move to the first tab and drag it enough so that it detaches. @@ -1838,7 +1838,7 @@ void CancelDragTabToWindowInSeparateDisplayStep3( void CancelDragTabToWindowInSeparateDisplayStep2( DetachToBrowserInSeparateDisplayAndCancelTabDragControllerTest* test, TabStrip* tab_strip, - aura::Window* current_root, + aura::RootWindow* current_root, gfx::Point final_destination, const BrowserList* browser_list) { ASSERT_FALSE(tab_strip->IsDragSessionActive()); @@ -1868,7 +1868,7 @@ IN_PROC_BROWSER_TEST_F( EXPECT_EQ("0 1", IDString(browser()->tab_strip_model())); // Move the second browser to the second display. - aura::Window::Windows roots = ash::Shell::GetAllRootWindows(); + std::vector<aura::RootWindow*> roots(ash::Shell::GetAllRootWindows()); ASSERT_EQ(2u, roots.size()); gfx::Point final_destination = gfx::Screen::GetNativeScreen()->GetDisplayNearestWindow( @@ -1899,7 +1899,7 @@ IN_PROC_BROWSER_TEST_F( IN_PROC_BROWSER_TEST_F( DetachToBrowserInSeparateDisplayAndCancelTabDragControllerTest, CancelDragTabToWindowIn1stDisplay) { - aura::Window::Windows roots = ash::Shell::GetAllRootWindows(); + std::vector<aura::RootWindow*> roots(ash::Shell::GetAllRootWindows()); ASSERT_EQ(2u, roots.size()); // Add another tab. diff --git a/chrome/browser/ui/window_sizer/window_sizer_ash_uitest.cc b/chrome/browser/ui/window_sizer/window_sizer_ash_uitest.cc index 05e0041..cd38b3a 100644 --- a/chrome/browser/ui/window_sizer/window_sizer_ash_uitest.cc +++ b/chrome/browser/ui/window_sizer/window_sizer_ash_uitest.cc @@ -43,7 +43,7 @@ void CloseBrowser(Browser* browser) { base::MessageLoop::current()->RunUntilIdle(); } -gfx::Rect GetChromeIconBoundsForRootWindow(aura::Window* root_window) { +gfx::Rect GetChromeIconBoundsForRootWindow(aura::RootWindow* root_window) { ash::Launcher* launcher = ash::Launcher::ForWindow(root_window); const ash::internal::ShelfView* shelf_view = ash::test::LauncherTestAPI(launcher).shelf_view(); @@ -53,7 +53,7 @@ gfx::Rect GetChromeIconBoundsForRootWindow(aura::Window* root_window) { return view_model->view_at(1)->GetBoundsInScreen(); } -void OpenBrowserUsingShelfOnRootWindow(aura::Window* root_window) { +void OpenBrowserUsingShelfOnRootWindow(aura::RootWindow* root_window) { aura::test::EventGenerator generator(root_window); gfx::Point center = GetChromeIconBoundsForRootWindow(root_window).CenterPoint(); @@ -80,7 +80,7 @@ IN_PROC_BROWSER_TEST_F(WindowSizerTest, // Don't shutdown when closing the last browser window. chrome::StartKeepAlive(); - aura::Window::Windows root_windows = ash::Shell::GetAllRootWindows(); + ash::Shell::RootWindowList root_windows = ash::Shell::GetAllRootWindows(); BrowserList* browser_list = BrowserList::GetInstance(chrome::HOST_DESKTOP_TYPE_ASH); @@ -150,7 +150,7 @@ class WindowSizerContextMenuTest : public WindowSizerTest { DISALLOW_COPY_AND_ASSIGN(WindowSizerContextMenuTest); }; -void OpenBrowserUsingContextMenuOnRootWindow(aura::Window* root_window) { +void OpenBrowserUsingContextMenuOnRootWindow(aura::RootWindow* root_window) { gfx::Point chrome_icon = GetChromeIconBoundsForRootWindow(root_window).CenterPoint(); gfx::Point release_point = chrome_icon; @@ -170,7 +170,7 @@ IN_PROC_BROWSER_TEST_F(WindowSizerContextMenuTest, views::MenuController::TurnOffMenuSelectionHoldForTest(); - aura::Window::Windows root_windows = ash::Shell::GetAllRootWindows(); + ash::Shell::RootWindowList root_windows = ash::Shell::GetAllRootWindows(); BrowserList* browser_list = BrowserList::GetInstance(chrome::HOST_DESKTOP_TYPE_ASH); |