summaryrefslogtreecommitdiffstats
path: root/ash
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-16 04:21:54 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-16 04:21:54 +0000
commit4c090d2e47966acc72365fad22612f2235d89396 (patch)
treedb06cf81ec14cc08c72e89a3ee0d10ca0f61f595 /ash
parent5f4616d145d23a69da79c7ce6ae7df4ae3da5d48 (diff)
downloadchromium_src-4c090d2e47966acc72365fad22612f2235d89396.zip
chromium_src-4c090d2e47966acc72365fad22612f2235d89396.tar.gz
chromium_src-4c090d2e47966acc72365fad22612f2235d89396.tar.bz2
Remove some methods from RootWindow that really belong on the WTH.
TBR=sky@chromium.org BUG= Review URL: https://codereview.chromium.org/167563004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@251606 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash')
-rw-r--r--ash/display/display_controller.cc2
-rw-r--r--ash/display/mirror_window_controller.cc2
-rw-r--r--ash/display/virtual_keyboard_window_controller.cc2
-rw-r--r--ash/extended_desktop_unittest.cc10
-rw-r--r--ash/magnifier/magnification_controller.cc2
-rw-r--r--ash/root_window_controller.cc2
-rw-r--r--ash/wm/ash_native_cursor_manager.cc4
-rw-r--r--ash/wm/overview/window_selector_unittest.cc2
-rw-r--r--ash/wm/window_manager_unittest.cc25
9 files changed, 29 insertions, 22 deletions
diff --git a/ash/display/display_controller.cc b/ash/display/display_controller.cc
index 0bb90b1..ef6809e 100644
--- a/ash/display/display_controller.cc
+++ b/ash/display/display_controller.cc
@@ -718,7 +718,7 @@ aura::RootWindow* DisplayController::AddRootWindowForDisplay(
root_window->AddRootWindowObserver(this);
internal::InitRootWindowSettings(root_window->window())->display_id =
display.id();
- root_window->Init();
+ root_window->host()->InitHost();
root_windows_[display.id()] = root_window->window();
SetDisplayPropertiesOnHostWindow(root_window, display);
diff --git a/ash/display/mirror_window_controller.cc b/ash/display/mirror_window_controller.cc
index 3637ad1..68253b3 100644
--- a/ash/display/mirror_window_controller.cc
+++ b/ash/display/mirror_window_controller.cc
@@ -98,7 +98,7 @@ void MirrorWindowController::UpdateWindow(const DisplayInfo& display_info) {
// TODO(oshima): TouchHUD is using idkey.
InitRootWindowSettings(root_window_->window())->display_id =
display_info.id();
- root_window_->Init();
+ root_window_->host()->InitHost();
#if defined(USE_X11)
DisableInput(root_window_->host()->GetAcceleratedWidget());
#endif
diff --git a/ash/display/virtual_keyboard_window_controller.cc b/ash/display/virtual_keyboard_window_controller.cc
index bdd9cdb..55b5fc1 100644
--- a/ash/display/virtual_keyboard_window_controller.cc
+++ b/ash/display/virtual_keyboard_window_controller.cc
@@ -56,7 +56,7 @@ void VirtualKeyboardWindowController::UpdateWindow(
Shell::GetInstance()->display_controller());
InitRootWindowSettings(root_window->window())->display_id =
display_info.id();
- root_window->Init();
+ root_window->host()->InitHost();
RootWindowController::CreateForVirtualKeyboardDisplay(root_window);
root_window_controller_.reset(GetRootWindowController(
root_window->window()));
diff --git a/ash/extended_desktop_unittest.cc b/ash/extended_desktop_unittest.cc
index 6e02726..4d41fce 100644
--- a/ash/extended_desktop_unittest.cc
+++ b/ash/extended_desktop_unittest.cc
@@ -254,11 +254,13 @@ TEST_F(ExtendedDesktopTest, TestCursor) {
aura::Window::Windows root_windows = Shell::GetAllRootWindows();
aura::WindowEventDispatcher* dispatcher0 = root_windows[0]->GetDispatcher();
aura::WindowEventDispatcher* dispatcher1 = root_windows[1]->GetDispatcher();
- EXPECT_EQ(ui::kCursorPointer, dispatcher0->last_cursor().native_type());
- EXPECT_EQ(ui::kCursorPointer, dispatcher1->last_cursor().native_type());
+ EXPECT_EQ(ui::kCursorPointer,
+ dispatcher0->host()->last_cursor().native_type());
+ EXPECT_EQ(ui::kCursorPointer,
+ dispatcher1->host()->last_cursor().native_type());
Shell::GetInstance()->cursor_manager()->SetCursor(ui::kCursorCopy);
- EXPECT_EQ(ui::kCursorCopy, dispatcher0->last_cursor().native_type());
- EXPECT_EQ(ui::kCursorCopy, dispatcher1->last_cursor().native_type());
+ EXPECT_EQ(ui::kCursorCopy, dispatcher0->host()->last_cursor().native_type());
+ EXPECT_EQ(ui::kCursorCopy, dispatcher1->host()->last_cursor().native_type());
}
TEST_F(ExtendedDesktopTest, TestCursorLocation) {
diff --git a/ash/magnifier/magnification_controller.cc b/ash/magnifier/magnification_controller.cc
index c17dbc5..3f2feff9 100644
--- a/ash/magnifier/magnification_controller.cc
+++ b/ash/magnifier/magnification_controller.cc
@@ -48,7 +48,7 @@ void MoveCursorTo(aura::RootWindow* root_window,
const gfx::Point& root_location) {
gfx::Point3F host_location_3f(root_location);
root_window->host()->GetRootTransform().TransformPoint(&host_location_3f);
- root_window->MoveCursorToHostLocation(
+ root_window->host()->MoveCursorToHostLocation(
gfx::ToCeiledPoint(host_location_3f.AsPointF()));
}
diff --git a/ash/root_window_controller.cc b/ash/root_window_controller.cc
index 7c42ca7..801f89d 100644
--- a/ash/root_window_controller.cc
+++ b/ash/root_window_controller.cc
@@ -657,7 +657,7 @@ void RootWindowController::Init(RootWindowType root_window_type,
Shell* shell = Shell::GetInstance();
shell->InitRootWindow(root_window());
- root_window_->SetCursor(ui::kCursorPointer);
+ root_window_->host()->SetCursor(ui::kCursorPointer);
CreateContainersInRootWindow(root_window_->window());
if (root_window_type == VIRTUAL_KEYBOARD) {
diff --git a/ash/wm/ash_native_cursor_manager.cc b/ash/wm/ash_native_cursor_manager.cc
index a2004e7..0100105 100644
--- a/ash/wm/ash_native_cursor_manager.cc
+++ b/ash/wm/ash_native_cursor_manager.cc
@@ -21,7 +21,7 @@ void SetCursorOnAllRootWindows(gfx::NativeCursor cursor) {
Shell::GetInstance()->GetAllRootWindows();
for (aura::Window::Windows::iterator iter = root_windows.begin();
iter != root_windows.end(); ++iter)
- (*iter)->GetDispatcher()->SetCursor(cursor);
+ (*iter)->GetDispatcher()->host()->SetCursor(cursor);
#if defined(OS_CHROMEOS)
Shell::GetInstance()->display_controller()->
cursor_window_controller()->SetCursor(cursor);
@@ -33,7 +33,7 @@ void NotifyCursorVisibilityChange(bool visible) {
Shell::GetInstance()->GetAllRootWindows();
for (aura::Window::Windows::iterator iter = root_windows.begin();
iter != root_windows.end(); ++iter)
- (*iter)->GetDispatcher()->OnCursorVisibilityChanged(visible);
+ (*iter)->GetDispatcher()->host()->OnCursorVisibilityChanged(visible);
#if defined(OS_CHROMEOS)
Shell::GetInstance()->display_controller()->cursor_window_controller()->
SetVisibility(visible);
diff --git a/ash/wm/overview/window_selector_unittest.cc b/ash/wm/overview/window_selector_unittest.cc
index 476cbcd..db3c6fb5 100644
--- a/ash/wm/overview/window_selector_unittest.cc
+++ b/ash/wm/overview/window_selector_unittest.cc
@@ -255,7 +255,7 @@ TEST_F(WindowSelectorTest, Basic) {
// The cursor should be visible and locked as a pointer
EXPECT_EQ(ui::kCursorPointer,
- root_window->GetDispatcher()->last_cursor().native_type());
+ root_window->GetDispatcher()->host()->last_cursor().native_type());
EXPECT_TRUE(aura::client::GetCursorClient(root_window)->IsCursorLocked());
EXPECT_TRUE(aura::client::GetCursorClient(root_window)->IsCursorVisible());
diff --git a/ash/wm/window_manager_unittest.cc b/ash/wm/window_manager_unittest.cc
index 5c12fe4..bc8faeb 100644
--- a/ash/wm/window_manager_unittest.cc
+++ b/ash/wm/window_manager_unittest.cc
@@ -511,7 +511,8 @@ TEST_F(WindowManagerTest, MouseEventCursors) {
aura::WindowEventDispatcher* dispatcher = root_window->GetDispatcher();
// Cursor starts as a pointer (set during Shell::Init()).
- EXPECT_EQ(ui::kCursorPointer, dispatcher->last_cursor().native_type());
+ EXPECT_EQ(ui::kCursorPointer,
+ dispatcher->host()->last_cursor().native_type());
{
// Resize edges and corners show proper cursors.
@@ -519,7 +520,8 @@ TEST_F(WindowManagerTest, MouseEventCursors) {
ui::MouseEvent move1(ui::ET_MOUSE_MOVED, point1, point1, 0, 0);
ui::EventDispatchDetails details = dispatcher->OnEventFromSource(&move1);
ASSERT_FALSE(details.dispatcher_destroyed);
- EXPECT_EQ(ui::kCursorSouthResize, dispatcher->last_cursor().native_type());
+ EXPECT_EQ(ui::kCursorSouthResize,
+ dispatcher->host()->last_cursor().native_type());
}
{
@@ -528,7 +530,7 @@ TEST_F(WindowManagerTest, MouseEventCursors) {
ui::EventDispatchDetails details = dispatcher->OnEventFromSource(&move2);
ASSERT_FALSE(details.dispatcher_destroyed);
EXPECT_EQ(ui::kCursorSouthWestResize,
- dispatcher->last_cursor().native_type());
+ dispatcher->host()->last_cursor().native_type());
}
{
@@ -537,7 +539,7 @@ TEST_F(WindowManagerTest, MouseEventCursors) {
ui::EventDispatchDetails details = dispatcher->OnEventFromSource(&move1);
ASSERT_FALSE(details.dispatcher_destroyed);
EXPECT_EQ(ui::kCursorSouthEastResize,
- dispatcher->last_cursor().native_type());
+ dispatcher->host()->last_cursor().native_type());
}
{
@@ -545,7 +547,8 @@ TEST_F(WindowManagerTest, MouseEventCursors) {
ui::MouseEvent move2(ui::ET_MOUSE_MOVED, point2, point2, 0, 0);
ui::EventDispatchDetails details = dispatcher->OnEventFromSource(&move2);
ASSERT_FALSE(details.dispatcher_destroyed);
- EXPECT_EQ(ui::kCursorWestResize, dispatcher->last_cursor().native_type());
+ EXPECT_EQ(ui::kCursorWestResize,
+ dispatcher->host()->last_cursor().native_type());
}
{
@@ -553,7 +556,8 @@ TEST_F(WindowManagerTest, MouseEventCursors) {
ui::MouseEvent move1(ui::ET_MOUSE_MOVED, point1, point1, 0, 0);
ui::EventDispatchDetails details = dispatcher->OnEventFromSource(&move1);
ASSERT_FALSE(details.dispatcher_destroyed);
- EXPECT_EQ(ui::kCursorEastResize, dispatcher->last_cursor().native_type());
+ EXPECT_EQ(ui::kCursorEastResize,
+ dispatcher->host()->last_cursor().native_type());
}
{
@@ -561,7 +565,8 @@ TEST_F(WindowManagerTest, MouseEventCursors) {
ui::MouseEvent move2(ui::ET_MOUSE_MOVED, point2, point2, 0, 0);
ui::EventDispatchDetails details = dispatcher->OnEventFromSource(&move2);
ASSERT_FALSE(details.dispatcher_destroyed);
- EXPECT_EQ(ui::kCursorNorthResize, dispatcher->last_cursor().native_type());
+ EXPECT_EQ(ui::kCursorNorthResize,
+ dispatcher->host()->last_cursor().native_type());
}
{
@@ -570,7 +575,7 @@ TEST_F(WindowManagerTest, MouseEventCursors) {
ui::EventDispatchDetails details = dispatcher->OnEventFromSource(&move1);
ASSERT_FALSE(details.dispatcher_destroyed);
EXPECT_EQ(ui::kCursorNorthWestResize,
- dispatcher->last_cursor().native_type());
+ dispatcher->host()->last_cursor().native_type());
}
{
@@ -579,7 +584,7 @@ TEST_F(WindowManagerTest, MouseEventCursors) {
ui::EventDispatchDetails details = dispatcher->OnEventFromSource(&move2);
ASSERT_FALSE(details.dispatcher_destroyed);
EXPECT_EQ(ui::kCursorNorthEastResize,
- dispatcher->last_cursor().native_type());
+ dispatcher->host()->last_cursor().native_type());
}
{
@@ -588,7 +593,7 @@ TEST_F(WindowManagerTest, MouseEventCursors) {
ui::MouseEvent move1(ui::ET_MOUSE_MOVED, point1, point1, 0, 0);
ui::EventDispatchDetails details = dispatcher->OnEventFromSource(&move1);
ASSERT_FALSE(details.dispatcher_destroyed);
- EXPECT_EQ(ui::kCursorNull, dispatcher->last_cursor().native_type());
+ EXPECT_EQ(ui::kCursorNull, dispatcher->host()->last_cursor().native_type());
}
}