summaryrefslogtreecommitdiffstats
path: root/ash/magnifier
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-08 05:52:59 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-08 05:52:59 +0000
commit3433d4d6dfdae531334f216b78dc718eec268e20 (patch)
tree0399b304b7ae15b6bfac540d63b0a3e714c8c5e6 /ash/magnifier
parent612a89c61cc97e3dfdbe08beeff57dca1825806d (diff)
downloadchromium_src-3433d4d6dfdae531334f216b78dc718eec268e20.zip
chromium_src-3433d4d6dfdae531334f216b78dc718eec268e20.tar.gz
chromium_src-3433d4d6dfdae531334f216b78dc718eec268e20.tar.bz2
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 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@233787 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/magnifier')
-rw-r--r--ash/magnifier/partial_magnification_controller.cc16
-rw-r--r--ash/magnifier/partial_magnification_controller.h6
2 files changed, 9 insertions, 13 deletions
diff --git a/ash/magnifier/partial_magnification_controller.cc b/ash/magnifier/partial_magnification_controller.cc
index 3e762b7..a24ba51 100644
--- a/ash/magnifier/partial_magnification_controller.cc
+++ b/ash/magnifier/partial_magnification_controller.cc
@@ -99,7 +99,7 @@ void PartialMagnificationController::OnWindowDestroying(
aura::Window* window) {
CloseMagnifierWindow();
- aura::RootWindow* new_root_window = GetCurrentRootWindow();
+ aura::Window* new_root_window = GetCurrentRootWindow();
if (new_root_window != window)
SwitchTargetRootWindow(new_root_window);
}
@@ -131,13 +131,13 @@ void PartialMagnificationController::CreateMagnifierWindow() {
if (zoom_widget_)
return;
- aura::RootWindow* root_window = GetCurrentRootWindow();
+ aura::Window* root_window = GetCurrentRootWindow();
if (!root_window)
return;
root_window->AddObserver(this);
- gfx::Point mouse(root_window->GetLastMouseLocationInRoot());
+ gfx::Point mouse(root_window->GetDispatcher()->GetLastMouseLocationInRoot());
zoom_widget_ = new views::Widget;
views::Widget::InitParams params(
@@ -196,13 +196,13 @@ void PartialMagnificationController::SwitchTargetRootWindow(
SetScale(GetScale());
}
-aura::RootWindow* PartialMagnificationController::GetCurrentRootWindow() {
- Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
- for (Shell::RootWindowList::const_iterator iter = root_windows.begin();
+aura::Window* PartialMagnificationController::GetCurrentRootWindow() {
+ aura::Window::Windows root_windows = Shell::GetAllRootWindows();
+ for (aura::Window::Windows::const_iterator iter = root_windows.begin();
iter != root_windows.end(); ++iter) {
- aura::RootWindow* root_window = *iter;
+ aura::Window* root_window = *iter;
if (root_window->ContainsPointInRoot(
- root_window->GetLastMouseLocationInRoot()))
+ root_window->GetDispatcher()->GetLastMouseLocationInRoot()))
return root_window;
}
return NULL;
diff --git a/ash/magnifier/partial_magnification_controller.h b/ash/magnifier/partial_magnification_controller.h
index 01c3a2b..eaecd12 100644
--- a/ash/magnifier/partial_magnification_controller.h
+++ b/ash/magnifier/partial_magnification_controller.h
@@ -10,10 +10,6 @@
#include "ui/gfx/point.h"
#include "ui/views/widget/widget_observer.h"
-namespace aura {
-class RootWindow;
-}
-
namespace ash {
const float kDefaultPartialMagnifiedScale = 1.5f;
@@ -52,7 +48,7 @@ class PartialMagnificationController
void SwitchTargetRootWindow(aura::Window* new_root_window);
// Returns the root window that contains the mouse cursor.
- aura::RootWindow* GetCurrentRootWindow();
+ aura::Window* GetCurrentRootWindow();
// Return true if the magnification scale > kMinPartialMagnifiedScaleThreshold
bool IsPartialMagnified() const;