summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-20 01:41:51 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-20 01:41:51 +0000
commit8520ebd2d0fad750b0841f4d8dae1e517f0c400f (patch)
tree0d95131d2dd9ee39aa931034484e0a89797d591b
parentf0c4809951a377e88d6b0c19a97cd50dab5d1f10 (diff)
downloadchromium_src-8520ebd2d0fad750b0841f4d8dae1e517f0c400f.zip
chromium_src-8520ebd2d0fad750b0841f4d8dae1e517f0c400f.tar.gz
chromium_src-8520ebd2d0fad750b0841f4d8dae1e517f0c400f.tar.bz2
Revert 236048 "Rename RootWindowHost* to WindowTreeHost*"
> Rename RootWindowHost* to WindowTreeHost* > > TBR=sky@chromium.org > http://crbug.com/308843 > > Review URL: https://codereview.chromium.org/76583003 TBR=ben@chromium.org Review URL: https://codereview.chromium.org/77203002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@236093 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--ash/accelerators/accelerator_controller_unittest.cc12
-rw-r--r--ash/autoclick/autoclick_controller.cc4
-rw-r--r--ash/cancel_mode.cc2
-rw-r--r--ash/display/display_controller.cc4
-rw-r--r--ash/display/display_controller.h2
-rw-r--r--ash/display/display_info.cc2
-rw-r--r--ash/display/mirror_window_controller.cc4
-rw-r--r--ash/display/mirror_window_controller.h2
-rw-r--r--ash/display/virtual_keyboard_window_controller.cc2
-rw-r--r--ash/drag_drop/drag_drop_controller_unittest.cc2
-rw-r--r--ash/host/root_window_host_factory.cc14
-rw-r--r--ash/host/root_window_host_factory.h14
-rw-r--r--ash/host/root_window_host_factory_win.cc16
-rw-r--r--ash/shell.cc2
-rw-r--r--ash/shell.h6
-rw-r--r--ash/shell/shell_delegate_impl.cc4
-rw-r--r--ash/shell/shell_delegate_impl.h2
-rw-r--r--ash/shell_delegate.h4
-rw-r--r--ash/test/ash_test_base.cc4
-rw-r--r--ash/test/test_metro_viewer_process_host.cc4
-rw-r--r--ash/test/test_shell_delegate.cc4
-rw-r--r--ash/test/test_shell_delegate.h2
-rw-r--r--ash/wm/caption_buttons/frame_maximize_button_unittest.cc4
-rw-r--r--ash/wm/lock_state_controller.cc2
-rw-r--r--ash/wm/lock_state_controller.h2
-rw-r--r--ash/wm/sticky_keys.cc4
-rw-r--r--ash/wm/system_gesture_event_filter_unittest.cc2
-rw-r--r--ash/wm/window_manager_unittest.cc50
-rw-r--r--ash/wm/workspace/workspace_event_handler_unittest.cc4
-rw-r--r--chrome/browser/chromeos/system_key_event_listener.cc2
-rw-r--r--chrome/browser/extensions/api/bookmarks/bookmarks_api.cc2
-rw-r--r--chrome/browser/metro_viewer/chrome_metro_viewer_process_host_aurawin.cc4
-rw-r--r--chrome/browser/plugins/plugin_infobar_delegates.cc2
-rw-r--r--chrome/browser/ui/ash/chrome_shell_delegate.cc4
-rw-r--r--chrome/browser/ui/ash/chrome_shell_delegate.h2
-rw-r--r--chrome/browser/ui/ash/launcher/chrome_launcher_controller_win.cc2
-rw-r--r--chrome/browser/ui/aura/active_desktop_monitor.cc6
-rw-r--r--chrome/browser/ui/aura/active_desktop_monitor.h6
-rw-r--r--chrome/browser/ui/aura/tabs/dock_info_auralinux.cc2
-rw-r--r--chrome/browser/ui/views/external_tab_container_win.cc20
-rw-r--r--chrome/browser/ui/views/frame/browser_desktop_root_window_host.h10
-rw-r--r--chrome/browser/ui/views/frame/browser_desktop_root_window_host_win.cc72
-rw-r--r--chrome/browser/ui/views/frame/browser_desktop_root_window_host_win.h16
-rw-r--r--chrome/browser/ui/views/frame/browser_desktop_root_window_host_x11.cc40
-rw-r--r--chrome/browser/ui/views/frame/browser_desktop_root_window_host_x11.h18
-rw-r--r--chrome/browser/ui/views/frame/browser_frame_ashwin.cc2
-rw-r--r--chrome/browser/ui/views/frame/desktop_browser_frame_aura.cc4
-rw-r--r--chrome/browser/ui/views/frame/desktop_browser_frame_aura.h4
-rw-r--r--chrome/browser/ui/views/frame/global_menu_bar_x11.cc2
-rw-r--r--chrome/browser/ui/views/frame/global_menu_bar_x11.h10
-rw-r--r--chrome/browser/ui/views/frame/minimize_button_metrics_win.h2
-rw-r--r--chrome/browser/ui/views/omnibox/omnibox_view_views_browsertest.cc8
-rw-r--r--chrome/browser/ui/views/tabs/dock_info_win.cc6
-rw-r--r--content/browser/accessibility/browser_accessibility_manager_win.cc2
-rw-r--r--content/browser/renderer_host/input/synthetic_gesture_target_aura.cc4
-rw-r--r--content/browser/renderer_host/render_widget_host_view_aura.cc4
-rw-r--r--content/browser/renderer_host/render_widget_host_view_aura.h2
-rw-r--r--content/browser/renderer_host/touch_smooth_scroll_gesture_aura.cc2
-rw-r--r--content/browser/web_contents/aura/window_slider_unittest.cc4
-rw-r--r--content/browser/web_contents/web_contents_view_aura.cc4
-rw-r--r--content/browser/web_contents/web_contents_view_aura_browsertest.cc10
-rw-r--r--content/shell/browser/shell_aura.cc4
-rw-r--r--ui/aura/env.h2
-rw-r--r--ui/aura/gestures/gesture_recognizer_unittest.cc336
-rw-r--r--ui/aura/remote_root_window_host_win.cc140
-rw-r--r--ui/aura/remote_root_window_host_win.h20
-rw-r--r--ui/aura/root_window.cc18
-rw-r--r--ui/aura/root_window.h28
-rw-r--r--ui/aura/root_window_host_ozone.cc54
-rw-r--r--ui/aura/root_window_host_ozone.h10
-rw-r--r--ui/aura/root_window_host_win.cc68
-rw-r--r--ui/aura/root_window_host_win.h14
-rw-r--r--ui/aura/root_window_host_x11.cc82
-rw-r--r--ui/aura/root_window_host_x11.h14
-rw-r--r--ui/aura/root_window_host_x11_unittest.cc46
-rw-r--r--ui/aura/root_window_observer.h6
-rw-r--r--ui/aura/root_window_unittest.cc74
-rw-r--r--ui/aura/test/event_generator.cc4
-rw-r--r--ui/aura/test/event_generator.h2
-rw-r--r--ui/aura/test/test_screen.cc2
-rw-r--r--ui/aura/window_tree_host.cc38
-rw-r--r--ui/aura/window_tree_host.h26
-rw-r--r--ui/aura/window_tree_host_delegate.h6
-rw-r--r--ui/aura/window_unittest.cc38
-rw-r--r--ui/base/ime/input_method.h2
-rw-r--r--ui/events/ozone/event_factory_ozone.h2
-rw-r--r--ui/keyboard/keyboard_util.cc12
-rw-r--r--ui/views/corewm/capture_controller_unittest.cc2
-rw-r--r--ui/views/corewm/compound_event_filter_unittest.cc24
-rw-r--r--ui/views/corewm/input_method_event_filter.cc4
-rw-r--r--ui/views/corewm/tooltip_win.h2
-rw-r--r--ui/views/test/ui_controls_factory_desktop_aurax11.cc4
-rw-r--r--ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.h2
-rw-r--r--ui/views/widget/desktop_aura/desktop_drop_target_win.h2
-rw-r--r--ui/views/widget/desktop_aura/desktop_factory_ozone.h6
-rw-r--r--ui/views/widget/desktop_aura/desktop_native_widget_aura.cc34
-rw-r--r--ui/views/widget/desktop_aura/desktop_native_widget_aura.h18
-rw-r--r--ui/views/widget/desktop_aura/desktop_root_window_host.h14
-rw-r--r--ui/views/widget/desktop_aura/desktop_root_window_host_observer_x11.h4
-rw-r--r--ui/views/widget/desktop_aura/desktop_root_window_host_ozone.cc4
-rw-r--r--ui/views/widget/desktop_aura/desktop_root_window_host_win.cc312
-rw-r--r--ui/views/widget/desktop_aura/desktop_root_window_host_win.h18
-rw-r--r--ui/views/widget/desktop_aura/desktop_root_window_host_win_unittest.cc22
-rw-r--r--ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc226
-rw-r--r--ui/views/widget/desktop_aura/desktop_root_window_host_x11.h36
-rw-r--r--ui/views/widget/desktop_aura/desktop_screen.h2
-rw-r--r--ui/views/widget/desktop_aura/desktop_screen_win.cc2
-rw-r--r--ui/views/widget/desktop_aura/desktop_screen_x11.cc4
-rw-r--r--ui/views/widget/desktop_aura/desktop_screen_x11_unittest.cc4
-rw-r--r--ui/views/widget/desktop_aura/x11_desktop_handler.cc8
-rw-r--r--ui/views/widget/desktop_aura/x11_desktop_window_move_client.cc4
-rw-r--r--ui/views/widget/desktop_aura/x11_whole_screen_move_loop.cc4
-rw-r--r--ui/views/widget/native_widget_aura.cc8
-rw-r--r--ui/views/widget/native_widget_aura_unittest.cc8
-rw-r--r--ui/views/widget/widget.h6
-rw-r--r--ui/views/widget/widget_interactive_uitest.cc2
-rw-r--r--ui/views/widget/widget_unittest.cc10
-rw-r--r--ui/views/win/hwnd_message_handler.h2
-rw-r--r--win8/viewer/metro_viewer_process_host.cc2
119 files changed, 1153 insertions, 1153 deletions
diff --git a/ash/accelerators/accelerator_controller_unittest.cc b/ash/accelerators/accelerator_controller_unittest.cc
index 3030eb4..31df7e3 100644
--- a/ash/accelerators/accelerator_controller_unittest.cc
+++ b/ash/accelerators/accelerator_controller_unittest.cc
@@ -615,17 +615,17 @@ TEST_F(AcceleratorControllerTest, MAYBE_ProcessOnce) {
#if defined(OS_WIN)
MSG msg1 = { NULL, WM_KEYDOWN, ui::VKEY_A, 0 };
ui::TranslatedKeyEvent key_event1(msg1, false);
- EXPECT_TRUE(dispatcher->AsWindowTreeHostDelegate()->OnHostKeyEvent(
+ EXPECT_TRUE(dispatcher->AsRootWindowHostDelegate()->OnHostKeyEvent(
&key_event1));
MSG msg2 = { NULL, WM_CHAR, L'A', 0 };
ui::TranslatedKeyEvent key_event2(msg2, true);
- EXPECT_FALSE(dispatcher->AsWindowTreeHostDelegate()->OnHostKeyEvent(
+ EXPECT_FALSE(dispatcher->AsRootWindowHostDelegate()->OnHostKeyEvent(
&key_event2));
MSG msg3 = { NULL, WM_KEYUP, ui::VKEY_A, 0 };
ui::TranslatedKeyEvent key_event3(msg3, false);
- EXPECT_FALSE(dispatcher->AsWindowTreeHostDelegate()->OnHostKeyEvent(
+ EXPECT_FALSE(dispatcher->AsRootWindowHostDelegate()->OnHostKeyEvent(
&key_event3));
#elif defined(USE_X11)
XEvent key_event;
@@ -634,11 +634,11 @@ TEST_F(AcceleratorControllerTest, MAYBE_ProcessOnce) {
0,
&key_event);
ui::TranslatedKeyEvent key_event1(&key_event, false);
- EXPECT_TRUE(dispatcher->AsWindowTreeHostDelegate()->OnHostKeyEvent(
+ EXPECT_TRUE(dispatcher->AsRootWindowHostDelegate()->OnHostKeyEvent(
&key_event1));
ui::TranslatedKeyEvent key_event2(&key_event, true);
- EXPECT_FALSE(dispatcher->AsWindowTreeHostDelegate()->OnHostKeyEvent(
+ EXPECT_FALSE(dispatcher->AsRootWindowHostDelegate()->OnHostKeyEvent(
&key_event2));
ui::InitXKeyEventForTesting(ui::ET_KEY_RELEASED,
@@ -646,7 +646,7 @@ TEST_F(AcceleratorControllerTest, MAYBE_ProcessOnce) {
0,
&key_event);
ui::TranslatedKeyEvent key_event3(&key_event, false);
- EXPECT_FALSE(dispatcher->AsWindowTreeHostDelegate()->OnHostKeyEvent(
+ EXPECT_FALSE(dispatcher->AsRootWindowHostDelegate()->OnHostKeyEvent(
&key_event3));
#endif
EXPECT_EQ(1, target.accelerator_pressed_count());
diff --git a/ash/autoclick/autoclick_controller.cc b/ash/autoclick/autoclick_controller.cc
index 7867484..d09cbce 100644
--- a/ash/autoclick/autoclick_controller.cc
+++ b/ash/autoclick/autoclick_controller.cc
@@ -197,8 +197,8 @@ void AutoclickControllerImpl::DoAutoclick() {
click_location,
mouse_event_flags_ | ui::EF_LEFT_MOUSE_BUTTON);
- dispatcher->AsWindowTreeHostDelegate()->OnHostMouseEvent(&press_event);
- dispatcher->AsWindowTreeHostDelegate()->OnHostMouseEvent(&release_event);
+ dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&press_event);
+ dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&release_event);
}
// static.
diff --git a/ash/cancel_mode.cc b/ash/cancel_mode.cc
index 64c352e..df775d2 100644
--- a/ash/cancel_mode.cc
+++ b/ash/cancel_mode.cc
@@ -15,7 +15,7 @@ void DispatchCancelMode() {
Shell::GetAllRootWindowControllers());
for (Shell::RootWindowControllerList::const_iterator i = controllers.begin();
i != controllers.end(); ++i) {
- (*i)->dispatcher()->AsWindowTreeHostDelegate()->OnHostCancelMode();
+ (*i)->dispatcher()->AsRootWindowHostDelegate()->OnHostCancelMode();
}
}
diff --git a/ash/display/display_controller.cc b/ash/display/display_controller.cc
index 6b47921..09927b3 100644
--- a/ash/display/display_controller.cc
+++ b/ash/display/display_controller.cc
@@ -671,7 +671,7 @@ void DisplayController::OnDisplayRemoved(const gfx::Display& display) {
base::MessageLoop::current()->DeleteSoon(FROM_HERE, controller);
}
-void DisplayController::OnWindowTreeHostResized(const aura::RootWindow* root) {
+void DisplayController::OnRootWindowHostResized(const aura::RootWindow* root) {
internal::DisplayManager* display_manager = GetDisplayManager();
gfx::Display display = GetDisplayNearestWindow(root->window());
if (display_manager->UpdateDisplayBounds(
@@ -757,7 +757,7 @@ aura::RootWindow* DisplayController::AddRootWindowForDisplay(
const gfx::Rect& bounds_in_native = display_info.bounds_in_native();
aura::RootWindow::CreateParams params(bounds_in_native);
params.host = Shell::GetInstance()->root_window_host_factory()->
- CreateWindowTreeHost(bounds_in_native);
+ CreateRootWindowHost(bounds_in_native);
aura::RootWindow* root_window = new aura::RootWindow(params);
root_window->window()->SetName(
base::StringPrintf("RootWindow-%d", root_window_count++));
diff --git a/ash/display/display_controller.h b/ash/display/display_controller.h
index dcc78ed..75fe22c 100644
--- a/ash/display/display_controller.h
+++ b/ash/display/display_controller.h
@@ -162,7 +162,7 @@ class ASH_EXPORT DisplayController : public gfx::DisplayObserver,
virtual void OnDisplayRemoved(const gfx::Display& display) OVERRIDE;
// RootWindowObserver overrides:
- virtual void OnWindowTreeHostResized(const aura::RootWindow* root) OVERRIDE;
+ virtual void OnRootWindowHostResized(const aura::RootWindow* root) OVERRIDE;
// aura::DisplayManager::Delegate overrides:
virtual void CreateOrUpdateNonDesktopDisplay(
diff --git a/ash/display/display_info.cc b/ash/display/display_info.cc
index 26d7c997..ec48f31 100644
--- a/ash/display/display_info.cc
+++ b/ash/display/display_info.cc
@@ -45,7 +45,7 @@ DisplayInfo DisplayInfo::CreateFromSpecWithID(const std::string& spec,
static int64 synthesized_display_id = 2200000000LL;
#if defined(OS_WIN)
- gfx::Rect bounds_in_native(aura::WindowTreeHost::GetNativeScreenSize());
+ gfx::Rect bounds_in_native(aura::RootWindowHost::GetNativeScreenSize());
#else
gfx::Rect bounds_in_native(kDefaultHostWindowX, kDefaultHostWindowY,
kDefaultHostWindowWidth, kDefaultHostWindowHeight);
diff --git a/ash/display/mirror_window_controller.cc b/ash/display/mirror_window_controller.cc
index 7dcde64..9a16898 100644
--- a/ash/display/mirror_window_controller.cc
+++ b/ash/display/mirror_window_controller.cc
@@ -164,7 +164,7 @@ void MirrorWindowController::UpdateWindow(const DisplayInfo& display_info) {
const gfx::Rect& bounds_in_native = display_info.bounds_in_native();
aura::RootWindow::CreateParams params(bounds_in_native);
params.host = Shell::GetInstance()->root_window_host_factory()->
- CreateWindowTreeHost(bounds_in_native);
+ CreateRootWindowHost(bounds_in_native);
root_window_.reset(new aura::RootWindow(params));
root_window_->window()->SetName(
base::StringPrintf("MirrorRootWindow-%d", mirror_root_window_count++));
@@ -318,7 +318,7 @@ void MirrorWindowController::SetMirroredCursorVisibility(bool visible) {
visible ? cursor_window_->Show() : cursor_window_->Hide();
}
-void MirrorWindowController::OnWindowTreeHostResized(
+void MirrorWindowController::OnRootWindowHostResized(
const aura::RootWindow* root) {
// Do not use |old_size| as it contains RootWindow's (but not host's) size,
// and this parameter wil be removed soon.
diff --git a/ash/display/mirror_window_controller.h b/ash/display/mirror_window_controller.h
index 86773f1..13460d7 100644
--- a/ash/display/mirror_window_controller.h
+++ b/ash/display/mirror_window_controller.h
@@ -60,7 +60,7 @@ class ASH_EXPORT MirrorWindowController : public aura::RootWindowObserver {
void SetMirroredCursorVisibility(bool visible);
// aura::RootWindowObserver overrides:
- virtual void OnWindowTreeHostResized(const aura::RootWindow* root) OVERRIDE;
+ virtual void OnRootWindowHostResized(const aura::RootWindow* root) OVERRIDE;
private:
friend class test::MirrorWindowTestApi;
diff --git a/ash/display/virtual_keyboard_window_controller.cc b/ash/display/virtual_keyboard_window_controller.cc
index 9a76b0a..7be0e47 100644
--- a/ash/display/virtual_keyboard_window_controller.cc
+++ b/ash/display/virtual_keyboard_window_controller.cc
@@ -41,7 +41,7 @@ void VirtualKeyboardWindowController::UpdateWindow(
const gfx::Rect& bounds_in_native = display_info.bounds_in_native();
aura::RootWindow::CreateParams params(bounds_in_native);
params.host = Shell::GetInstance()->root_window_host_factory()->
- CreateWindowTreeHost(bounds_in_native);
+ CreateRootWindowHost(bounds_in_native);
aura::RootWindow* root_window = new aura::RootWindow(params);
root_window->window()->SetName(
diff --git a/ash/drag_drop/drag_drop_controller_unittest.cc b/ash/drag_drop/drag_drop_controller_unittest.cc
index 8b6044d..baf5acb 100644
--- a/ash/drag_drop/drag_drop_controller_unittest.cc
+++ b/ash/drag_drop/drag_drop_controller_unittest.cc
@@ -737,7 +737,7 @@ TEST_F(DragDropControllerTest, SyntheticEventsDuringDragDrop) {
gfx::Point mouse_move_location = drag_view->bounds().CenterPoint();
ui::MouseEvent mouse_move(ui::ET_MOUSE_MOVED, mouse_move_location,
mouse_move_location, 0);
- Shell::GetPrimaryRootWindow()->GetDispatcher()->AsWindowTreeHostDelegate()->
+ Shell::GetPrimaryRootWindow()->GetDispatcher()->AsRootWindowHostDelegate()->
OnHostMouseEvent(&mouse_move);
}
diff --git a/ash/host/root_window_host_factory.cc b/ash/host/root_window_host_factory.cc
index 27bb614..1f4cb3d 100644
--- a/ash/host/root_window_host_factory.cc
+++ b/ash/host/root_window_host_factory.cc
@@ -8,14 +8,14 @@
namespace {
-class WindowTreeHostFactoryImpl : public ash::WindowTreeHostFactory {
+class RootWindowHostFactoryImpl : public ash::RootWindowHostFactory {
public:
- WindowTreeHostFactoryImpl() {}
+ RootWindowHostFactoryImpl() {}
- // Overridden from WindowTreeHostFactory:
- virtual aura::WindowTreeHost* CreateWindowTreeHost(
+ // Overridden from RootWindowHostFactory:
+ virtual aura::RootWindowHost* CreateRootWindowHost(
const gfx::Rect& initial_bounds) OVERRIDE {
- return aura::WindowTreeHost::Create(initial_bounds);
+ return aura::RootWindowHost::Create(initial_bounds);
}
};
@@ -24,8 +24,8 @@ class WindowTreeHostFactoryImpl : public ash::WindowTreeHostFactory {
namespace ash {
// static
-WindowTreeHostFactory* WindowTreeHostFactory::Create() {
- return new WindowTreeHostFactoryImpl;
+RootWindowHostFactory* RootWindowHostFactory::Create() {
+ return new RootWindowHostFactoryImpl;
}
} // namespace ash
diff --git a/ash/host/root_window_host_factory.h b/ash/host/root_window_host_factory.h
index d956628..d357d9b 100644
--- a/ash/host/root_window_host_factory.h
+++ b/ash/host/root_window_host_factory.h
@@ -9,23 +9,23 @@
#include "ui/gfx/rect.h"
namespace aura {
-class WindowTreeHost;
+class RootWindowHost;
}
namespace ash {
-class ASH_EXPORT WindowTreeHostFactory {
+class ASH_EXPORT RootWindowHostFactory {
public:
- virtual ~WindowTreeHostFactory() {}
+ virtual ~RootWindowHostFactory() {}
- static WindowTreeHostFactory* Create();
+ static RootWindowHostFactory* Create();
- // Creates a new aura::WindowTreeHost. The caller owns the returned value.
- virtual aura::WindowTreeHost* CreateWindowTreeHost(
+ // Creates a new aura::RootWindowHost. The caller owns the returned value.
+ virtual aura::RootWindowHost* CreateRootWindowHost(
const gfx::Rect& initial_bounds) = 0;
protected:
- WindowTreeHostFactory() {}
+ RootWindowHostFactory() {}
};
} // namespace ash
diff --git a/ash/host/root_window_host_factory_win.cc b/ash/host/root_window_host_factory_win.cc
index a072a85..3255f64 100644
--- a/ash/host/root_window_host_factory_win.cc
+++ b/ash/host/root_window_host_factory_win.cc
@@ -12,19 +12,19 @@
namespace {
-class WindowTreeHostFactoryImpl : public ash::WindowTreeHostFactory {
+class RootWindowHostFactoryImpl : public ash::RootWindowHostFactory {
public:
- WindowTreeHostFactoryImpl() {}
+ RootWindowHostFactoryImpl() {}
- // Overridden from WindowTreeHostFactory:
- virtual aura::WindowTreeHost* CreateWindowTreeHost(
+ // Overridden from RootWindowHostFactory:
+ virtual aura::RootWindowHost* CreateRootWindowHost(
const gfx::Rect& initial_bounds) OVERRIDE {
if (base::win::GetVersion() >= base::win::VERSION_WIN8 &&
!CommandLine::ForCurrentProcess()->HasSwitch(
ash::switches::kForceAshToDesktop))
- return aura::RemoteWindowTreeHostWin::Create(initial_bounds);
+ return aura::RemoteRootWindowHostWin::Create(initial_bounds);
- return aura::WindowTreeHost::Create(initial_bounds);
+ return aura::RootWindowHost::Create(initial_bounds);
}
};
@@ -33,8 +33,8 @@ class WindowTreeHostFactoryImpl : public ash::WindowTreeHostFactory {
namespace ash {
// static
-WindowTreeHostFactory* WindowTreeHostFactory::Create() {
- return new WindowTreeHostFactoryImpl;
+RootWindowHostFactory* RootWindowHostFactory::Create() {
+ return new RootWindowHostFactoryImpl;
}
} // namespace ash
diff --git a/ash/shell.cc b/ash/shell.cc
index e7fb428..d5428cf 100644
--- a/ash/shell.cc
+++ b/ash/shell.cc
@@ -761,7 +761,7 @@ void Shell::Init() {
focus_cycler_.reset(new internal::FocusCycler());
screen_position_controller_.reset(new internal::ScreenPositionController);
- root_window_host_factory_.reset(delegate_->CreateWindowTreeHostFactory());
+ root_window_host_factory_.reset(delegate_->CreateRootWindowHostFactory());
display_controller_->Start();
display_controller_->InitPrimaryDisplay();
diff --git a/ash/shell.h b/ash/shell.h
index f11f1ce..1c4e779 100644
--- a/ash/shell.h
+++ b/ash/shell.h
@@ -96,7 +96,7 @@ class NestedDispatcherController;
class NewWindowDelegate;
class PartialMagnificationController;
class PowerButtonController;
-class WindowTreeHostFactory;
+class RootWindowHostFactory;
class ScreenAsh;
class SessionStateDelegate;
class ShelfModel;
@@ -499,7 +499,7 @@ class ASH_EXPORT Shell
return resolution_notification_controller_.get();
}
- WindowTreeHostFactory* root_window_host_factory() {
+ RootWindowHostFactory* root_window_host_factory() {
return root_window_host_factory_.get();
}
@@ -636,7 +636,7 @@ class ASH_EXPORT Shell
scoped_ptr<internal::EventClientImpl> event_client_;
scoped_ptr<internal::EventTransformationHandler>
event_transformation_handler_;
- scoped_ptr<WindowTreeHostFactory> root_window_host_factory_;
+ scoped_ptr<RootWindowHostFactory> root_window_host_factory_;
// An event filter that rewrites or drops an event.
scoped_ptr<internal::EventRewriterEventFilter> event_rewriter_filter_;
diff --git a/ash/shell/shell_delegate_impl.cc b/ash/shell/shell_delegate_impl.cc
index ebe2d83..acc8e3d 100644
--- a/ash/shell/shell_delegate_impl.cc
+++ b/ash/shell/shell_delegate_impl.cc
@@ -165,8 +165,8 @@ ui::MenuModel* ShellDelegateImpl::CreateContextMenu(aura::Window* root) {
return new ContextMenu(root);
}
-WindowTreeHostFactory* ShellDelegateImpl::CreateWindowTreeHostFactory() {
- return WindowTreeHostFactory::Create();
+RootWindowHostFactory* ShellDelegateImpl::CreateRootWindowHostFactory() {
+ return RootWindowHostFactory::Create();
}
base::string16 ShellDelegateImpl::GetProductName() const {
diff --git a/ash/shell/shell_delegate_impl.h b/ash/shell/shell_delegate_impl.h
index 71d080a..500bef2 100644
--- a/ash/shell/shell_delegate_impl.h
+++ b/ash/shell/shell_delegate_impl.h
@@ -57,7 +57,7 @@ class ShellDelegateImpl : public ash::ShellDelegate {
virtual void RecordUserMetricsAction(UserMetricsAction action) OVERRIDE;
virtual ui::MenuModel* CreateContextMenu(
aura::Window* root_window) OVERRIDE;
- virtual WindowTreeHostFactory* CreateWindowTreeHostFactory() OVERRIDE;
+ virtual RootWindowHostFactory* CreateRootWindowHostFactory() OVERRIDE;
virtual base::string16 GetProductName() const OVERRIDE;
private:
diff --git a/ash/shell_delegate.h b/ash/shell_delegate.h
index 2f32a0f..afe8101 100644
--- a/ash/shell_delegate.h
+++ b/ash/shell_delegate.h
@@ -48,7 +48,7 @@ class LauncherDelegate;
struct LauncherItem;
class MediaDelegate;
class NewWindowDelegate;
-class WindowTreeHostFactory;
+class RootWindowHostFactory;
class SessionStateDelegate;
class ShelfModel;
class SystemTrayDelegate;
@@ -189,7 +189,7 @@ class ASH_EXPORT ShellDelegate {
// Creates a root window host factory. Shell takes ownership of the returned
// value.
- virtual WindowTreeHostFactory* CreateWindowTreeHostFactory() = 0;
+ virtual RootWindowHostFactory* CreateRootWindowHostFactory() = 0;
// Get the product name.
virtual base::string16 GetProductName() const = 0;
diff --git a/ash/test/ash_test_base.cc b/ash/test/ash_test_base.cc
index d8f682d2..be27c7d 100644
--- a/ash/test/ash_test_base.cc
+++ b/ash/test/ash_test_base.cc
@@ -140,8 +140,8 @@ void AshTestBase::SetUp() {
CHECK(metro_viewer_host_->LaunchViewerAndWaitForConnection(
win8::test::kDefaultTestAppUserModelId,
L"test_open"));
- aura::RemoteWindowTreeHostWin* root_window_host =
- aura::RemoteWindowTreeHostWin::Instance();
+ aura::RemoteRootWindowHostWin* root_window_host =
+ aura::RemoteRootWindowHostWin::Instance();
CHECK(root_window_host != NULL);
}
#endif
diff --git a/ash/test/test_metro_viewer_process_host.cc b/ash/test/test_metro_viewer_process_host.cc
index 4bdfb6c..3a58433 100644
--- a/ash/test/test_metro_viewer_process_host.cc
+++ b/ash/test/test_metro_viewer_process_host.cc
@@ -23,14 +23,14 @@ TestMetroViewerProcessHost::~TestMetroViewerProcessHost() {
void TestMetroViewerProcessHost::OnChannelError() {
closed_unexpectedly_ = true;
- aura::RemoteWindowTreeHostWin::Instance()->Disconnected();
+ aura::RemoteRootWindowHostWin::Instance()->Disconnected();
}
void TestMetroViewerProcessHost::OnSetTargetSurface(
gfx::NativeViewId target_surface) {
DLOG(INFO) << __FUNCTION__ << ", target_surface = " << target_surface;
HWND hwnd = reinterpret_cast<HWND>(target_surface);
- aura::RemoteWindowTreeHostWin::Instance()->Connected(this, hwnd);
+ aura::RemoteRootWindowHostWin::Instance()->Connected(this, hwnd);
backing_surface_.reset(new AcceleratedSurface(hwnd));
}
diff --git a/ash/test/test_shell_delegate.cc b/ash/test/test_shell_delegate.cc
index 7810b0d..40284d9 100644
--- a/ash/test/test_shell_delegate.cc
+++ b/ash/test/test_shell_delegate.cc
@@ -146,8 +146,8 @@ ui::MenuModel* TestShellDelegate::CreateContextMenu(aura::Window* root) {
return NULL;
}
-WindowTreeHostFactory* TestShellDelegate::CreateWindowTreeHostFactory() {
- return WindowTreeHostFactory::Create();
+RootWindowHostFactory* TestShellDelegate::CreateRootWindowHostFactory() {
+ return RootWindowHostFactory::Create();
}
base::string16 TestShellDelegate::GetProductName() const {
diff --git a/ash/test/test_shell_delegate.h b/ash/test/test_shell_delegate.h
index 29e88d7..3edd95c 100644
--- a/ash/test/test_shell_delegate.h
+++ b/ash/test/test_shell_delegate.h
@@ -52,7 +52,7 @@ class TestShellDelegate : public ShellDelegate {
virtual aura::client::UserActionClient* CreateUserActionClient() OVERRIDE;
virtual void RecordUserMetricsAction(UserMetricsAction action) OVERRIDE;
virtual ui::MenuModel* CreateContextMenu(aura::Window* root) OVERRIDE;
- virtual WindowTreeHostFactory* CreateWindowTreeHostFactory() OVERRIDE;
+ virtual RootWindowHostFactory* CreateRootWindowHostFactory() OVERRIDE;
virtual base::string16 GetProductName() const OVERRIDE;
int num_exit_requests() const { return num_exit_requests_; }
diff --git a/ash/wm/caption_buttons/frame_maximize_button_unittest.cc b/ash/wm/caption_buttons/frame_maximize_button_unittest.cc
index d51738b..c2ea2e8 100644
--- a/ash/wm/caption_buttons/frame_maximize_button_unittest.cc
+++ b/ash/wm/caption_buttons/frame_maximize_button_unittest.cc
@@ -550,7 +550,7 @@ TEST_F(FrameMaximizeButtonTest, MaximizeTap) {
button_pos,
kTouchId,
ui::EventTimeForNow());
- dispatcher->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
button_pos.Offset(9, 8);
ui::TouchEvent release(
@@ -558,7 +558,7 @@ TEST_F(FrameMaximizeButtonTest, MaximizeTap) {
button_pos,
kTouchId,
press.time_stamp() + base::TimeDelta::FromMilliseconds(50));
- dispatcher->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
ui::GestureConfiguration::set_default_radius(touch_default_radius);
}
diff --git a/ash/wm/lock_state_controller.cc b/ash/wm/lock_state_controller.cc
index 2fa948b..9b5a5b5 100644
--- a/ash/wm/lock_state_controller.cc
+++ b/ash/wm/lock_state_controller.cc
@@ -287,7 +287,7 @@ void LockStateController::SetLockScreenDisplayedCallback(
lock_screen_displayed_callback_ = callback;
}
-void LockStateController::OnWindowTreeHostCloseRequested(
+void LockStateController::OnRootWindowHostCloseRequested(
const aura::RootWindow*) {
Shell::GetInstance()->delegate()->Exit();
}
diff --git a/ash/wm/lock_state_controller.h b/ash/wm/lock_state_controller.h
index bcfd64f..c2e7a6a 100644
--- a/ash/wm/lock_state_controller.h
+++ b/ash/wm/lock_state_controller.h
@@ -198,7 +198,7 @@ class ASH_EXPORT LockStateController : public aura::RootWindowObserver,
void SetLockScreenDisplayedCallback(const base::Closure& callback);
// RootWindowObserver override:
- virtual void OnWindowTreeHostCloseRequested(
+ virtual void OnRootWindowHostCloseRequested(
const aura::RootWindow* root) OVERRIDE;
// ShellObserver overrides:
diff --git a/ash/wm/sticky_keys.cc b/ash/wm/sticky_keys.cc
index 8dbee55..10e828a 100644
--- a/ash/wm/sticky_keys.cc
+++ b/ash/wm/sticky_keys.cc
@@ -54,7 +54,7 @@ StickyKeysHandlerDelegateImpl::~StickyKeysHandlerDelegateImpl() {
void StickyKeysHandlerDelegateImpl::DispatchKeyEvent(ui::KeyEvent* event,
aura::Window* target) {
DCHECK(target);
- target->GetDispatcher()->AsWindowTreeHostDelegate()->OnHostKeyEvent(event);
+ target->GetDispatcher()->AsRootWindowHostDelegate()->OnHostKeyEvent(event);
}
void StickyKeysHandlerDelegateImpl::DispatchMouseEvent(ui::MouseEvent* event,
@@ -62,7 +62,7 @@ void StickyKeysHandlerDelegateImpl::DispatchMouseEvent(ui::MouseEvent* event,
DCHECK(target);
// We need to send a new, untransformed mouse event to the host.
ui::MouseEvent release_event(*event, target, target->GetRootWindow());
- target->GetDispatcher()->AsWindowTreeHostDelegate()
+ target->GetDispatcher()->AsRootWindowHostDelegate()
->OnHostMouseEvent(&release_event);
}
diff --git a/ash/wm/system_gesture_event_filter_unittest.cc b/ash/wm/system_gesture_event_filter_unittest.cc
index 2a87892..66cc681 100644
--- a/ash/wm/system_gesture_event_filter_unittest.cc
+++ b/ash/wm/system_gesture_event_filter_unittest.cc
@@ -255,7 +255,7 @@ TEST_P(SystemGestureEventFilterTest, LongPressAffordanceStateOnCaptureLoss) {
gfx::Point(10, 10),
kTouchId,
ui::EventTimeForNow());
- root_window->GetDispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(
+ root_window->GetDispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(
&press);
EXPECT_TRUE(window1->HasCapture());
diff --git a/ash/wm/window_manager_unittest.cc b/ash/wm/window_manager_unittest.cc
index 30d2bd7..65c2f97 100644
--- a/ash/wm/window_manager_unittest.cc
+++ b/ash/wm/window_manager_unittest.cc
@@ -187,19 +187,19 @@ TEST_F(WindowManagerTest, Focus) {
// The key press should be sent to the focused sub-window.
ui::KeyEvent keyev(ui::ET_KEY_PRESSED, ui::VKEY_E, 0, false);
- dispatcher->AsWindowTreeHostDelegate()->OnHostKeyEvent(&keyev);
+ dispatcher->AsRootWindowHostDelegate()->OnHostKeyEvent(&keyev);
EXPECT_EQ(ui::VKEY_E, w121delegate->last_key_code());
// Touch on a sub-window (w122) to focus it.
gfx::Point click_point = w122->bounds().CenterPoint();
aura::Window::ConvertPointToTarget(w122->parent(), root_window, &click_point);
ui::TouchEvent touchev(ui::ET_TOUCH_PRESSED, click_point, 0, getTime());
- dispatcher->AsWindowTreeHostDelegate()->OnHostTouchEvent(&touchev);
+ dispatcher->AsRootWindowHostDelegate()->OnHostTouchEvent(&touchev);
focus_client = aura::client::GetFocusClient(w122.get());
EXPECT_EQ(w122.get(), focus_client->GetFocusedWindow());
// The key press should be sent to the focused sub-window.
- dispatcher->AsWindowTreeHostDelegate()->OnHostKeyEvent(&keyev);
+ dispatcher->AsRootWindowHostDelegate()->OnHostKeyEvent(&keyev);
EXPECT_EQ(ui::VKEY_E, w122delegate->last_key_code());
// Hiding the focused window will set the focus to its parent if
@@ -236,7 +236,7 @@ TEST_F(WindowManagerTest, Focus) {
EXPECT_EQ(aura::client::GetFocusClient(w12.get()),
aura::client::GetFocusClient(w123.get()));
EXPECT_EQ(NULL, aura::client::GetFocusClient(w12.get())->GetFocusedWindow());
- EXPECT_FALSE(dispatcher->AsWindowTreeHostDelegate()->OnHostKeyEvent(&keyev));
+ EXPECT_FALSE(dispatcher->AsRootWindowHostDelegate()->OnHostKeyEvent(&keyev));
// Set the focus back to w123
aura::client::SetActivationDelegate(w1.get(), NULL);
@@ -250,7 +250,7 @@ TEST_F(WindowManagerTest, Focus) {
// parent window is not focusable.
w12->RemoveChild(w123.get());
EXPECT_EQ(NULL, aura::client::GetFocusClient(w123.get()));
- EXPECT_FALSE(dispatcher->AsWindowTreeHostDelegate()->OnHostKeyEvent(&keyev));
+ EXPECT_FALSE(dispatcher->AsRootWindowHostDelegate()->OnHostKeyEvent(&keyev));
}
// Various assertion testing for activating windows.
@@ -442,7 +442,7 @@ TEST_F(WindowManagerTest, ActivateOnTouch) {
ui::TouchEvent touchev1(ui::ET_TOUCH_PRESSED, press_point, 0, getTime());
aura::WindowEventDispatcher* dispatcher = root_window->GetDispatcher();
- dispatcher->AsWindowTreeHostDelegate()->OnHostTouchEvent(&touchev1);
+ dispatcher->AsRootWindowHostDelegate()->OnHostTouchEvent(&touchev1);
// Window2 should have become active.
EXPECT_TRUE(wm::IsActiveWindow(w2.get()));
@@ -459,7 +459,7 @@ TEST_F(WindowManagerTest, ActivateOnTouch) {
aura::Window::ConvertPointToTarget(w1->parent(), root_window, &press_point);
d1.set_activate(false);
ui::TouchEvent touchev2(ui::ET_TOUCH_PRESSED, press_point, 1, getTime());
- dispatcher->AsWindowTreeHostDelegate()->OnHostTouchEvent(&touchev2);
+ dispatcher->AsRootWindowHostDelegate()->OnHostTouchEvent(&touchev2);
// Window2 should still be active and focused.
EXPECT_TRUE(wm::IsActiveWindow(w2.get()));
@@ -510,14 +510,14 @@ TEST_F(WindowManagerTest, MouseEventCursors) {
// Resize edges and corners show proper cursors.
window_delegate.set_hittest_code(HTBOTTOM);
ui::MouseEvent move1(ui::ET_MOUSE_MOVED, point1, point1, 0x0);
- dispatcher->AsWindowTreeHostDelegate()->OnHostMouseEvent(&move1);
+ dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&move1);
EXPECT_EQ(ui::kCursorSouthResize, dispatcher->last_cursor().native_type());
}
{
window_delegate.set_hittest_code(HTBOTTOMLEFT);
ui::MouseEvent move2(ui::ET_MOUSE_MOVED, point2, point2, 0x0);
- dispatcher->AsWindowTreeHostDelegate()->OnHostMouseEvent(&move2);
+ dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&move2);
EXPECT_EQ(ui::kCursorSouthWestResize,
dispatcher->last_cursor().native_type());
}
@@ -525,7 +525,7 @@ TEST_F(WindowManagerTest, MouseEventCursors) {
{
window_delegate.set_hittest_code(HTBOTTOMRIGHT);
ui::MouseEvent move1(ui::ET_MOUSE_MOVED, point1, point1, 0x0);
- dispatcher->AsWindowTreeHostDelegate()->OnHostMouseEvent(&move1);
+ dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&move1);
EXPECT_EQ(ui::kCursorSouthEastResize,
dispatcher->last_cursor().native_type());
}
@@ -533,28 +533,28 @@ TEST_F(WindowManagerTest, MouseEventCursors) {
{
window_delegate.set_hittest_code(HTLEFT);
ui::MouseEvent move2(ui::ET_MOUSE_MOVED, point2, point2, 0x0);
- dispatcher->AsWindowTreeHostDelegate()->OnHostMouseEvent(&move2);
+ dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&move2);
EXPECT_EQ(ui::kCursorWestResize, dispatcher->last_cursor().native_type());
}
{
window_delegate.set_hittest_code(HTRIGHT);
ui::MouseEvent move1(ui::ET_MOUSE_MOVED, point1, point1, 0x0);
- dispatcher->AsWindowTreeHostDelegate()->OnHostMouseEvent(&move1);
+ dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&move1);
EXPECT_EQ(ui::kCursorEastResize, dispatcher->last_cursor().native_type());
}
{
window_delegate.set_hittest_code(HTTOP);
ui::MouseEvent move2(ui::ET_MOUSE_MOVED, point2, point2, 0x0);
- dispatcher->AsWindowTreeHostDelegate()->OnHostMouseEvent(&move2);
+ dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&move2);
EXPECT_EQ(ui::kCursorNorthResize, dispatcher->last_cursor().native_type());
}
{
window_delegate.set_hittest_code(HTTOPLEFT);
ui::MouseEvent move1(ui::ET_MOUSE_MOVED, point1, point1, 0x0);
- dispatcher->AsWindowTreeHostDelegate()->OnHostMouseEvent(&move1);
+ dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&move1);
EXPECT_EQ(ui::kCursorNorthWestResize,
dispatcher->last_cursor().native_type());
}
@@ -562,7 +562,7 @@ TEST_F(WindowManagerTest, MouseEventCursors) {
{
window_delegate.set_hittest_code(HTTOPRIGHT);
ui::MouseEvent move2(ui::ET_MOUSE_MOVED, point2, point2, 0x0);
- dispatcher->AsWindowTreeHostDelegate()->OnHostMouseEvent(&move2);
+ dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&move2);
EXPECT_EQ(ui::kCursorNorthEastResize,
dispatcher->last_cursor().native_type());
}
@@ -571,7 +571,7 @@ TEST_F(WindowManagerTest, MouseEventCursors) {
// Client area uses null cursor.
window_delegate.set_hittest_code(HTCLIENT);
ui::MouseEvent move1(ui::ET_MOUSE_MOVED, point1, point1, 0x0);
- dispatcher->AsWindowTreeHostDelegate()->OnHostMouseEvent(&move1);
+ dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&move1);
EXPECT_EQ(ui::kCursorNull, dispatcher->last_cursor().native_type());
}
}
@@ -608,13 +608,13 @@ TEST_F(WindowManagerTest, MAYBE_TransformActivate) {
miss_point,
ui::EF_LEFT_MOUSE_BUTTON);
aura::WindowEventDispatcher* dispatcher = root_window->GetDispatcher();
- dispatcher->AsWindowTreeHostDelegate()->OnHostMouseEvent(&mouseev1);
+ dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&mouseev1);
EXPECT_EQ(NULL, aura::client::GetFocusClient(w1.get())->GetFocusedWindow());
ui::MouseEvent mouseup(ui::ET_MOUSE_RELEASED,
miss_point,
miss_point,
ui::EF_LEFT_MOUSE_BUTTON);
- dispatcher->AsWindowTreeHostDelegate()->OnHostMouseEvent(&mouseup);
+ dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&mouseup);
gfx::Point hit_point(5, 15);
transform.TransformPoint(&hit_point);
@@ -622,7 +622,7 @@ TEST_F(WindowManagerTest, MAYBE_TransformActivate) {
hit_point,
hit_point,
ui::EF_LEFT_MOUSE_BUTTON);
- dispatcher->AsWindowTreeHostDelegate()->OnHostMouseEvent(&mouseev2);
+ dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&mouseev2);
EXPECT_TRUE(wm::IsActiveWindow(w1.get()));
EXPECT_EQ(w1.get(),
aura::client::GetFocusClient(w1.get())->GetFocusedWindow());
@@ -655,10 +655,10 @@ TEST_F(WindowManagerTest, AdditionalFilters) {
// Dispatches mouse and keyboard events.
ui::KeyEvent key_event(ui::ET_KEY_PRESSED, ui::VKEY_A, 0, false);
aura::WindowEventDispatcher* dispatcher = root_window->GetDispatcher();
- dispatcher->AsWindowTreeHostDelegate()->OnHostKeyEvent(&key_event);
+ dispatcher->AsRootWindowHostDelegate()->OnHostKeyEvent(&key_event);
ui::MouseEvent mouse_pressed(
ui::ET_MOUSE_PRESSED, gfx::Point(0, 0), gfx::Point(0, 0), 0x0);
- dispatcher->AsWindowTreeHostDelegate()->OnHostMouseEvent(&mouse_pressed);
+ dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&mouse_pressed);
// Both filters should get the events.
EXPECT_EQ(1, f1->num_key_events());
@@ -674,10 +674,10 @@ TEST_F(WindowManagerTest, AdditionalFilters) {
f1->set_mouse_event_handling_result(ui::ER_CONSUMED);
// Dispatches events.
- dispatcher->AsWindowTreeHostDelegate()->OnHostKeyEvent(&key_event);
+ dispatcher->AsRootWindowHostDelegate()->OnHostKeyEvent(&key_event);
ui::MouseEvent mouse_released(
ui::ET_MOUSE_RELEASED, gfx::Point(0, 0), gfx::Point(0, 0), 0x0);
- dispatcher->AsWindowTreeHostDelegate()->OnHostMouseEvent(&mouse_released);
+ dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&mouse_released);
// f1 should still get the events but f2 no longer gets them.
EXPECT_EQ(1, f1->num_key_events());
@@ -692,8 +692,8 @@ TEST_F(WindowManagerTest, AdditionalFilters) {
env_filter->RemoveHandler(f1.get());
// Dispatches events.
- dispatcher->AsWindowTreeHostDelegate()->OnHostKeyEvent(&key_event);
- dispatcher->AsWindowTreeHostDelegate()->OnHostMouseEvent(&mouse_pressed);
+ dispatcher->AsRootWindowHostDelegate()->OnHostKeyEvent(&key_event);
+ dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&mouse_pressed);
// f1 should get no events since it's out and f2 should get them.
EXPECT_EQ(0, f1->num_key_events());
diff --git a/ash/wm/workspace/workspace_event_handler_unittest.cc b/ash/wm/workspace/workspace_event_handler_unittest.cc
index 887e914..feec4bd 100644
--- a/ash/wm/workspace/workspace_event_handler_unittest.cc
+++ b/ash/wm/workspace/workspace_event_handler_unittest.cc
@@ -273,11 +273,11 @@ TEST_F(WorkspaceEventHandlerTest, DoubleClickCaptionTogglesMaximize) {
generator.current_location(),
ui::EF_MIDDLE_MOUSE_BUTTON | ui::EF_IS_DOUBLE_CLICK);
aura::WindowEventDispatcher* dispatcher = root->GetDispatcher();
- dispatcher->AsWindowTreeHostDelegate()->OnHostMouseEvent(&press);
+ dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&press);
ui::MouseEvent release(ui::ET_MOUSE_RELEASED, generator.current_location(),
generator.current_location(),
ui::EF_IS_DOUBLE_CLICK);
- dispatcher->AsWindowTreeHostDelegate()->OnHostMouseEvent(&release);
+ dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&release);
EXPECT_FALSE(window_state->IsMaximized());
EXPECT_EQ("1,2 30x40", window->bounds().ToString());
diff --git a/chrome/browser/chromeos/system_key_event_listener.cc b/chrome/browser/chromeos/system_key_event_listener.cc
index 80a2324..d148977 100644
--- a/chrome/browser/chromeos/system_key_event_listener.cc
+++ b/chrome/browser/chromeos/system_key_event_listener.cc
@@ -126,7 +126,7 @@ bool SystemKeyEventListener::ProcessedXEvent(XEvent* xevent) {
input_method::InputMethodManager::Get();
if (xevent->type == xkb_event_base_) {
- // TODO(yusukes): Move this part to aura::WindowTreeHost.
+ // TODO(yusukes): Move this part to aura::RootWindowHost.
XkbEvent* xkey_event = reinterpret_cast<XkbEvent*>(xevent);
if (xkey_event->any.xkb_type == XkbStateNotify) {
const bool caps_lock_enabled = (xkey_event->state.locked_mods) & LockMask;
diff --git a/chrome/browser/extensions/api/bookmarks/bookmarks_api.cc b/chrome/browser/extensions/api/bookmarks/bookmarks_api.cc
index 0ab5eb0..f946556 100644
--- a/chrome/browser/extensions/api/bookmarks/bookmarks_api.cc
+++ b/chrome/browser/extensions/api/bookmarks/bookmarks_api.cc
@@ -924,7 +924,7 @@ void BookmarksIOFunction::ShowSelectFileDialog(
#if defined(OS_WIN) && defined(USE_AURA)
if (!owning_window &&
chrome::GetActiveDesktop() == chrome::HOST_DESKTOP_TYPE_ASH)
- owning_window = aura::RemoteWindowTreeHostWin::Instance()->GetAshWindow();
+ owning_window = aura::RemoteRootWindowHostWin::Instance()->GetAshWindow();
#endif
// |web_contents| can be NULL (for background pages), which is fine. In such
// a case if file-selection dialogs are forbidden by policy, we will not
diff --git a/chrome/browser/metro_viewer/chrome_metro_viewer_process_host_aurawin.cc b/chrome/browser/metro_viewer/chrome_metro_viewer_process_host_aurawin.cc
index c7130fd..8534725 100644
--- a/chrome/browser/metro_viewer/chrome_metro_viewer_process_host_aurawin.cc
+++ b/chrome/browser/metro_viewer/chrome_metro_viewer_process_host_aurawin.cc
@@ -76,7 +76,7 @@ void ChromeMetroViewerProcessHost::OnChannelError() {
// connected.
::SetEnvironmentVariableA(env_vars::kMetroConnected, NULL);
- aura::RemoteWindowTreeHostWin::Instance()->Disconnected();
+ aura::RemoteRootWindowHostWin::Instance()->Disconnected();
g_browser_process->ReleaseModule();
CloseOpenAshBrowsers();
chrome::CloseAsh();
@@ -107,7 +107,7 @@ void ChromeMetroViewerProcessHost::OnSetTargetSurface(
gfx::NativeViewId target_surface) {
HWND hwnd = reinterpret_cast<HWND>(target_surface);
// Tell our root window host that the viewer has connected.
- aura::RemoteWindowTreeHostWin::Instance()->Connected(this, hwnd);
+ aura::RemoteRootWindowHostWin::Instance()->Connected(this, hwnd);
// Now start the Ash shell environment.
chrome::OpenAsh();
ash::Shell::GetInstance()->CreateLauncher();
diff --git a/chrome/browser/plugins/plugin_infobar_delegates.cc b/chrome/browser/plugins/plugin_infobar_delegates.cc
index 4a8af75..ea4eb4b 100644
--- a/chrome/browser/plugins/plugin_infobar_delegates.cc
+++ b/chrome/browser/plugins/plugin_infobar_delegates.cc
@@ -504,7 +504,7 @@ void LaunchDesktopInstanceHelper(const string16& url) {
// Actually launching the process needs to happen in the metro viewer,
// otherwise it won't automatically transition to desktop. So we have
// to send an IPC to the viewer to do the ShellExecute.
- aura::RemoteWindowTreeHostWin::Instance()->HandleOpenURLOnDesktop(
+ aura::RemoteRootWindowHostWin::Instance()->HandleOpenURLOnDesktop(
shortcut_path, url);
}
#endif
diff --git a/chrome/browser/ui/ash/chrome_shell_delegate.cc b/chrome/browser/ui/ash/chrome_shell_delegate.cc
index d0cc982..ade8a8e 100644
--- a/chrome/browser/ui/ash/chrome_shell_delegate.cc
+++ b/chrome/browser/ui/ash/chrome_shell_delegate.cc
@@ -305,8 +305,8 @@ ui::MenuModel* ChromeShellDelegate::CreateContextMenu(aura::Window* root) {
return new LauncherContextMenu(launcher_delegate_, root);
}
-ash::WindowTreeHostFactory* ChromeShellDelegate::CreateWindowTreeHostFactory() {
- return ash::WindowTreeHostFactory::Create();
+ash::RootWindowHostFactory* ChromeShellDelegate::CreateRootWindowHostFactory() {
+ return ash::RootWindowHostFactory::Create();
}
string16 ChromeShellDelegate::GetProductName() const {
diff --git a/chrome/browser/ui/ash/chrome_shell_delegate.h b/chrome/browser/ui/ash/chrome_shell_delegate.h
index 2a086bd..1fd08b59 100644
--- a/chrome/browser/ui/ash/chrome_shell_delegate.h
+++ b/chrome/browser/ui/ash/chrome_shell_delegate.h
@@ -59,7 +59,7 @@ class ChromeShellDelegate : public ash::ShellDelegate,
virtual aura::client::UserActionClient* CreateUserActionClient() OVERRIDE;
virtual void RecordUserMetricsAction(ash::UserMetricsAction action) OVERRIDE;
virtual ui::MenuModel* CreateContextMenu(aura::Window* root) OVERRIDE;
- virtual ash::WindowTreeHostFactory* CreateWindowTreeHostFactory() OVERRIDE;
+ virtual ash::RootWindowHostFactory* CreateRootWindowHostFactory() OVERRIDE;
virtual string16 GetProductName() const OVERRIDE;
// content::NotificationObserver override:
diff --git a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_win.cc b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_win.cc
index 2494560..443a11e 100644
--- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_win.cc
+++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_win.cc
@@ -44,7 +44,7 @@ bool ChromeLauncherController::LaunchedInNativeDesktop(
profile_->GetPath().BaseName().AsUTF8Unsafe().c_str(),
switches::kAppId,
app_id.c_str());
- aura::RemoteWindowTreeHostWin::Instance()->HandleOpenURLOnDesktop(
+ aura::RemoteRootWindowHostWin::Instance()->HandleOpenURLOnDesktop(
exe_path, UTF8ToUTF16(spec));
return true;
}
diff --git a/chrome/browser/ui/aura/active_desktop_monitor.cc b/chrome/browser/ui/aura/active_desktop_monitor.cc
index 32ac371..736d848 100644
--- a/chrome/browser/ui/aura/active_desktop_monitor.cc
+++ b/chrome/browser/ui/aura/active_desktop_monitor.cc
@@ -39,14 +39,14 @@ chrome::HostDesktopType ActiveDesktopMonitor::GetLastActivatedDesktopType() {
// static
bool ActiveDesktopMonitor::IsDesktopWindow(aura::RootWindow* root_window) {
- // Only windows hosted by a DesktopWindowTreeHost implementation can be mapped
+ // Only windows hosted by a DesktopRootWindowHost implementation can be mapped
// back to a content Window. All others, therefore, must be the root window
// for an Ash display.
#if defined(OS_WIN)
- return views::DesktopWindowTreeHostWin::GetContentWindowForHWND(
+ return views::DesktopRootWindowHostWin::GetContentWindowForHWND(
root_window->host()->GetAcceleratedWidget()) != NULL;
#elif defined(USE_X11)
- return views::DesktopWindowTreeHostX11::GetContentWindowForXID(
+ return views::DesktopRootWindowHostX11::GetContentWindowForXID(
root_window->host()->GetAcceleratedWidget()) != NULL;
#else
NOTREACHED();
diff --git a/chrome/browser/ui/aura/active_desktop_monitor.h b/chrome/browser/ui/aura/active_desktop_monitor.h
index 9272016..1ae149b3 100644
--- a/chrome/browser/ui/aura/active_desktop_monitor.h
+++ b/chrome/browser/ui/aura/active_desktop_monitor.h
@@ -11,7 +11,7 @@
#include "ui/aura/env_observer.h"
// Tracks the most-recently activated host desktop type by observing
-// WindowTreeHost activations.
+// RootWindowHost activations.
class ActiveDesktopMonitor : public aura::EnvObserver {
public:
// Constructs an ActiveDesktopMonitor which initially uses |initial_desktop|
@@ -20,13 +20,13 @@ class ActiveDesktopMonitor : public aura::EnvObserver {
virtual ~ActiveDesktopMonitor();
// Returns the host desktop type of the most-recently activated
- // WindowTreeHost. This desktop type may no longer exist (e.g., the Ash
+ // RootWindowHost. This desktop type may no longer exist (e.g., the Ash
// desktop may have closed since being active, and no RWHs on the native
// desktop have yet been activated).
static chrome::HostDesktopType GetLastActivatedDesktopType();
private:
- // Returns true if |root_window| is hosted by a DesktopWindowTreeHost.
+ // Returns true if |root_window| is hosted by a DesktopRootWindowHost.
static bool IsDesktopWindow(aura::RootWindow* root_window);
// aura::EnvObserver methods.
diff --git a/chrome/browser/ui/aura/tabs/dock_info_auralinux.cc b/chrome/browser/ui/aura/tabs/dock_info_auralinux.cc
index 298e72b..47dce8c 100644
--- a/chrome/browser/ui/aura/tabs/dock_info_auralinux.cc
+++ b/chrome/browser/ui/aura/tabs/dock_info_auralinux.cc
@@ -187,7 +187,7 @@ gfx::NativeView DockInfo::GetLocalProcessWindowAtPoint(
// is.
XID xid =
LocalProcessWindowFinder::GetProcessWindowAtPoint(screen_point, ignore);
- return views::DesktopWindowTreeHostX11::GetContentWindowForXID(xid);
+ return views::DesktopRootWindowHostX11::GetContentWindowForXID(xid);
}
#else
// static
diff --git a/chrome/browser/ui/views/external_tab_container_win.cc b/chrome/browser/ui/views/external_tab_container_win.cc
index e7c1ddc..16a1387 100644
--- a/chrome/browser/ui/views/external_tab_container_win.cc
+++ b/chrome/browser/ui/views/external_tab_container_win.cc
@@ -197,7 +197,7 @@ typedef ATL::CWinTraits<WS_POPUP | WS_CLIPSIBLINGS | WS_CLIPCHILDREN,
ContainerWindowHWNDTraits;
// A window placed in the parent/child hierarchy between the host (e.g., a
-// ChromeFrameAutomationClient window) and the Aura DesktopWindowTreeHostWin.
+// ChromeFrameAutomationClient window) and the Aura DesktopRootWindowHostWin.
// This non-activatable window is necessary to prevent focus from warping from
// the DRWHW up to the CFAC window during reparenting. This is not needed in the
// non-Aura case because the ExternalTabContainer's primary widget takes this
@@ -279,32 +279,32 @@ class ContainerWindow : public ATL::CWindowImpl<ContainerWindow,
DISALLOW_COPY_AND_ASSIGN(ContainerWindow);
};
-// A specialization of DesktopWindowTreeHost for an external tab container that
+// A specialization of DesktopRootWindowHost for an external tab container that
// saves and restores focus as the ETC is blurred and focused. DRWHW ordinarily
// does this during window activation and deactivation. Since the ETC is a child
// window, it does not receive activation messages.
-class ExternalTabWindowTreeHost : public views::DesktopWindowTreeHostWin {
+class ExternalTabRootWindowHost : public views::DesktopRootWindowHostWin {
public:
- ExternalTabWindowTreeHost(
+ ExternalTabRootWindowHost(
views::internal::NativeWidgetDelegate* native_widget_delegate,
views::DesktopNativeWidgetAura* desktop_native_widget_aura)
- : views::DesktopWindowTreeHostWin(native_widget_delegate,
+ : views::DesktopRootWindowHostWin(native_widget_delegate,
desktop_native_widget_aura) {}
protected:
// HWNDMessageHandlerDelegate methods:
virtual void HandleNativeFocus(HWND last_focused_window) OVERRIDE {
- views::DesktopWindowTreeHostWin::HandleNativeFocus(last_focused_window);
+ views::DesktopRootWindowHostWin::HandleNativeFocus(last_focused_window);
RestoreFocusOnActivate();
}
virtual void HandleNativeBlur(HWND focused_window) OVERRIDE {
SaveFocusOnDeactivate();
- views::DesktopWindowTreeHostWin::HandleNativeBlur(focused_window);
+ views::DesktopRootWindowHostWin::HandleNativeBlur(focused_window);
}
private:
- DISALLOW_COPY_AND_ASSIGN(ExternalTabWindowTreeHost);
+ DISALLOW_COPY_AND_ASSIGN(ExternalTabRootWindowHost);
};
#endif
@@ -373,7 +373,7 @@ bool ExternalTabContainerWin::Init(Profile* profile,
params.bounds = bounds;
#if defined(USE_AURA)
// Create the window that sits between the parent (most likely a
- // ChromeFrameAutomationClient) and the DesktopWindowTreeHostWin.
+ // ChromeFrameAutomationClient) and the DesktopRootWindowHostWin.
tab_container_window_ =
(new ContainerWindow(HWND_DESKTOP, params.bounds))->AsWeakPtr();
@@ -381,7 +381,7 @@ bool ExternalTabContainerWin::Init(Profile* profile,
new views::DesktopNativeWidgetAura(widget_);
params.native_widget = native_widget;
params.desktop_root_window_host =
- new ExternalTabWindowTreeHost(widget_, native_widget);
+ new ExternalTabRootWindowHost(widget_, native_widget);
params.type = views::Widget::InitParams::TYPE_WINDOW_FRAMELESS;
params.opacity = views::Widget::InitParams::OPAQUE_WINDOW;
#endif
diff --git a/chrome/browser/ui/views/frame/browser_desktop_root_window_host.h b/chrome/browser/ui/views/frame/browser_desktop_root_window_host.h
index 0d50a9b..70cbcf2 100644
--- a/chrome/browser/ui/views/frame/browser_desktop_root_window_host.h
+++ b/chrome/browser/ui/views/frame/browser_desktop_root_window_host.h
@@ -12,24 +12,24 @@ class Rect;
}
namespace views {
class DesktopNativeWidgetAura;
-class DesktopWindowTreeHost;
+class DesktopRootWindowHost;
namespace internal {
class NativeWidgetDelegate;
}
}
// Interface to a platform specific browser frame implementation. The object
-// implementing this interface will also implement views::DesktopWindowTreeHost.
-class BrowserDesktopWindowTreeHost {
+// implementing this interface will also implement views::DesktopRootWindowHost.
+class BrowserDesktopRootWindowHost {
public:
// BDRWH is owned by the RootWindow.
- static BrowserDesktopWindowTreeHost* CreateBrowserDesktopWindowTreeHost(
+ static BrowserDesktopRootWindowHost* CreateBrowserDesktopRootWindowHost(
views::internal::NativeWidgetDelegate* native_widget_delegate,
views::DesktopNativeWidgetAura* desktop_native_widget_aura,
BrowserView* browser_view,
BrowserFrame* browser_frame);
- virtual views::DesktopWindowTreeHost* AsDesktopWindowTreeHost() = 0;
+ virtual views::DesktopRootWindowHost* AsDesktopRootWindowHost() = 0;
virtual int GetMinimizeButtonOffset() const = 0;
diff --git a/chrome/browser/ui/views/frame/browser_desktop_root_window_host_win.cc b/chrome/browser/ui/views/frame/browser_desktop_root_window_host_win.cc
index 43375ae..951106e 100644
--- a/chrome/browser/ui/views/frame/browser_desktop_root_window_host_win.cc
+++ b/chrome/browser/ui/views/frame/browser_desktop_root_window_host_win.cc
@@ -31,7 +31,7 @@ const int kClientEdgeThickness = 3;
const int kDWMFrameTopOffset = 3;
// DesktopThemeProvider maps resource ids using MapThemeImage(). This is
-// necessary for BrowserDesktopWindowTreeHostWin so that it uses the windows
+// necessary for BrowserDesktopRootWindowHostWin so that it uses the windows
// theme images rather than the ash theme images.
class DesktopThemeProvider : public ui::ThemeProvider {
public:
@@ -72,14 +72,14 @@ class DesktopThemeProvider : public ui::ThemeProvider {
} // namespace
////////////////////////////////////////////////////////////////////////////////
-// BrowserDesktopWindowTreeHostWin, public:
+// BrowserDesktopRootWindowHostWin, public:
-BrowserDesktopWindowTreeHostWin::BrowserDesktopWindowTreeHostWin(
+BrowserDesktopRootWindowHostWin::BrowserDesktopRootWindowHostWin(
views::internal::NativeWidgetDelegate* native_widget_delegate,
views::DesktopNativeWidgetAura* desktop_native_widget_aura,
BrowserView* browser_view,
BrowserFrame* browser_frame)
- : DesktopWindowTreeHostWin(native_widget_delegate,
+ : DesktopRootWindowHostWin(native_widget_delegate,
desktop_native_widget_aura),
browser_view_(browser_view),
browser_frame_(browser_frame),
@@ -90,10 +90,10 @@ BrowserDesktopWindowTreeHostWin::BrowserDesktopWindowTreeHostWin(
browser_frame->SetThemeProvider(theme_provider.Pass());
}
-BrowserDesktopWindowTreeHostWin::~BrowserDesktopWindowTreeHostWin() {
+BrowserDesktopRootWindowHostWin::~BrowserDesktopRootWindowHostWin() {
}
-views::NativeMenuWin* BrowserDesktopWindowTreeHostWin::GetSystemMenu() {
+views::NativeMenuWin* BrowserDesktopRootWindowHostWin::GetSystemMenu() {
if (!system_menu_.get()) {
SystemMenuInsertionDelegateWin insertion_delegate;
system_menu_.reset(
@@ -105,25 +105,25 @@ views::NativeMenuWin* BrowserDesktopWindowTreeHostWin::GetSystemMenu() {
}
////////////////////////////////////////////////////////////////////////////////
-// BrowserDesktopWindowTreeHostWin, BrowserDesktopWindowTreeHost implementation:
+// BrowserDesktopRootWindowHostWin, BrowserDesktopRootWindowHost implementation:
-views::DesktopWindowTreeHost*
- BrowserDesktopWindowTreeHostWin::AsDesktopWindowTreeHost() {
+views::DesktopRootWindowHost*
+ BrowserDesktopRootWindowHostWin::AsDesktopRootWindowHost() {
return this;
}
-int BrowserDesktopWindowTreeHostWin::GetMinimizeButtonOffset() const {
+int BrowserDesktopRootWindowHostWin::GetMinimizeButtonOffset() const {
return minimize_button_metrics_.GetMinimizeButtonOffsetX();
}
-bool BrowserDesktopWindowTreeHostWin::UsesNativeSystemMenu() const {
+bool BrowserDesktopRootWindowHostWin::UsesNativeSystemMenu() const {
return true;
}
////////////////////////////////////////////////////////////////////////////////
-// BrowserDesktopWindowTreeHostWin, views::DesktopWindowTreeHostWin overrides:
+// BrowserDesktopRootWindowHostWin, views::DesktopRootWindowHostWin overrides:
-int BrowserDesktopWindowTreeHostWin::GetInitialShowState() const {
+int BrowserDesktopRootWindowHostWin::GetInitialShowState() const {
STARTUPINFO si = {0};
si.cb = sizeof(si);
si.dwFlags = STARTF_USESHOWWINDOW;
@@ -131,7 +131,7 @@ int BrowserDesktopWindowTreeHostWin::GetInitialShowState() const {
return si.wShowWindow;
}
-bool BrowserDesktopWindowTreeHostWin::GetClientAreaInsets(
+bool BrowserDesktopRootWindowHostWin::GetClientAreaInsets(
gfx::Insets* insets) const {
// Use the default client insets for an opaque frame or a glass popup/app
// frame.
@@ -151,8 +151,8 @@ bool BrowserDesktopWindowTreeHostWin::GetClientAreaInsets(
return true;
}
-void BrowserDesktopWindowTreeHostWin::HandleCreate() {
- DesktopWindowTreeHostWin::HandleCreate();
+void BrowserDesktopRootWindowHostWin::HandleCreate() {
+ DesktopRootWindowHostWin::HandleCreate();
browser_window_property_manager_ =
BrowserWindowPropertyManager::CreateBrowserWindowPropertyManager(
browser_view_);
@@ -160,7 +160,7 @@ void BrowserDesktopWindowTreeHostWin::HandleCreate() {
browser_window_property_manager_->UpdateWindowProperties(GetHWND());
}
-void BrowserDesktopWindowTreeHostWin::HandleFrameChanged() {
+void BrowserDesktopRootWindowHostWin::HandleFrameChanged() {
// Reinitialize the status bubble, since it needs to be initialized
// differently depending on whether or not DWM composition is enabled
browser_view_->InitStatusBubble();
@@ -168,10 +168,10 @@ void BrowserDesktopWindowTreeHostWin::HandleFrameChanged() {
// We need to update the glass region on or off before the base class adjusts
// the window region.
UpdateDWMFrame();
- DesktopWindowTreeHostWin::HandleFrameChanged();
+ DesktopRootWindowHostWin::HandleFrameChanged();
}
-bool BrowserDesktopWindowTreeHostWin::PreHandleMSG(UINT message,
+bool BrowserDesktopRootWindowHostWin::PreHandleMSG(UINT message,
WPARAM w_param,
LPARAM l_param,
LRESULT* result) {
@@ -187,11 +187,11 @@ bool BrowserDesktopWindowTreeHostWin::PreHandleMSG(UINT message,
GetSystemMenu()->UpdateStates();
return true;
}
- return DesktopWindowTreeHostWin::PreHandleMSG(
+ return DesktopRootWindowHostWin::PreHandleMSG(
message, w_param, l_param, result);
}
-void BrowserDesktopWindowTreeHostWin::PostHandleMSG(UINT message,
+void BrowserDesktopRootWindowHostWin::PostHandleMSG(UINT message,
WPARAM w_param,
LPARAM l_param) {
switch (message) {
@@ -220,7 +220,7 @@ void BrowserDesktopWindowTreeHostWin::PostHandleMSG(UINT message,
break;
}
case WM_ERASEBKGND:
- if (!did_gdi_clear_ && DesktopWindowTreeHostWin::ShouldUseNativeFrame()) {
+ if (!did_gdi_clear_ && DesktopRootWindowHostWin::ShouldUseNativeFrame()) {
// This is necessary to avoid white flashing in the titlebar area around
// the minimize/maximize/close buttons.
HDC dc = GetDC(GetHWND());
@@ -239,12 +239,12 @@ void BrowserDesktopWindowTreeHostWin::PostHandleMSG(UINT message,
}
-bool BrowserDesktopWindowTreeHostWin::IsUsingCustomFrame() const {
+bool BrowserDesktopRootWindowHostWin::IsUsingCustomFrame() const {
// We don't theme popup or app windows, so regardless of whether or not a
// theme is active for normal browser windows, we don't want to use the custom
// frame for popups/apps.
if (!browser_view_->IsBrowserTypeNormal() &&
- !DesktopWindowTreeHostWin::IsUsingCustomFrame()) {
+ !DesktopRootWindowHostWin::IsUsingCustomFrame()) {
return false;
}
@@ -253,8 +253,8 @@ bool BrowserDesktopWindowTreeHostWin::IsUsingCustomFrame() const {
return !GetWidget()->GetThemeProvider()->ShouldUseNativeFrame();
}
-bool BrowserDesktopWindowTreeHostWin::ShouldUseNativeFrame() {
- if (!views::DesktopWindowTreeHostWin::ShouldUseNativeFrame())
+bool BrowserDesktopRootWindowHostWin::ShouldUseNativeFrame() {
+ if (!views::DesktopRootWindowHostWin::ShouldUseNativeFrame())
return false;
// This function can get called when the Browser window is closed i.e. in the
// context of the BrowserView destructor.
@@ -264,15 +264,15 @@ bool BrowserDesktopWindowTreeHostWin::ShouldUseNativeFrame() {
GetWidget()->GetThemeProvider());
}
-void BrowserDesktopWindowTreeHostWin::FrameTypeChanged() {
- views::DesktopWindowTreeHostWin::FrameTypeChanged();
+void BrowserDesktopRootWindowHostWin::FrameTypeChanged() {
+ views::DesktopRootWindowHostWin::FrameTypeChanged();
did_gdi_clear_ = false;
}
////////////////////////////////////////////////////////////////////////////////
-// BrowserDesktopWindowTreeHostWin, private:
+// BrowserDesktopRootWindowHostWin, private:
-void BrowserDesktopWindowTreeHostWin::UpdateDWMFrame() {
+void BrowserDesktopRootWindowHostWin::UpdateDWMFrame() {
// For "normal" windows on Aero, we always need to reset the glass area
// correctly, even if we're not currently showing the native frame (e.g.
// because a theme is showing), so we explicitly check for that case rather
@@ -282,7 +282,7 @@ void BrowserDesktopWindowTreeHostWin::UpdateDWMFrame() {
// opaque frame. Instead, we use that function below to tell us whether the
// frame is currently native or opaque.
if (!GetWidget()->client_view() || !browser_view_->IsBrowserTypeNormal() ||
- !DesktopWindowTreeHostWin::ShouldUseNativeFrame())
+ !DesktopRootWindowHostWin::ShouldUseNativeFrame())
return;
MARGINS margins = GetDWMFrameMargins();
@@ -290,7 +290,7 @@ void BrowserDesktopWindowTreeHostWin::UpdateDWMFrame() {
DwmExtendFrameIntoClientArea(GetHWND(), &margins);
}
-MARGINS BrowserDesktopWindowTreeHostWin::GetDWMFrameMargins() const {
+MARGINS BrowserDesktopRootWindowHostWin::GetDWMFrameMargins() const {
MARGINS margins = { 0 };
// If the opaque frame is visible, we use the default (zero) margins.
@@ -318,16 +318,16 @@ MARGINS BrowserDesktopWindowTreeHostWin::GetDWMFrameMargins() const {
}
////////////////////////////////////////////////////////////////////////////////
-// BrowserDesktopWindowTreeHost, public:
+// BrowserDesktopRootWindowHost, public:
// static
-BrowserDesktopWindowTreeHost*
- BrowserDesktopWindowTreeHost::CreateBrowserDesktopWindowTreeHost(
+BrowserDesktopRootWindowHost*
+ BrowserDesktopRootWindowHost::CreateBrowserDesktopRootWindowHost(
views::internal::NativeWidgetDelegate* native_widget_delegate,
views::DesktopNativeWidgetAura* desktop_native_widget_aura,
BrowserView* browser_view,
BrowserFrame* browser_frame) {
- return new BrowserDesktopWindowTreeHostWin(native_widget_delegate,
+ return new BrowserDesktopRootWindowHostWin(native_widget_delegate,
desktop_native_widget_aura,
browser_view,
browser_frame);
diff --git a/chrome/browser/ui/views/frame/browser_desktop_root_window_host_win.h b/chrome/browser/ui/views/frame/browser_desktop_root_window_host_win.h
index 27ab855..32df404 100644
--- a/chrome/browser/ui/views/frame/browser_desktop_root_window_host_win.h
+++ b/chrome/browser/ui/views/frame/browser_desktop_root_window_host_win.h
@@ -21,25 +21,25 @@ class DesktopNativeWidgetAura;
class NativeMenuWin;
}
-class BrowserDesktopWindowTreeHostWin : public BrowserDesktopWindowTreeHost,
- public views::DesktopWindowTreeHostWin {
+class BrowserDesktopRootWindowHostWin : public BrowserDesktopRootWindowHost,
+ public views::DesktopRootWindowHostWin {
public:
- BrowserDesktopWindowTreeHostWin(
+ BrowserDesktopRootWindowHostWin(
views::internal::NativeWidgetDelegate* native_widget_delegate,
views::DesktopNativeWidgetAura* desktop_native_widget_aura,
BrowserView* browser_view,
BrowserFrame* browser_frame);
- virtual ~BrowserDesktopWindowTreeHostWin();
+ virtual ~BrowserDesktopRootWindowHostWin();
private:
views::NativeMenuWin* GetSystemMenu();
- // Overridden from BrowserDesktopWindowTreeHost:
- virtual DesktopWindowTreeHost* AsDesktopWindowTreeHost() OVERRIDE;
+ // Overridden from BrowserDesktopRootWindowHost:
+ virtual DesktopRootWindowHost* AsDesktopRootWindowHost() OVERRIDE;
virtual int GetMinimizeButtonOffset() const OVERRIDE;
virtual bool UsesNativeSystemMenu() const OVERRIDE;
- // Overridden from DesktopWindowTreeHostWin:
+ // Overridden from DesktopRootWindowHostWin:
virtual int GetInitialShowState() const OVERRIDE;
virtual bool GetClientAreaInsets(gfx::Insets* insets) const OVERRIDE;
virtual void HandleCreate() OVERRIDE;
@@ -72,7 +72,7 @@ class BrowserDesktopWindowTreeHostWin : public BrowserDesktopWindowTreeHost,
// Necessary to avoid corruption on NC paint in Aero mode.
bool did_gdi_clear_;
- DISALLOW_COPY_AND_ASSIGN(BrowserDesktopWindowTreeHostWin);
+ DISALLOW_COPY_AND_ASSIGN(BrowserDesktopRootWindowHostWin);
};
diff --git a/chrome/browser/ui/views/frame/browser_desktop_root_window_host_x11.cc b/chrome/browser/ui/views/frame/browser_desktop_root_window_host_x11.cc
index 2ff9be1..c5e52ce 100644
--- a/chrome/browser/ui/views/frame/browser_desktop_root_window_host_x11.cc
+++ b/chrome/browser/ui/views/frame/browser_desktop_root_window_host_x11.cc
@@ -5,46 +5,46 @@
#include "chrome/browser/ui/views/frame/browser_desktop_root_window_host_x11.h"
////////////////////////////////////////////////////////////////////////////////
-// BrowserDesktopWindowTreeHostX11, public:
+// BrowserDesktopRootWindowHostX11, public:
-BrowserDesktopWindowTreeHostX11::BrowserDesktopWindowTreeHostX11(
+BrowserDesktopRootWindowHostX11::BrowserDesktopRootWindowHostX11(
views::internal::NativeWidgetDelegate* native_widget_delegate,
views::DesktopNativeWidgetAura* desktop_native_widget_aura,
BrowserView* browser_view)
- : DesktopWindowTreeHostX11(native_widget_delegate,
+ : DesktopRootWindowHostX11(native_widget_delegate,
desktop_native_widget_aura),
browser_view_(browser_view) {
}
-BrowserDesktopWindowTreeHostX11::~BrowserDesktopWindowTreeHostX11() {
+BrowserDesktopRootWindowHostX11::~BrowserDesktopRootWindowHostX11() {
}
////////////////////////////////////////////////////////////////////////////////
-// BrowserDesktopWindowTreeHostX11,
-// BrowserDesktopWindowTreeHost implementation:
+// BrowserDesktopRootWindowHostX11,
+// BrowserDesktopRootWindowHost implementation:
-views::DesktopWindowTreeHost*
- BrowserDesktopWindowTreeHostX11::AsDesktopWindowTreeHost() {
+views::DesktopRootWindowHost*
+ BrowserDesktopRootWindowHostX11::AsDesktopRootWindowHost() {
return this;
}
-int BrowserDesktopWindowTreeHostX11::GetMinimizeButtonOffset() const {
+int BrowserDesktopRootWindowHostX11::GetMinimizeButtonOffset() const {
return 0;
}
-bool BrowserDesktopWindowTreeHostX11::UsesNativeSystemMenu() const {
+bool BrowserDesktopRootWindowHostX11::UsesNativeSystemMenu() const {
return false;
}
////////////////////////////////////////////////////////////////////////////////
-// BrowserDesktopWindowTreeHostX11,
-// views::DesktopWindowTreeHostX11 implementation:
+// BrowserDesktopRootWindowHostX11,
+// views::DesktopRootWindowHostX11 implementation:
-void BrowserDesktopWindowTreeHostX11::Init(
+void BrowserDesktopRootWindowHostX11::Init(
aura::Window* content_window,
const views::Widget::InitParams& params,
aura::RootWindow::CreateParams* rw_create_params) {
- views::DesktopWindowTreeHostX11::Init(content_window, params,
+ views::DesktopRootWindowHostX11::Init(content_window, params,
rw_create_params);
// We have now created our backing X11 window. We now need to (possibly)
@@ -52,22 +52,22 @@ void BrowserDesktopWindowTreeHostX11::Init(
global_menu_bar_x11_.reset(new GlobalMenuBarX11(browser_view_, this));
}
-void BrowserDesktopWindowTreeHostX11::CloseNow() {
+void BrowserDesktopRootWindowHostX11::CloseNow() {
global_menu_bar_x11_.reset();
- DesktopWindowTreeHostX11::CloseNow();
+ DesktopRootWindowHostX11::CloseNow();
}
////////////////////////////////////////////////////////////////////////////////
-// BrowserDesktopWindowTreeHost, public:
+// BrowserDesktopRootWindowHost, public:
// static
-BrowserDesktopWindowTreeHost*
- BrowserDesktopWindowTreeHost::CreateBrowserDesktopWindowTreeHost(
+BrowserDesktopRootWindowHost*
+ BrowserDesktopRootWindowHost::CreateBrowserDesktopRootWindowHost(
views::internal::NativeWidgetDelegate* native_widget_delegate,
views::DesktopNativeWidgetAura* desktop_native_widget_aura,
BrowserView* browser_view,
BrowserFrame* browser_frame) {
- return new BrowserDesktopWindowTreeHostX11(native_widget_delegate,
+ return new BrowserDesktopRootWindowHostX11(native_widget_delegate,
desktop_native_widget_aura,
browser_view);
}
diff --git a/chrome/browser/ui/views/frame/browser_desktop_root_window_host_x11.h b/chrome/browser/ui/views/frame/browser_desktop_root_window_host_x11.h
index 2548797..b7355c8 100644
--- a/chrome/browser/ui/views/frame/browser_desktop_root_window_host_x11.h
+++ b/chrome/browser/ui/views/frame/browser_desktop_root_window_host_x11.h
@@ -16,23 +16,23 @@ namespace views {
class DesktopNativeWidgetAura;
}
-class BrowserDesktopWindowTreeHostX11
- : public BrowserDesktopWindowTreeHost,
- public views::DesktopWindowTreeHostX11 {
+class BrowserDesktopRootWindowHostX11
+ : public BrowserDesktopRootWindowHost,
+ public views::DesktopRootWindowHostX11 {
public:
- BrowserDesktopWindowTreeHostX11(
+ BrowserDesktopRootWindowHostX11(
views::internal::NativeWidgetDelegate* native_widget_delegate,
views::DesktopNativeWidgetAura* desktop_native_widget_aura,
BrowserView* browser_view);
- virtual ~BrowserDesktopWindowTreeHostX11();
+ virtual ~BrowserDesktopRootWindowHostX11();
private:
- // Overridden from BrowserDesktopWindowTreeHost:
- virtual DesktopWindowTreeHost* AsDesktopWindowTreeHost() OVERRIDE;
+ // Overridden from BrowserDesktopRootWindowHost:
+ virtual DesktopRootWindowHost* AsDesktopRootWindowHost() OVERRIDE;
virtual int GetMinimizeButtonOffset() const OVERRIDE;
virtual bool UsesNativeSystemMenu() const OVERRIDE;
- // Overridden from views::DesktopWindowTreeHostX11:
+ // Overridden from views::DesktopRootWindowHostX11:
virtual void Init(
aura::Window* content_window,
const views::Widget::InitParams& params,
@@ -46,7 +46,7 @@ class BrowserDesktopWindowTreeHostX11
// xids to the same menu bar.
scoped_ptr<GlobalMenuBarX11> global_menu_bar_x11_;
- DISALLOW_COPY_AND_ASSIGN(BrowserDesktopWindowTreeHostX11);
+ DISALLOW_COPY_AND_ASSIGN(BrowserDesktopRootWindowHostX11);
};
#endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_DESKTOP_ROOT_WINDOW_HOST_X11_H_
diff --git a/chrome/browser/ui/views/frame/browser_frame_ashwin.cc b/chrome/browser/ui/views/frame/browser_frame_ashwin.cc
index e4beb4f..2e259b0 100644
--- a/chrome/browser/ui/views/frame/browser_frame_ashwin.cc
+++ b/chrome/browser/ui/views/frame/browser_frame_ashwin.cc
@@ -25,7 +25,7 @@ void BrowserFrameAshWin::OnWindowFocused(aura::Window* gained_focus,
// If the activated window is in Metro mode, and the viewer process window is
// not in the foreground, activate Metro Chrome.
- if (!aura::RemoteWindowTreeHostWin::Instance()->IsForegroundWindow()) {
+ if (!aura::RemoteRootWindowHostWin::Instance()->IsForegroundWindow()) {
// PostTask because ActivateMetroChrome can not be called nested in another
// ::SendMessage().
base::MessageLoop::current()->PostTask(
diff --git a/chrome/browser/ui/views/frame/desktop_browser_frame_aura.cc b/chrome/browser/ui/views/frame/desktop_browser_frame_aura.cc
index 8b5bb71..f5284b2 100644
--- a/chrome/browser/ui/views/frame/desktop_browser_frame_aura.cc
+++ b/chrome/browser/ui/views/frame/desktop_browser_frame_aura.cc
@@ -53,14 +53,14 @@ void DesktopBrowserFrameAura::OnHostClosed() {
void DesktopBrowserFrameAura::InitNativeWidget(
const views::Widget::InitParams& params) {
browser_desktop_root_window_host_ =
- BrowserDesktopWindowTreeHost::CreateBrowserDesktopWindowTreeHost(
+ BrowserDesktopRootWindowHost::CreateBrowserDesktopRootWindowHost(
browser_frame_,
this,
browser_view_,
browser_frame_);
views::Widget::InitParams modified_params = params;
modified_params.desktop_root_window_host =
- browser_desktop_root_window_host_->AsDesktopWindowTreeHost();
+ browser_desktop_root_window_host_->AsDesktopRootWindowHost();
DesktopNativeWidgetAura::InitNativeWidget(modified_params);
user_action_client_.reset(
diff --git a/chrome/browser/ui/views/frame/desktop_browser_frame_aura.h b/chrome/browser/ui/views/frame/desktop_browser_frame_aura.h
index 0ad3f25..b43f588 100644
--- a/chrome/browser/ui/views/frame/desktop_browser_frame_aura.h
+++ b/chrome/browser/ui/views/frame/desktop_browser_frame_aura.h
@@ -11,7 +11,7 @@
#include "ui/views/context_menu_controller.h"
#include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h"
-class BrowserDesktopWindowTreeHost;
+class BrowserDesktopRootWindowHost;
class BrowserFrame;
class BrowserView;
@@ -61,7 +61,7 @@ class DesktopBrowserFrameAura : public views::DesktopNativeWidgetAura,
BrowserFrame* browser_frame_;
// Owned by the RootWindow.
- BrowserDesktopWindowTreeHost* browser_desktop_root_window_host_;
+ BrowserDesktopRootWindowHost* browser_desktop_root_window_host_;
scoped_ptr<aura::client::UserActionClient> user_action_client_;
scoped_ptr<views::corewm::VisibilityController> visibility_controller_;
diff --git a/chrome/browser/ui/views/frame/global_menu_bar_x11.cc b/chrome/browser/ui/views/frame/global_menu_bar_x11.cc
index 89d92f5..fcecb76 100644
--- a/chrome/browser/ui/views/frame/global_menu_bar_x11.cc
+++ b/chrome/browser/ui/views/frame/global_menu_bar_x11.cc
@@ -312,7 +312,7 @@ struct GlobalMenuBarX11::HistoryItem {
};
GlobalMenuBarX11::GlobalMenuBarX11(BrowserView* browser_view,
- BrowserDesktopWindowTreeHostX11* host)
+ BrowserDesktopRootWindowHostX11* host)
: browser_(browser_view->browser()),
profile_(browser_->profile()),
browser_view_(browser_view),
diff --git a/chrome/browser/ui/views/frame/global_menu_bar_x11.h b/chrome/browser/ui/views/frame/global_menu_bar_x11.h
index f788881..269153e 100644
--- a/chrome/browser/ui/views/frame/global_menu_bar_x11.h
+++ b/chrome/browser/ui/views/frame/global_menu_bar_x11.h
@@ -35,7 +35,7 @@ class Browser;
class BrowserView;
class Profile;
-class BrowserDesktopWindowTreeHostX11;
+class BrowserDesktopRootWindowHostX11;
struct GlobalMenuBarCommand;
// Controls the Mac style menu bar on Unity.
@@ -49,10 +49,10 @@ struct GlobalMenuBarCommand;
class GlobalMenuBarX11 : public CommandObserver,
public content::NotificationObserver,
public TabRestoreServiceObserver,
- public views::DesktopWindowTreeHostObserverX11 {
+ public views::DesktopRootWindowHostObserverX11 {
public:
GlobalMenuBarX11(BrowserView* browser_view,
- BrowserDesktopWindowTreeHostX11* host);
+ BrowserDesktopRootWindowHostX11* host);
virtual ~GlobalMenuBarX11();
// Creates the object path for DbusemenuServer which is attached to |xid|.
@@ -126,7 +126,7 @@ class GlobalMenuBarX11 : public CommandObserver,
virtual void TabRestoreServiceChanged(TabRestoreService* service) OVERRIDE;
virtual void TabRestoreServiceDestroyed(TabRestoreService* service) OVERRIDE;
- // Overridden from views::DesktopWindowTreeHostObserverX11:
+ // Overridden from views::DesktopRootWindowHostObserverX11:
virtual void OnWindowMapped(unsigned long xid) OVERRIDE;
virtual void OnWindowUnmapped(unsigned long xid) OVERRIDE;
@@ -140,7 +140,7 @@ class GlobalMenuBarX11 : public CommandObserver,
Browser* browser_;
Profile* profile_;
BrowserView* browser_view_;
- BrowserDesktopWindowTreeHostX11* host_;
+ BrowserDesktopRootWindowHostX11* host_;
// Maps command ids to DbusmenuMenuitems so we can modify their
// enabled/checked state in response to state change notifications.
diff --git a/chrome/browser/ui/views/frame/minimize_button_metrics_win.h b/chrome/browser/ui/views/frame/minimize_button_metrics_win.h
index 6fb6d353..94e2775 100644
--- a/chrome/browser/ui/views/frame/minimize_button_metrics_win.h
+++ b/chrome/browser/ui/views/frame/minimize_button_metrics_win.h
@@ -12,7 +12,7 @@
// Class that implements obtaining the X coordinate of the native minimize
// button for the native frame on Windows.
// This is a separate class because obtaining it is somewhat tricky and this
-// code is shared between BrowserDesktopWindowTreeHostWin and BrowserFrameWin.
+// code is shared between BrowserDesktopRootWindowHostWin and BrowserFrameWin.
class MinimizeButtonMetrics {
public:
MinimizeButtonMetrics();
diff --git a/chrome/browser/ui/views/omnibox/omnibox_view_views_browsertest.cc b/chrome/browser/ui/views/omnibox/omnibox_view_views_browsertest.cc
index a5dcea6..f3d8015 100644
--- a/chrome/browser/ui/views/omnibox/omnibox_view_views_browsertest.cc
+++ b/chrome/browser/ui/views/omnibox/omnibox_view_views_browsertest.cc
@@ -67,9 +67,9 @@ class OmniboxViewViewsTest : public InProcessBrowserTest {
#if defined(USE_AURA)
// Tap the center of the browser window.
void TapBrowserWindowCenter() {
- aura::WindowTreeHostDelegate* rwhd =
+ aura::RootWindowHostDelegate* rwhd =
browser()->window()->GetNativeWindow()->GetRootWindow()->
- GetDispatcher()->AsWindowTreeHostDelegate();
+ GetDispatcher()->AsRootWindowHostDelegate();
gfx::Point center = BrowserView::GetBrowserViewForBrowser(
browser())->GetBoundsInScreen().CenterPoint();
@@ -85,9 +85,9 @@ class OmniboxViewViewsTest : public InProcessBrowserTest {
// Touch down and release at the specified locations.
void Tap(const gfx::Point& press_location,
const gfx::Point& release_location) {
- aura::WindowTreeHostDelegate* rwhd =
+ aura::RootWindowHostDelegate* rwhd =
browser()->window()->GetNativeWindow()->GetRootWindow()->
- GetDispatcher()->AsWindowTreeHostDelegate();
+ GetDispatcher()->AsRootWindowHostDelegate();
ui::TouchEvent press(ui::ET_TOUCH_PRESSED, press_location,
5, base::TimeDelta::FromMilliseconds(0));
diff --git a/chrome/browser/ui/views/tabs/dock_info_win.cc b/chrome/browser/ui/views/tabs/dock_info_win.cc
index 5fa97e7..5d00100 100644
--- a/chrome/browser/ui/views/tabs/dock_info_win.cc
+++ b/chrome/browser/ui/views/tabs/dock_info_win.cc
@@ -171,7 +171,7 @@ class LocalProcessWindowFinder : public BaseWindowFinder {
TopMostFinder::IsTopMostWindowAtPoint(finder.result_, screen_loc,
ignore))) {
#if defined(USE_AURA)
- return views::DesktopWindowTreeHostWin::GetContentWindowForHWND(
+ return views::DesktopRootWindowHostWin::GetContentWindowForHWND(
finder.result_);
#else
return finder.result_;
@@ -234,7 +234,7 @@ class DockToWindowFinder : public BaseWindowFinder {
virtual bool ShouldStopIterating(HWND hwnd) {
#if defined(USE_AURA)
BrowserView* window = BrowserView::GetBrowserViewForNativeWindow(
- views::DesktopWindowTreeHostWin::GetContentWindowForHWND(hwnd));
+ views::DesktopRootWindowHostWin::GetContentWindowForHWND(hwnd));
#else
BrowserView* window = BrowserView::GetBrowserViewForNativeWindow(hwnd);
#endif
@@ -276,7 +276,7 @@ class DockToWindowFinder : public BaseWindowFinder {
result_.set_in_enable_area(in_enable_area);
#if defined(USE_AURA)
result_.set_window(
- views::DesktopWindowTreeHostWin::GetContentWindowForHWND(hwnd));
+ views::DesktopRootWindowHostWin::GetContentWindowForHWND(hwnd));
#else
result_.set_window(hwnd);
#endif
diff --git a/content/browser/accessibility/browser_accessibility_manager_win.cc b/content/browser/accessibility/browser_accessibility_manager_win.cc
index 34c3dbd..5158935 100644
--- a/content/browser/accessibility/browser_accessibility_manager_win.cc
+++ b/content/browser/accessibility/browser_accessibility_manager_win.cc
@@ -31,7 +31,7 @@ namespace content {
// tree. This HWND is hooked up as the parent of the root object in the
// BrowserAccessibilityManager tree, so when any accessibility client
// calls ::WindowFromAccessibleObject, they get this HWND instead of the
-// DesktopWindowTreeHostWin.
+// DesktopRootWindowHostWin.
class AccessibleHWND
: public ATL::CWindowImpl<AccessibleHWND,
ATL::CWindow,
diff --git a/content/browser/renderer_host/input/synthetic_gesture_target_aura.cc b/content/browser/renderer_host/input/synthetic_gesture_target_aura.cc
index e8bdd27..1d5c6a8 100644
--- a/content/browser/renderer_host/input/synthetic_gesture_target_aura.cc
+++ b/content/browser/renderer_host/input/synthetic_gesture_target_aura.cc
@@ -49,8 +49,8 @@ void SyntheticGestureTargetAura::DispatchWebTouchEventToPlatform(
touch_with_latency, &events, SCREEN_COORDINATES);
DCHECK(conversion_success);
- aura::WindowTreeHostDelegate* root_window_host_delegate =
- root_window->GetDispatcher()->AsWindowTreeHostDelegate();
+ aura::RootWindowHostDelegate* root_window_host_delegate =
+ root_window->GetDispatcher()->AsRootWindowHostDelegate();
for (ScopedVector<ui::TouchEvent>::iterator iter = events.begin(),
end = events.end(); iter != end; ++iter) {
root_window_host_delegate->OnHostTouchEvent(*iter);
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index 25d5b77..0fdd811 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -2958,10 +2958,10 @@ void RenderWidgetHostViewAura::OnWindowFocused(aura::Window* gained_focus,
////////////////////////////////////////////////////////////////////////////////
// RenderWidgetHostViewAura, aura::RootWindowObserver implementation:
-void RenderWidgetHostViewAura::OnWindowTreeHostMoved(
+void RenderWidgetHostViewAura::OnRootWindowHostMoved(
const aura::RootWindow* root,
const gfx::Point& new_origin) {
- TRACE_EVENT1("ui", "RenderWidgetHostViewAura::OnWindowTreeHostMoved",
+ TRACE_EVENT1("ui", "RenderWidgetHostViewAura::OnRootWindowHostMoved",
"new_origin", new_origin.ToString());
UpdateScreenInfo(window_);
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.h b/content/browser/renderer_host/render_widget_host_view_aura.h
index c8de1bd..4e500f3 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.h
+++ b/content/browser/renderer_host/render_widget_host_view_aura.h
@@ -334,7 +334,7 @@ class CONTENT_EXPORT RenderWidgetHostViewAura
aura::Window* lost_focus) OVERRIDE;
// Overridden from aura::RootWindowObserver:
- virtual void OnWindowTreeHostMoved(const aura::RootWindow* root,
+ virtual void OnRootWindowHostMoved(const aura::RootWindow* root,
const gfx::Point& new_origin) OVERRIDE;
// SoftwareFrameManagerClient implementation:
diff --git a/content/browser/renderer_host/touch_smooth_scroll_gesture_aura.cc b/content/browser/renderer_host/touch_smooth_scroll_gesture_aura.cc
index 4766159..c2d8430 100644
--- a/content/browser/renderer_host/touch_smooth_scroll_gesture_aura.cc
+++ b/content/browser/renderer_host/touch_smooth_scroll_gesture_aura.cc
@@ -25,7 +25,7 @@ void InjectTouchEvent(const gfx::Point& location,
dispatcher->host()->ConvertPointToHost(&screen_location);
ui::TouchEvent touch(type, screen_location, 0, 0, ui::EventTimeForNow(),
1.0f, 1.0f, 1.0f, 1.0f);
- dispatcher->AsWindowTreeHostDelegate()->OnHostTouchEvent(&touch);
+ dispatcher->AsRootWindowHostDelegate()->OnHostTouchEvent(&touch);
}
} // namespace
diff --git a/content/browser/web_contents/aura/window_slider_unittest.cc b/content/browser/web_contents/aura/window_slider_unittest.cc
index 9add83e..d56d1e7 100644
--- a/content/browser/web_contents/aura/window_slider_unittest.cc
+++ b/content/browser/web_contents/aura/window_slider_unittest.cc
@@ -21,8 +21,8 @@ void DispatchEventDuringScrollCallback(aura::WindowEventDispatcher* dispatcher,
const gfx::Vector2dF& delta) {
if (type != ui::ET_GESTURE_SCROLL_UPDATE)
return;
- aura::WindowTreeHostDelegate* delegate =
- dispatcher->AsWindowTreeHostDelegate();
+ aura::RootWindowHostDelegate* delegate =
+ dispatcher->AsRootWindowHostDelegate();
if (event->IsMouseEvent())
delegate->OnHostMouseEvent(static_cast<ui::MouseEvent*>(event));
else if (event->IsKeyEvent())
diff --git a/content/browser/web_contents/web_contents_view_aura.cc b/content/browser/web_contents/web_contents_view_aura.cc
index c799039..353da78 100644
--- a/content/browser/web_contents/web_contents_view_aura.cc
+++ b/content/browser/web_contents/web_contents_view_aura.cc
@@ -821,10 +821,10 @@ class WebContentsViewAura::WindowObserver
}
// Overridden RootWindowObserver:
- virtual void OnWindowTreeHostMoved(const aura::RootWindow* root,
+ virtual void OnRootWindowHostMoved(const aura::RootWindow* root,
const gfx::Point& new_origin) OVERRIDE {
TRACE_EVENT1("ui",
- "WebContentsViewAura::WindowObserver::OnWindowTreeHostMoved",
+ "WebContentsViewAura::WindowObserver::OnRootWindowHostMoved",
"new_origin", new_origin.ToString());
// This is for the desktop case (i.e. Aura desktop).
diff --git a/content/browser/web_contents/web_contents_view_aura_browsertest.cc b/content/browser/web_contents/web_contents_view_aura_browsertest.cc
index 6e04951..3214c13 100644
--- a/content/browser/web_contents/web_contents_view_aura_browsertest.cc
+++ b/content/browser/web_contents/web_contents_view_aura_browsertest.cc
@@ -335,14 +335,14 @@ IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest,
ui::TouchEvent press(ui::ET_TOUCH_PRESSED,
gfx::Point(bounds.x() + bounds.width() / 2, bounds.y() + 5),
0, timestamp);
- dispatcher->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
EXPECT_EQ(1, GetCurrentIndex());
timestamp += base::TimeDelta::FromMilliseconds(10);
ui::TouchEvent move1(ui::ET_TOUCH_MOVED,
gfx::Point(bounds.right() - 10, bounds.y() + 5),
0, timestamp);
- dispatcher->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move1);
+ dispatcher->AsRootWindowHostDelegate()->OnHostTouchEvent(&move1);
EXPECT_EQ(1, GetCurrentIndex());
// Swipe back from the right edge, back to the left edge, back to the right
@@ -353,7 +353,7 @@ IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest,
ui::TouchEvent inc(ui::ET_TOUCH_MOVED,
gfx::Point(x, bounds.y() + 5),
0, timestamp);
- dispatcher->AsWindowTreeHostDelegate()->OnHostTouchEvent(&inc);
+ dispatcher->AsRootWindowHostDelegate()->OnHostTouchEvent(&inc);
EXPECT_EQ(1, GetCurrentIndex());
}
@@ -362,7 +362,7 @@ IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest,
ui::TouchEvent inc(ui::ET_TOUCH_MOVED,
gfx::Point(x, bounds.y() + 5),
0, timestamp);
- dispatcher->AsWindowTreeHostDelegate()->OnHostTouchEvent(&inc);
+ dispatcher->AsRootWindowHostDelegate()->OnHostTouchEvent(&inc);
EXPECT_EQ(1, GetCurrentIndex());
}
@@ -371,7 +371,7 @@ IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest,
ui::TouchEvent inc(ui::ET_TOUCH_MOVED,
gfx::Point(x, bounds.y() + 5),
0, timestamp);
- dispatcher->AsWindowTreeHostDelegate()->OnHostTouchEvent(&inc);
+ dispatcher->AsRootWindowHostDelegate()->OnHostTouchEvent(&inc);
EXPECT_EQ(1, GetCurrentIndex());
}
diff --git a/content/shell/browser/shell_aura.cc b/content/shell/browser/shell_aura.cc
index b458d8f..6d66963 100644
--- a/content/shell/browser/shell_aura.cc
+++ b/content/shell/browser/shell_aura.cc
@@ -101,7 +101,7 @@ class MinimalInputEventFilter : public ui::internal::InputMethodDelegate,
virtual bool DispatchKeyEventPostIME(
const base::NativeEvent& event) OVERRIDE {
ui::TranslatedKeyEvent aura_event(event, false /* is_char */);
- return root_->AsWindowTreeHostDelegate()->OnHostKeyEvent(
+ return root_->AsRootWindowHostDelegate()->OnHostKeyEvent(
&aura_event);
}
@@ -110,7 +110,7 @@ class MinimalInputEventFilter : public ui::internal::InputMethodDelegate,
int flags) OVERRIDE {
ui::TranslatedKeyEvent aura_event(type == ui::ET_KEY_PRESSED, key_code,
flags);
- return root_->AsWindowTreeHostDelegate()->OnHostKeyEvent(
+ return root_->AsRootWindowHostDelegate()->OnHostKeyEvent(
&aura_event);
}
diff --git a/ui/aura/env.h b/ui/aura/env.h
index 035f8274..ec52005 100644
--- a/ui/aura/env.h
+++ b/ui/aura/env.h
@@ -79,7 +79,7 @@ class AURA_EXPORT Env : public ui::EventTarget {
private:
friend class test::EnvTestHelper;
friend class Window;
- friend class WindowTreeHost;
+ friend class RootWindowHost;
void Init();
diff --git a/ui/aura/gestures/gesture_recognizer_unittest.cc b/ui/aura/gestures/gesture_recognizer_unittest.cc
index 09e40ad..7fb6c60 100644
--- a/ui/aura/gestures/gesture_recognizer_unittest.cc
+++ b/ui/aura/gestures/gesture_recognizer_unittest.cc
@@ -574,7 +574,7 @@ class TimedEvents {
ui::TouchEvent move(ui::ET_TOUCH_MOVED, gfx::Point(x, y),
touch_id,
base::TimeDelta::FromMilliseconds(simulated_now_));
- root_window->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move);
+ root_window->AsRootWindowHostDelegate()->OnHostTouchEvent(&move);
simulated_now_ += time_step;
}
}
@@ -588,7 +588,7 @@ class TimedEvents {
ui::TouchEvent move(ui::ET_TOUCH_MOVED, gfx::Point(x, y),
touch_id,
base::TimeDelta::FromMilliseconds(simulated_now_));
- root_window->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move);
+ root_window->AsRootWindowHostDelegate()->OnHostTouchEvent(&move);
simulated_now_++;
}
};
@@ -699,7 +699,7 @@ TEST_F(GestureRecognizerTest, GestureEventTap) {
delegate->Reset();
ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
EXPECT_FALSE(delegate->tap());
EXPECT_FALSE(delegate->show_press());
EXPECT_TRUE(delegate->tap_down());
@@ -721,7 +721,7 @@ TEST_F(GestureRecognizerTest, GestureEventTap) {
ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId, tes.LeapForward(50));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
EXPECT_TRUE(delegate->tap());
EXPECT_FALSE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -754,7 +754,7 @@ TEST_F(GestureRecognizerTest, GestureEventTapRegion) {
kTouchId, tes.Now());
press.set_radius_x(5);
press.set_radius_y(12);
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
EXPECT_FALSE(delegate->tap());
EXPECT_TRUE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -772,7 +772,7 @@ TEST_F(GestureRecognizerTest, GestureEventTapRegion) {
release.set_radius_x(5);
release.set_radius_y(12);
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
EXPECT_TRUE(delegate->tap());
EXPECT_FALSE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -797,7 +797,7 @@ TEST_F(GestureRecognizerTest, GestureEventTapRegion) {
kTouchId, tes.Now());
press.set_radius_x(8);
press.set_radius_y(14);
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
EXPECT_FALSE(delegate->tap());
EXPECT_TRUE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -813,7 +813,7 @@ TEST_F(GestureRecognizerTest, GestureEventTapRegion) {
release.set_radius_x(20);
release.set_radius_y(13);
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
EXPECT_TRUE(delegate->tap());
EXPECT_FALSE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -838,7 +838,7 @@ TEST_F(GestureRecognizerTest, GestureEventTapRegion) {
kTouchId, tes.Now());
press.set_radius_x(6);
press.set_radius_y(10);
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
EXPECT_FALSE(delegate->tap());
EXPECT_TRUE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -854,7 +854,7 @@ TEST_F(GestureRecognizerTest, GestureEventTapRegion) {
kTouchId, tes.LeapForward(50));
move.set_radius_x(8);
move.set_radius_y(12);
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move);
EXPECT_FALSE(delegate->tap());
EXPECT_FALSE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -870,7 +870,7 @@ TEST_F(GestureRecognizerTest, GestureEventTapRegion) {
release.set_radius_x(4);
release.set_radius_y(8);
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
EXPECT_TRUE(delegate->tap());
EXPECT_FALSE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -895,7 +895,7 @@ TEST_F(GestureRecognizerTest, GestureEventTapRegion) {
kTouchId, tes.Now());
press.set_radius_x(7);
press.set_radius_y(10);
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
EXPECT_FALSE(delegate->tap());
EXPECT_TRUE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -910,7 +910,7 @@ TEST_F(GestureRecognizerTest, GestureEventTapRegion) {
kTouchId, tes.LeapForward(50));
move.set_radius_x(13);
move.set_radius_y(12);
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move);
EXPECT_FALSE(delegate->tap());
EXPECT_FALSE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -925,7 +925,7 @@ TEST_F(GestureRecognizerTest, GestureEventTapRegion) {
kTouchId, tes.LeapForward(50));
move1.set_radius_x(16);
move1.set_radius_y(16);
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move1);
EXPECT_FALSE(delegate->tap());
EXPECT_FALSE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -940,7 +940,7 @@ TEST_F(GestureRecognizerTest, GestureEventTapRegion) {
kTouchId, tes.LeapForward(50));
move2.set_radius_x(14);
move2.set_radius_y(10);
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move2);
EXPECT_FALSE(delegate->tap());
EXPECT_FALSE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -956,7 +956,7 @@ TEST_F(GestureRecognizerTest, GestureEventTapRegion) {
release.set_radius_x(8);
release.set_radius_y(9);
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
EXPECT_TRUE(delegate->tap());
EXPECT_FALSE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -990,7 +990,7 @@ TEST_F(GestureRecognizerTest, GestureEventScroll) {
delegate->Reset();
ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
EXPECT_2_EVENTS(delegate->events(),
ui::ET_GESTURE_BEGIN,
ui::ET_GESTURE_TAP_DOWN);
@@ -1031,7 +1031,7 @@ TEST_F(GestureRecognizerTest, GestureEventScroll) {
ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId,
tes.LeapForward(50));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
EXPECT_2_EVENTS(delegate->events(),
ui::ET_SCROLL_FLING_START,
ui::ET_GESTURE_END);
@@ -1058,7 +1058,7 @@ TEST_F(GestureRecognizerTest, GestureEventScrollPrediction) {
gfx::Vector2dF total_scroll;
ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
EXPECT_2_EVENTS(delegate->events(),
ui::ET_GESTURE_BEGIN,
ui::ET_GESTURE_TAP_DOWN);
@@ -1108,7 +1108,7 @@ TEST_F(GestureRecognizerTest, GestureEventScrollPrediction) {
ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId,
tes.LeapForward(50));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
}
// Check that the bounding box during a scroll event is correct.
@@ -1132,7 +1132,7 @@ TEST_F(GestureRecognizerTest, GestureEventScrollBoundingBox) {
gfx::Point(kPositionX, kPositionY),
kTouchId,
tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
EXPECT_EQ(gfx::Rect(kPositionX - radius,
kPositionY - radius,
radius * 2,
@@ -1157,7 +1157,7 @@ TEST_F(GestureRecognizerTest, GestureEventScrollBoundingBox) {
kPositionY + kScrollAmount),
kTouchId, press.time_stamp() +
base::TimeDelta::FromMilliseconds(50));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
EXPECT_EQ(gfx::Rect(kPositionX + kScrollAmount - radius,
kPositionY + kScrollAmount - radius,
radius * 2,
@@ -1180,7 +1180,7 @@ TEST_F(GestureRecognizerTest, GestureEventHorizontalRailFling) {
ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(0, 0),
kTouchId, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
// Move the touch-point horizontally enough that it is considered a
// horizontal scroll.
@@ -1203,7 +1203,7 @@ TEST_F(GestureRecognizerTest, GestureEventHorizontalRailFling) {
delegate->Reset();
ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
EXPECT_TRUE(delegate->fling());
EXPECT_FALSE(delegate->scroll_end());
@@ -1224,7 +1224,7 @@ TEST_F(GestureRecognizerTest, GestureEventVerticalRailFling) {
ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(0, 0),
kTouchId, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
// Move the touch-point vertically enough that it is considered a
// vertical scroll.
@@ -1247,7 +1247,7 @@ TEST_F(GestureRecognizerTest, GestureEventVerticalRailFling) {
delegate->Reset();
ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
EXPECT_TRUE(delegate->fling());
EXPECT_FALSE(delegate->scroll_end());
@@ -1268,7 +1268,7 @@ TEST_F(GestureRecognizerTest, GestureEventNonRailFling) {
ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(0, 0),
kTouchId, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
// Move the touch-point such that a non-rail scroll begins
tes.SendScrollEvent(dispatcher(), 20, 20, kTouchId, delegate.get());
@@ -1283,7 +1283,7 @@ TEST_F(GestureRecognizerTest, GestureEventNonRailFling) {
delegate->Reset();
ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
EXPECT_TRUE(delegate->fling());
EXPECT_FALSE(delegate->scroll_end());
@@ -1312,7 +1312,7 @@ TEST_F(GestureRecognizerTest, GestureEventLongPress) {
ui::TouchEvent press1(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1);
EXPECT_TRUE(delegate->tap_down());
EXPECT_TRUE(delegate->begin());
EXPECT_FALSE(delegate->tap_cancel());
@@ -1329,7 +1329,7 @@ TEST_F(GestureRecognizerTest, GestureEventLongPress) {
delegate->Reset();
ui::TouchEvent release1(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release1);
EXPECT_FALSE(delegate->long_press());
// Note the tap down isn't cancelled until the release
@@ -1361,7 +1361,7 @@ TEST_F(GestureRecognizerTest, GestureEventLongPressCancelledByScroll) {
ui::TouchEvent press1(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1);
EXPECT_TRUE(delegate->tap_down());
// We haven't pressed long enough for a long press to occur
@@ -1378,7 +1378,7 @@ TEST_F(GestureRecognizerTest, GestureEventLongPressCancelledByScroll) {
delegate->Reset();
ui::TouchEvent release1(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId, tes.LeapForward(10));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release1);
EXPECT_FALSE(delegate->long_press());
EXPECT_FALSE(delegate->tap_cancel());
}
@@ -1404,7 +1404,7 @@ TEST_F(GestureRecognizerTest, GestureEventLongTap) {
ui::TouchEvent press1(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1);
EXPECT_TRUE(delegate->tap_down());
EXPECT_TRUE(delegate->begin());
EXPECT_FALSE(delegate->tap_cancel());
@@ -1421,7 +1421,7 @@ TEST_F(GestureRecognizerTest, GestureEventLongTap) {
delegate->Reset();
ui::TouchEvent release1(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release1);
EXPECT_FALSE(delegate->long_press());
EXPECT_TRUE(delegate->long_tap());
@@ -1454,7 +1454,7 @@ TEST_F(GestureRecognizerTest, GestureEventLongPressCancelledBySecondTap) {
delegate->Reset();
ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId1, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
EXPECT_TRUE(delegate->tap_down());
EXPECT_TRUE(delegate->begin());
@@ -1465,7 +1465,7 @@ TEST_F(GestureRecognizerTest, GestureEventLongPressCancelledBySecondTap) {
delegate->Reset();
ui::TouchEvent press2(ui::ET_TOUCH_PRESSED, gfx::Point(10, 10),
kTouchId2, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2);
EXPECT_FALSE(delegate->tap_down()); // no touch down for second tap.
EXPECT_TRUE(delegate->tap_cancel());
EXPECT_TRUE(delegate->begin());
@@ -1479,7 +1479,7 @@ TEST_F(GestureRecognizerTest, GestureEventLongPressCancelledBySecondTap) {
delegate->Reset();
ui::TouchEvent release1(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId1, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release1);
EXPECT_FALSE(delegate->long_press());
EXPECT_TRUE(delegate->two_finger_tap());
EXPECT_FALSE(delegate->tap_cancel());
@@ -1498,7 +1498,7 @@ TEST_F(GestureRecognizerTest, GestureEventHorizontalRailScroll) {
ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(0, 0),
kTouchId, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
// Move the touch-point horizontally enough that it is considered a
// horizontal scroll.
@@ -1545,7 +1545,7 @@ TEST_F(GestureRecognizerTest, GestureEventVerticalRailScroll) {
ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(0, 0),
kTouchId, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
// Move the touch-point vertically enough that it is considered a
// vertical scroll.
@@ -1593,7 +1593,7 @@ TEST_F(GestureRecognizerTest, GestureTapFollowedByScroll) {
delegate->Reset();
ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
EXPECT_FALSE(delegate->tap());
EXPECT_TRUE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -1606,7 +1606,7 @@ TEST_F(GestureRecognizerTest, GestureTapFollowedByScroll) {
delegate->Reset();
ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId, tes.LeapForward(50));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
EXPECT_TRUE(delegate->tap());
EXPECT_FALSE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -1619,7 +1619,7 @@ TEST_F(GestureRecognizerTest, GestureTapFollowedByScroll) {
delegate->Reset();
ui::TouchEvent press1(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId, tes.LeapForward(1000));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1);
EXPECT_FALSE(delegate->tap());
EXPECT_TRUE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -1634,7 +1634,7 @@ TEST_F(GestureRecognizerTest, GestureTapFollowedByScroll) {
delegate->Reset();
ui::TouchEvent move(ui::ET_TOUCH_MOVED, gfx::Point(130, 230),
kTouchId, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move);
EXPECT_FALSE(delegate->tap());
EXPECT_FALSE(delegate->tap_down());
EXPECT_TRUE(delegate->tap_cancel());
@@ -1648,7 +1648,7 @@ TEST_F(GestureRecognizerTest, GestureTapFollowedByScroll) {
delegate->Reset();
ui::TouchEvent move1(ui::ET_TOUCH_MOVED, gfx::Point(110, 211),
kTouchId, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move1);
EXPECT_FALSE(delegate->tap());
EXPECT_FALSE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -1661,7 +1661,7 @@ TEST_F(GestureRecognizerTest, GestureTapFollowedByScroll) {
delegate->Reset();
ui::TouchEvent move2(ui::ET_TOUCH_MOVED, gfx::Point(140, 215),
kTouchId, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move2);
EXPECT_FALSE(delegate->tap());
EXPECT_FALSE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -1675,7 +1675,7 @@ TEST_F(GestureRecognizerTest, GestureTapFollowedByScroll) {
delegate->Reset();
ui::TouchEvent release1(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release1);
EXPECT_FALSE(delegate->tap());
EXPECT_FALSE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -1702,7 +1702,7 @@ TEST_F(GestureRecognizerTest, AsynchronousGestureRecognition) {
queued_delegate->Reset();
ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId1, GetTime());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
EXPECT_FALSE(queued_delegate->tap());
EXPECT_FALSE(queued_delegate->tap_down());
EXPECT_FALSE(queued_delegate->tap_cancel());
@@ -1717,7 +1717,7 @@ TEST_F(GestureRecognizerTest, AsynchronousGestureRecognition) {
ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId1, press.time_stamp() +
base::TimeDelta::FromMilliseconds(50));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
EXPECT_FALSE(queued_delegate->tap());
EXPECT_FALSE(queued_delegate->tap_down());
EXPECT_FALSE(queued_delegate->tap_cancel());
@@ -1736,7 +1736,7 @@ TEST_F(GestureRecognizerTest, AsynchronousGestureRecognition) {
delegate->Reset();
ui::TouchEvent press2(ui::ET_TOUCH_PRESSED, gfx::Point(10, 20),
kTouchId2, GetTime());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2);
EXPECT_FALSE(delegate->tap());
EXPECT_TRUE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -1748,7 +1748,7 @@ TEST_F(GestureRecognizerTest, AsynchronousGestureRecognition) {
ui::TouchEvent release2(ui::ET_TOUCH_RELEASED, gfx::Point(10, 20),
kTouchId2, GetTime());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release2);
// Process the first queued event.
queued_delegate->Reset();
@@ -1779,7 +1779,7 @@ TEST_F(GestureRecognizerTest, AsynchronousGestureRecognition) {
queued_delegate->Reset();
ui::TouchEvent press3(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId1, GetTime());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press3);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press3);
EXPECT_FALSE(queued_delegate->tap());
EXPECT_FALSE(queued_delegate->tap_down());
EXPECT_FALSE(queued_delegate->tap_cancel());
@@ -1795,7 +1795,7 @@ TEST_F(GestureRecognizerTest, AsynchronousGestureRecognition) {
delegate->Reset();
ui::TouchEvent press4(ui::ET_TOUCH_PRESSED, gfx::Point(103, 203),
kTouchId2, GetTime());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press4);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press4);
EXPECT_FALSE(delegate->tap());
EXPECT_FALSE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -1820,7 +1820,7 @@ TEST_F(GestureRecognizerTest, AsynchronousGestureRecognition) {
int x_move = ui::GestureConfiguration::max_touch_move_in_pixels_for_click();
ui::TouchEvent move(ui::ET_TOUCH_MOVED, gfx::Point(103 + x_move, 203),
kTouchId2, GetTime());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move);
EXPECT_FALSE(delegate->tap());
EXPECT_FALSE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -1894,7 +1894,7 @@ TEST_F(GestureRecognizerTest, GestureEventPinchFromScroll) {
delegate->Reset();
ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId1, tes.Now());
- root->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
+ root->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
EXPECT_2_EVENTS(delegate->events(),
ui::ET_GESTURE_BEGIN,
ui::ET_GESTURE_TAP_DOWN);
@@ -1904,7 +1904,7 @@ TEST_F(GestureRecognizerTest, GestureEventPinchFromScroll) {
delegate->Reset();
ui::TouchEvent move(ui::ET_TOUCH_MOVED, gfx::Point(130, 301),
kTouchId1, tes.Now());
- root->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move);
+ root->AsRootWindowHostDelegate()->OnHostTouchEvent(&move);
EXPECT_3_EVENTS(delegate->events(),
ui::ET_GESTURE_TAP_CANCEL,
ui::ET_GESTURE_SCROLL_BEGIN,
@@ -1915,7 +1915,7 @@ TEST_F(GestureRecognizerTest, GestureEventPinchFromScroll) {
delegate->Reset();
ui::TouchEvent press2(ui::ET_TOUCH_PRESSED, gfx::Point(10, 10),
kTouchId2, tes.Now());
- root->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press2);
+ root->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2);
EXPECT_2_EVENTS(delegate->events(),
ui::ET_GESTURE_BEGIN,
ui::ET_GESTURE_PINCH_BEGIN);
@@ -1926,7 +1926,7 @@ TEST_F(GestureRecognizerTest, GestureEventPinchFromScroll) {
delegate->Reset();
ui::TouchEvent move3(ui::ET_TOUCH_MOVED, gfx::Point(95, 201),
kTouchId1, tes.Now());
- root->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move3);
+ root->AsRootWindowHostDelegate()->OnHostTouchEvent(&move3);
EXPECT_2_EVENTS(delegate->events(),
ui::ET_GESTURE_PINCH_UPDATE,
ui::ET_GESTURE_SCROLL_UPDATE);
@@ -1937,7 +1937,7 @@ TEST_F(GestureRecognizerTest, GestureEventPinchFromScroll) {
delegate->Reset();
ui::TouchEvent move4(ui::ET_TOUCH_MOVED, gfx::Point(55, 15),
kTouchId2, tes.Now());
- root->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move4);
+ root->AsRootWindowHostDelegate()->OnHostTouchEvent(&move4);
EXPECT_2_EVENTS(delegate->events(),
ui::ET_GESTURE_PINCH_UPDATE,
ui::ET_GESTURE_SCROLL_UPDATE);
@@ -1948,7 +1948,7 @@ TEST_F(GestureRecognizerTest, GestureEventPinchFromScroll) {
delegate->Reset();
ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId1, tes.Now());
- root->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
+ root->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
EXPECT_2_EVENTS(delegate->events(),
ui::ET_GESTURE_PINCH_END,
ui::ET_GESTURE_END);
@@ -1959,7 +1959,7 @@ TEST_F(GestureRecognizerTest, GestureEventPinchFromScroll) {
delegate->Reset();
ui::TouchEvent move5(ui::ET_TOUCH_MOVED, gfx::Point(25, 10),
kTouchId2, tes.Now());
- root->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move5);
+ root->AsRootWindowHostDelegate()->OnHostTouchEvent(&move5);
EXPECT_1_EVENT(delegate->events(), ui::ET_GESTURE_SCROLL_UPDATE);
EXPECT_TRUE(delegate->bounding_box().IsEmpty());
}
@@ -1978,11 +1978,11 @@ scoped_ptr<GestureEventConsumeDelegate> delegate(
ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(101, 301),
kTouchId1, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
delegate->Reset();
ui::TouchEvent press2(ui::ET_TOUCH_PRESSED, gfx::Point(10, 10),
kTouchId2, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2);
EXPECT_FALSE(delegate->pinch_begin());
// Touch move triggers pinch begin.
@@ -1999,7 +1999,7 @@ scoped_ptr<GestureEventConsumeDelegate> delegate(
delegate->Reset();
ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId1, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
EXPECT_TRUE(delegate->pinch_end());
tes.SendScrollEvent(dispatcher(), 130, 230, kTouchId2, delegate.get());
@@ -2009,12 +2009,12 @@ scoped_ptr<GestureEventConsumeDelegate> delegate(
delegate->Reset();
ui::TouchEvent press3(ui::ET_TOUCH_PRESSED, gfx::Point(10, 10),
kTouchId1, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press3);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press3);
// Now the touch points are close. So we will go into two finger tap.
// Move the touch-point enough to break two-finger-tap and enter pinch.
ui::TouchEvent move2(ui::ET_TOUCH_MOVED, gfx::Point(101, 202),
kTouchId1, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move2);
EXPECT_TRUE(delegate->pinch_begin());
tes.SendScrollEvent(dispatcher(), 130, 230, kTouchId1, delegate.get());
@@ -2038,7 +2038,7 @@ TEST_F(GestureRecognizerTest, GestureEventPinchFromTap) {
delegate->Reset();
ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(101, 301),
kTouchId1, tes.Now());
- root->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
+ root->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
EXPECT_2_EVENTS(delegate->events(),
ui::ET_GESTURE_BEGIN,
ui::ET_GESTURE_TAP_DOWN);
@@ -2048,7 +2048,7 @@ TEST_F(GestureRecognizerTest, GestureEventPinchFromTap) {
delegate->Reset();
ui::TouchEvent press2(ui::ET_TOUCH_PRESSED, gfx::Point(10, 10),
kTouchId2, tes.Now());
- root->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press2);
+ root->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2);
EXPECT_2_EVENTS(delegate->events(),
ui::ET_GESTURE_TAP_CANCEL,
ui::ET_GESTURE_BEGIN);
@@ -2059,7 +2059,7 @@ TEST_F(GestureRecognizerTest, GestureEventPinchFromTap) {
delegate->Reset();
ui::TouchEvent move3(ui::ET_TOUCH_MOVED, gfx::Point(65, 201),
kTouchId1, tes.Now());
- root->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move3);
+ root->AsRootWindowHostDelegate()->OnHostTouchEvent(&move3);
EXPECT_2_EVENTS(delegate->events(),
ui::ET_GESTURE_PINCH_BEGIN,
ui::ET_GESTURE_SCROLL_BEGIN);
@@ -2070,7 +2070,7 @@ TEST_F(GestureRecognizerTest, GestureEventPinchFromTap) {
delegate->Reset();
ui::TouchEvent move4(ui::ET_TOUCH_MOVED, gfx::Point(55, 15),
kTouchId2, tes.Now());
- root->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move4);
+ root->AsRootWindowHostDelegate()->OnHostTouchEvent(&move4);
EXPECT_2_EVENTS(delegate->events(),
ui::ET_GESTURE_PINCH_UPDATE,
ui::ET_GESTURE_SCROLL_UPDATE);
@@ -2081,7 +2081,7 @@ TEST_F(GestureRecognizerTest, GestureEventPinchFromTap) {
delegate->Reset();
ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId1, tes.LeapForward(10));
- root->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
+ root->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
EXPECT_2_EVENTS(delegate->events(),
ui::ET_GESTURE_PINCH_END,
ui::ET_GESTURE_END);
@@ -2092,7 +2092,7 @@ TEST_F(GestureRecognizerTest, GestureEventPinchFromTap) {
delegate->Reset();
ui::TouchEvent move5(ui::ET_TOUCH_MOVED, gfx::Point(25, 10),
kTouchId2, tes.Now());
- root->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move5);
+ root->AsRootWindowHostDelegate()->OnHostTouchEvent(&move5);
EXPECT_1_EVENT(delegate->events(), ui::ET_GESTURE_SCROLL_UPDATE);
EXPECT_TRUE(delegate->bounding_box().IsEmpty());
}
@@ -2104,7 +2104,7 @@ TEST_F(GestureRecognizerTest, GestureEventIgnoresDisconnectedEvents) {
ui::TouchEvent release1(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
6, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release1);
EXPECT_FALSE(delegate->tap());
EXPECT_FALSE(delegate->tap_down());
}
@@ -2142,7 +2142,7 @@ TEST_F(GestureRecognizerTest, GestureEventTouchLockSelectsCorrectWindow) {
windows[i]->set_id(i);
ui::TouchEvent press(ui::ET_TOUCH_PRESSED, window_bounds[i].origin(),
i, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
}
// Touches should now be associated with the closest touch within
@@ -2159,10 +2159,10 @@ TEST_F(GestureRecognizerTest, GestureEventTouchLockSelectsCorrectWindow) {
// Add a touch in the middle associated with windows[2]
ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(0, 500),
kNumWindows, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
ui::TouchEvent move(ui::ET_TOUCH_MOVED, gfx::Point(250, 250),
kNumWindows, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move);
target = gesture_recognizer->GetTargetForLocation(gfx::Point(250, 250));
EXPECT_EQ("2", WindowIDAsString(target));
@@ -2183,7 +2183,7 @@ TEST_F(GestureRecognizerTest, GestureEventTouchLockSelectsCorrectWindow) {
// Move a touch associated with windows[2] to 1000, 1000
ui::TouchEvent move2(ui::ET_TOUCH_MOVED, gfx::Point(1000, 1000),
kNumWindows, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move2);
target = gesture_recognizer->GetTargetForLocation(gfx::Point(1000, 1000));
EXPECT_EQ("2", WindowIDAsString(target));
@@ -2214,11 +2214,11 @@ TEST_F(GestureRecognizerTest, GestureEventOutsideRootWindowTap) {
gfx::Point pos1(-10, -10);
ui::TouchEvent press1(ui::ET_TOUCH_PRESSED, pos1, 0, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1);
gfx::Point pos2(1000, 1000);
ui::TouchEvent press2(ui::ET_TOUCH_PRESSED, pos2, 1, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2);
// As these presses were outside the root window, they should be
// associated with the root window.
@@ -2239,10 +2239,10 @@ TEST_F(GestureRecognizerTest, NoTapWithPreventDefaultedRelease) {
delegate->Reset();
ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId, tes.LeapForward(50));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
delegate->Reset();
delegate->ReceivedAck();
@@ -2272,9 +2272,9 @@ TEST_F(GestureRecognizerTest, PinchScrollWithPreventDefaultedRelease) {
tes.LeapForward(200));
ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(15, 25), kTouchId1,
tes.LeapForward(50));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move);
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
delegate->Reset();
// Ack the press event.
@@ -2308,12 +2308,12 @@ TEST_F(GestureRecognizerTest, PinchScrollWithPreventDefaultedRelease) {
tes.LeapForward(14));
// Do a pinch.
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move);
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press2);
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move2);
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release2);
// Ack the press and move events.
delegate->Reset();
@@ -2442,14 +2442,14 @@ TEST_F(GestureRecognizerTest, PressDoesNotCrash) {
ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(45, 45), 7, tes.Now());
press.set_radius_x(40);
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
EXPECT_TRUE(delegate->tap_down());
EXPECT_EQ(gfx::Rect(5, 5, 80, 80).ToString(),
delegate->bounding_box().ToString());
delegate->Reset();
ui::TouchEvent press2(ui::ET_TOUCH_PRESSED, gfx::Point(55, 45), 7, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2);
// This new press should not generate a tap-down.
EXPECT_FALSE(delegate->begin());
@@ -2473,7 +2473,7 @@ TEST_F(GestureRecognizerTest, TwoFingerTap) {
delegate->Reset();
ui::TouchEvent press1(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId1, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1);
EXPECT_FALSE(delegate->tap());
EXPECT_TRUE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -2486,7 +2486,7 @@ TEST_F(GestureRecognizerTest, TwoFingerTap) {
delegate->Reset();
ui::TouchEvent press2(ui::ET_TOUCH_PRESSED, gfx::Point(130, 201),
kTouchId2, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2);
EXPECT_FALSE(delegate->tap());
EXPECT_FALSE(delegate->tap_down()); // no touch down for second tap.
EXPECT_TRUE(delegate->tap_cancel());
@@ -2500,10 +2500,10 @@ TEST_F(GestureRecognizerTest, TwoFingerTap) {
delegate->Reset();
ui::TouchEvent move1(ui::ET_TOUCH_MOVED, gfx::Point(102, 202),
kTouchId1, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move1);
ui::TouchEvent move2(ui::ET_TOUCH_MOVED, gfx::Point(131, 202),
kTouchId2, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move2);
EXPECT_FALSE(delegate->tap());
EXPECT_FALSE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -2519,7 +2519,7 @@ TEST_F(GestureRecognizerTest, TwoFingerTap) {
ui::TouchEvent release1(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId1, tes.LeapForward(50));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release1);
EXPECT_FALSE(delegate->tap());
EXPECT_FALSE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -2535,7 +2535,7 @@ TEST_F(GestureRecognizerTest, TwoFingerTap) {
ui::TouchEvent release2(ui::ET_TOUCH_RELEASED, gfx::Point(130, 201),
kTouchId2, tes.LeapForward(50));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release2);
EXPECT_FALSE(delegate->tap());
EXPECT_FALSE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -2561,19 +2561,19 @@ TEST_F(GestureRecognizerTest, TwoFingerTapExpired) {
delegate->Reset();
ui::TouchEvent press1(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId1, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1);
delegate->Reset();
ui::TouchEvent press2(ui::ET_TOUCH_PRESSED, gfx::Point(130, 201),
kTouchId2, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2);
// Send release event after sufficient delay so that two finger time expires.
delegate->Reset();
ui::TouchEvent release1(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId1, tes.LeapForward(1000));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release1);
EXPECT_FALSE(delegate->two_finger_tap());
// Lift second finger.
@@ -2583,7 +2583,7 @@ TEST_F(GestureRecognizerTest, TwoFingerTapExpired) {
ui::TouchEvent release2(ui::ET_TOUCH_RELEASED, gfx::Point(130, 201),
kTouchId2, tes.LeapForward(50));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release2);
EXPECT_FALSE(delegate->two_finger_tap());
}
@@ -2605,12 +2605,12 @@ TEST_F(GestureRecognizerTest, TwoFingerTapChangesToPinch) {
delegate->Reset();
ui::TouchEvent press1(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId1, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1);
delegate->Reset();
ui::TouchEvent press2(ui::ET_TOUCH_PRESSED, gfx::Point(130, 201),
kTouchId2, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2);
tes.SendScrollEvent(dispatcher(), 130, 230, kTouchId1, delegate.get());
EXPECT_FALSE(delegate->two_finger_tap());
@@ -2622,7 +2622,7 @@ TEST_F(GestureRecognizerTest, TwoFingerTapChangesToPinch) {
ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId2, tes.LeapForward(50));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
EXPECT_FALSE(delegate->two_finger_tap());
EXPECT_TRUE(delegate->pinch_end());
}
@@ -2636,12 +2636,12 @@ TEST_F(GestureRecognizerTest, TwoFingerTapChangesToPinch) {
delegate->Reset();
ui::TouchEvent press1(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId1, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1);
delegate->Reset();
ui::TouchEvent press2(ui::ET_TOUCH_PRESSED, gfx::Point(130, 201),
kTouchId2, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2);
tes.SendScrollEvent(dispatcher(), 101, 230, kTouchId2, delegate.get());
EXPECT_FALSE(delegate->two_finger_tap());
@@ -2653,7 +2653,7 @@ TEST_F(GestureRecognizerTest, TwoFingerTapChangesToPinch) {
ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId1, tes.LeapForward(50));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
EXPECT_FALSE(delegate->two_finger_tap());
EXPECT_TRUE(delegate->pinch_end());
}
@@ -2675,13 +2675,13 @@ TEST_F(GestureRecognizerTest, NoTwoFingerTapWhenFirstFingerHasScrolled) {
delegate->Reset();
ui::TouchEvent press1(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId1, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1);
tes.SendScrollEvent(dispatcher(), 130, 230, kTouchId1, delegate.get());
delegate->Reset();
ui::TouchEvent press2(ui::ET_TOUCH_PRESSED, gfx::Point(130, 201),
kTouchId2, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2);
EXPECT_TRUE(delegate->pinch_begin());
@@ -2691,7 +2691,7 @@ TEST_F(GestureRecognizerTest, NoTwoFingerTapWhenFirstFingerHasScrolled) {
ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId2, tes.LeapForward(50));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
EXPECT_FALSE(delegate->two_finger_tap());
EXPECT_TRUE(delegate->pinch_end());
}
@@ -2754,17 +2754,17 @@ TEST_F(GestureRecognizerTest, TwoFingerTapCancelled) {
delegate->Reset();
ui::TouchEvent press1(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId1, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1);
delegate->Reset();
ui::TouchEvent press2(ui::ET_TOUCH_PRESSED, gfx::Point(130, 201),
kTouchId2, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2);
delegate->Reset();
ui::TouchEvent cancel(ui::ET_TOUCH_CANCELLED, gfx::Point(130, 201),
kTouchId1, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&cancel);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&cancel);
EXPECT_FALSE(delegate->two_finger_tap());
// Make sure there is enough delay before the touch is released so that it
@@ -2773,7 +2773,7 @@ TEST_F(GestureRecognizerTest, TwoFingerTapCancelled) {
ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId2, tes.LeapForward(50));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
EXPECT_FALSE(delegate->two_finger_tap());
}
@@ -2786,17 +2786,17 @@ TEST_F(GestureRecognizerTest, TwoFingerTapCancelled) {
delegate->Reset();
ui::TouchEvent press1(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId1, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1);
delegate->Reset();
ui::TouchEvent press2(ui::ET_TOUCH_PRESSED, gfx::Point(130, 201),
kTouchId2, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2);
delegate->Reset();
ui::TouchEvent cancel(ui::ET_TOUCH_CANCELLED, gfx::Point(130, 201),
kTouchId2, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&cancel);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&cancel);
EXPECT_FALSE(delegate->two_finger_tap());
// Make sure there is enough delay before the touch is released so that it
@@ -2805,7 +2805,7 @@ TEST_F(GestureRecognizerTest, TwoFingerTapCancelled) {
ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId1, tes.LeapForward(50));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
EXPECT_FALSE(delegate->two_finger_tap());
}
}
@@ -2825,7 +2825,7 @@ TEST_F(GestureRecognizerTest, VeryWideTwoFingerTouchDownShouldBeAPinch) {
delegate->Reset();
ui::TouchEvent press1(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId1, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1);
EXPECT_FALSE(delegate->tap());
EXPECT_TRUE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -2838,7 +2838,7 @@ TEST_F(GestureRecognizerTest, VeryWideTwoFingerTouchDownShouldBeAPinch) {
delegate->Reset();
ui::TouchEvent press2(ui::ET_TOUCH_PRESSED, gfx::Point(430, 201),
kTouchId2, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2);
EXPECT_FALSE(delegate->tap());
EXPECT_FALSE(delegate->tap_down()); // no touch down for second tap.
EXPECT_TRUE(delegate->tap_cancel());
@@ -2852,7 +2852,7 @@ TEST_F(GestureRecognizerTest, VeryWideTwoFingerTouchDownShouldBeAPinch) {
delegate->Reset();
ui::TouchEvent move2(ui::ET_TOUCH_MOVED, gfx::Point(530, 301),
kTouchId2, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move2);
EXPECT_FALSE(delegate->tap());
EXPECT_FALSE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -2879,10 +2879,10 @@ TEST_F(GestureRecognizerTest, FlushAllOnHide) {
ui::TouchEvent press1(ui::ET_TOUCH_PRESSED, gfx::Point(10, 10),
kTouchId1, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1);
ui::TouchEvent press2(ui::ET_TOUCH_PRESSED, gfx::Point(20, 20),
kTouchId2, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2);
window->Hide();
EXPECT_EQ(NULL,
ui::GestureRecognizer::Get()->GetTouchLockedTarget(&press1));
@@ -2911,7 +2911,7 @@ TEST_F(GestureRecognizerTest, LongPressTimerStopsOnPreventDefaultedTouchMoves) {
delegate->Reset();
ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
// Scroll around, to cancel the long press
tes.SendScrollEvent(dispatcher(), 130, 230, kTouchId, delegate.get());
@@ -2964,7 +2964,7 @@ TEST_F(GestureRecognizerTest, GestureEventScrollTouchMoveConsumed) {
delegate->Reset();
ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
EXPECT_FALSE(delegate->tap());
EXPECT_TRUE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -2990,7 +2990,7 @@ TEST_F(GestureRecognizerTest, GestureEventScrollTouchMoveConsumed) {
delegate->Reset();
ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(130, 230),
kTouchId, tes.LeapForward(50));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
EXPECT_FALSE(delegate->tap());
EXPECT_FALSE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -3018,7 +3018,7 @@ TEST_F(GestureRecognizerTest, GestureEventScrollTwoFingerTouchMoveConsumed) {
delegate->Reset();
ui::TouchEvent press1(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId1, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1);
tes.SendScrollEvent(dispatcher(), 131, 231, kTouchId1, delegate.get());
// First finger touches down and moves.
@@ -3031,7 +3031,7 @@ TEST_F(GestureRecognizerTest, GestureEventScrollTwoFingerTouchMoveConsumed) {
// Second finger touches down and moves.
ui::TouchEvent press2(ui::ET_TOUCH_PRESSED, gfx::Point(130, 201),
kTouchId2, tes.LeapForward(50));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2);
tes.SendScrollEvent(dispatcher(), 161, 231, kTouchId2, delegate.get());
// PinchBegin & ScrollBegin were not sent if the touch-move events were
@@ -3088,8 +3088,8 @@ TEST_F(GestureRecognizerTest, GestureEventScrollTwoFingerTouchMoveConsumed) {
kTouchId1, tes.Now());
ui::TouchEvent release2(ui::ET_TOUCH_RELEASED, gfx::Point(130, 201),
kTouchId2, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release1);
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release2);
EXPECT_FALSE(delegate->tap());
// Touch release is not consumed, so we still see two finger tap.
@@ -3122,7 +3122,7 @@ TEST_F(GestureRecognizerTest, GestureEventScrollTouchMovePartialConsumed) {
delegate->Reset();
ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
EXPECT_FALSE(delegate->tap());
EXPECT_TRUE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -3189,7 +3189,7 @@ TEST_F(GestureRecognizerTest, GestureEventScrollTouchMovePartialConsumed) {
delegate->Reset();
ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId, tes.LeapForward(50));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
EXPECT_FALSE(delegate->tap());
EXPECT_FALSE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -3216,19 +3216,19 @@ TEST_F(GestureRecognizerTest, GestureEventDoubleTap) {
// First tap (tested in GestureEventTap)
ui::TouchEvent press1(ui::ET_TOUCH_PRESSED, gfx::Point(104, 201),
kTouchId, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1);
ui::TouchEvent release1(ui::ET_TOUCH_RELEASED, gfx::Point(104, 201),
kTouchId, tes.LeapForward(50));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release1);
delegate->Reset();
// Second tap
ui::TouchEvent press2(ui::ET_TOUCH_PRESSED, gfx::Point(101, 203),
kTouchId, tes.LeapForward(200));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2);
ui::TouchEvent release2(ui::ET_TOUCH_RELEASED, gfx::Point(102, 206),
kTouchId, tes.LeapForward(50));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release2);
EXPECT_TRUE(delegate->tap());
EXPECT_TRUE(delegate->tap_down());
@@ -3257,10 +3257,10 @@ TEST_F(GestureRecognizerTest, GestureEventTripleTap) {
// First tap (tested in GestureEventTap)
ui::TouchEvent press1(ui::ET_TOUCH_PRESSED, gfx::Point(104, 201),
kTouchId, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1);
ui::TouchEvent release1(ui::ET_TOUCH_RELEASED, gfx::Point(104, 201),
kTouchId, tes.LeapForward(50));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release1);
EXPECT_EQ(1, delegate->tap_count());
delegate->Reset();
@@ -3268,10 +3268,10 @@ TEST_F(GestureRecognizerTest, GestureEventTripleTap) {
// Second tap (tested in GestureEventDoubleTap)
ui::TouchEvent press2(ui::ET_TOUCH_PRESSED, gfx::Point(101, 203),
kTouchId, tes.LeapForward(200));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2);
ui::TouchEvent release2(ui::ET_TOUCH_RELEASED, gfx::Point(102, 206),
kTouchId, tes.LeapForward(50));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release2);
EXPECT_EQ(2, delegate->tap_count());
delegate->Reset();
@@ -3279,10 +3279,10 @@ TEST_F(GestureRecognizerTest, GestureEventTripleTap) {
// Third tap
ui::TouchEvent press3(ui::ET_TOUCH_PRESSED, gfx::Point(102, 206),
kTouchId, tes.LeapForward(200));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press3);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press3);
ui::TouchEvent release3(ui::ET_TOUCH_RELEASED, gfx::Point(102, 206),
kTouchId, tes.LeapForward(50));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release3);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release3);
EXPECT_TRUE(delegate->tap());
@@ -3312,19 +3312,19 @@ TEST_F(GestureRecognizerTest, TwoTapsFarApart) {
// First tap (tested in GestureEventTap)
ui::TouchEvent press1(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1);
ui::TouchEvent release1(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId, tes.LeapForward(50));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release1);
delegate->Reset();
// Second tap, close in time but far in distance
ui::TouchEvent press2(ui::ET_TOUCH_PRESSED, gfx::Point(201, 201),
kTouchId, tes.LeapForward(200));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2);
ui::TouchEvent release2(ui::ET_TOUCH_RELEASED, gfx::Point(201, 201),
kTouchId, tes.LeapForward(50));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release2);
EXPECT_TRUE(delegate->tap());
EXPECT_TRUE(delegate->tap_down());
@@ -3354,19 +3354,19 @@ TEST_F(GestureRecognizerTest, TwoTapsWithDelayBetween) {
// First tap (tested in GestureEventTap)
ui::TouchEvent press1(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1);
ui::TouchEvent release1(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId, tes.LeapForward(50));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release1);
delegate->Reset();
// Second tap, close in distance but after some delay
ui::TouchEvent press2(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId, tes.LeapForward(2000));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2);
ui::TouchEvent release2(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId, tes.LeapForward(50));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release2);
EXPECT_TRUE(delegate->tap());
EXPECT_TRUE(delegate->tap_down());
@@ -3396,7 +3396,7 @@ TEST_F(GestureRecognizerTest, BoundingBoxRadiusChange) {
ui::TouchEvent press1(
ui::ET_TOUCH_PRESSED, gfx::Point(101, 201), kTouchId, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1);
EXPECT_TRUE(delegate->bounding_box().IsEmpty());
delegate->Reset();
@@ -3405,7 +3405,7 @@ TEST_F(GestureRecognizerTest, BoundingBoxRadiusChange) {
ui::ET_TOUCH_PRESSED, gfx::Point(201, 201), kTouchId2,
tes.LeapForward(400));
press2.set_radius_x(5);
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2);
EXPECT_FALSE(delegate->pinch_begin());
EXPECT_EQ(gfx::Rect(101, 201, 100, 0).ToString(),
delegate->bounding_box().ToString());
@@ -3414,7 +3414,7 @@ TEST_F(GestureRecognizerTest, BoundingBoxRadiusChange) {
ui::TouchEvent move1(ui::ET_TOUCH_MOVED, gfx::Point(141, 201), kTouchId,
tes.LeapForward(40));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move1);
EXPECT_TRUE(delegate->pinch_begin());
EXPECT_EQ(gfx::Rect(141, 201, 60, 0).ToString(),
delegate->bounding_box().ToString());
@@ -3426,7 +3426,7 @@ TEST_F(GestureRecognizerTest, BoundingBoxRadiusChange) {
tes.LeapForward(40));
move2.set_radius_x(50);
move2.set_radius_y(60);
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move2);
EXPECT_FALSE(delegate->tap());
EXPECT_FALSE(delegate->tap_cancel());
EXPECT_FALSE(delegate->scroll_update());
@@ -3452,21 +3452,21 @@ TEST_F(GestureRecognizerTest, NoDriftInScroll) {
ui::TouchEvent press1(
ui::ET_TOUCH_PRESSED, gfx::Point(101, 208), kTouchId, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1);
EXPECT_TRUE(delegate->begin());
delegate->Reset();
ui::TouchEvent move1(ui::ET_TOUCH_MOVED, gfx::Point(101, 206), kTouchId,
tes.LeapForward(40));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move1);
EXPECT_FALSE(delegate->scroll_begin());
delegate->Reset();
ui::TouchEvent move2(ui::ET_TOUCH_MOVED, gfx::Point(101, 204), kTouchId,
tes.LeapForward(40));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move2);
EXPECT_TRUE(delegate->tap_cancel());
EXPECT_TRUE(delegate->scroll_begin());
EXPECT_TRUE(delegate->scroll_update());
@@ -3476,14 +3476,14 @@ TEST_F(GestureRecognizerTest, NoDriftInScroll) {
ui::TouchEvent move3(ui::ET_TOUCH_MOVED, gfx::Point(101, 204), kTouchId,
tes.LeapForward(40));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move3);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move3);
EXPECT_FALSE(delegate->scroll_update());
delegate->Reset();
ui::TouchEvent move4(ui::ET_TOUCH_MOVED, gfx::Point(101, 203), kTouchId,
tes.LeapForward(40));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move4);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move4);
EXPECT_TRUE(delegate->scroll_update());
EXPECT_EQ(-1, delegate->scroll_y());
@@ -3507,7 +3507,7 @@ TEST_F(GestureRecognizerTest, GestureEventConsumedTouchMoveCanFireTapCancel) {
kTouchId, tes.Now());
delegate->set_consume_touch_move(false);
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
delegate->set_consume_touch_move(true);
delegate->Reset();
// Move the touch-point enough so that it would normally be considered a
@@ -3544,8 +3544,8 @@ TEST_F(GestureRecognizerTest,
ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId, tes.Now());
ui::TouchEvent p2(ui::ET_TOUCH_PRESSED, gfx::Point(50, 50), 1, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&p2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&p2);
EXPECT_FALSE(delegate->tap());
EXPECT_TRUE(delegate->tap_down());
EXPECT_TRUE(delegate->tap_cancel());
@@ -3586,7 +3586,7 @@ TEST_F(GestureRecognizerTest, GestureEventShowPress) {
ui::TouchEvent press1(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1);
EXPECT_TRUE(delegate->tap_down());
EXPECT_TRUE(delegate->begin());
EXPECT_FALSE(delegate->tap_cancel());
@@ -3602,7 +3602,7 @@ TEST_F(GestureRecognizerTest, GestureEventShowPress) {
delegate->Reset();
ui::TouchEvent release1(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release1);
EXPECT_FALSE(delegate->long_press());
// Note the tap down isn't cancelled until the release
@@ -3634,7 +3634,7 @@ TEST_F(GestureRecognizerTest, GestureEventShowPressCancelledByScroll) {
ui::TouchEvent press1(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1);
EXPECT_TRUE(delegate->tap_down());
// We haven't pressed long enough for a show press to occur
@@ -3651,7 +3651,7 @@ TEST_F(GestureRecognizerTest, GestureEventShowPressCancelledByScroll) {
delegate->Reset();
ui::TouchEvent release1(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId, tes.LeapForward(10));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release1);
EXPECT_FALSE(delegate->show_press());
EXPECT_FALSE(delegate->tap_cancel());
}
@@ -3672,7 +3672,7 @@ TEST_F(GestureRecognizerTest, GestureEventShowPressSentOnTap) {
ui::TouchEvent press1(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1);
EXPECT_TRUE(delegate->tap_down());
// We haven't pressed long enough for a show press to occur
@@ -3682,7 +3682,7 @@ TEST_F(GestureRecognizerTest, GestureEventShowPressSentOnTap) {
delegate->Reset();
ui::TouchEvent release1(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId, tes.LeapForward(50));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release1);
EXPECT_TRUE(delegate->show_press());
EXPECT_FALSE(delegate->tap_cancel());
EXPECT_TRUE(delegate->tap());
diff --git a/ui/aura/remote_root_window_host_win.cc b/ui/aura/remote_root_window_host_win.cc
index 0c28bca..9043e0a 100644
--- a/ui/aura/remote_root_window_host_win.cc
+++ b/ui/aura/remote_root_window_host_win.cc
@@ -24,7 +24,7 @@ namespace aura {
namespace {
-const char* kWindowTreeHostWinKey = "__AURA_REMOTE_ROOT_WINDOW_HOST_WIN__";
+const char* kRootWindowHostWinKey = "__AURA_REMOTE_ROOT_WINDOW_HOST_WIN__";
// Sets the keystate for the virtual key passed in to down or up.
void SetKeyState(uint8* key_states, bool key_down, uint32 virtual_key_code) {
@@ -61,8 +61,8 @@ void HandleOpenFile(const base::string16& title,
const base::string16& filter,
const OpenFileCompletion& on_success,
const FileSelectionCanceled& on_failure) {
- DCHECK(aura::RemoteWindowTreeHostWin::Instance());
- aura::RemoteWindowTreeHostWin::Instance()->HandleOpenFile(title,
+ DCHECK(aura::RemoteRootWindowHostWin::Instance());
+ aura::RemoteRootWindowHostWin::Instance()->HandleOpenFile(title,
default_path,
filter,
on_success,
@@ -74,8 +74,8 @@ void HandleOpenMultipleFiles(const base::string16& title,
const base::string16& filter,
const OpenMultipleFilesCompletion& on_success,
const FileSelectionCanceled& on_failure) {
- DCHECK(aura::RemoteWindowTreeHostWin::Instance());
- aura::RemoteWindowTreeHostWin::Instance()->HandleOpenMultipleFiles(
+ DCHECK(aura::RemoteRootWindowHostWin::Instance());
+ aura::RemoteRootWindowHostWin::Instance()->HandleOpenMultipleFiles(
title,
default_path,
filter,
@@ -90,8 +90,8 @@ void HandleSaveFile(const base::string16& title,
const base::string16& default_extension,
const SaveFileCompletion& on_success,
const FileSelectionCanceled& on_failure) {
- DCHECK(aura::RemoteWindowTreeHostWin::Instance());
- aura::RemoteWindowTreeHostWin::Instance()->HandleSaveFile(title,
+ DCHECK(aura::RemoteRootWindowHostWin::Instance());
+ aura::RemoteRootWindowHostWin::Instance()->HandleSaveFile(title,
default_path,
filter,
filter_index,
@@ -103,62 +103,62 @@ void HandleSaveFile(const base::string16& title,
void HandleSelectFolder(const base::string16& title,
const SelectFolderCompletion& on_success,
const FileSelectionCanceled& on_failure) {
- DCHECK(aura::RemoteWindowTreeHostWin::Instance());
- aura::RemoteWindowTreeHostWin::Instance()->HandleSelectFolder(title,
+ DCHECK(aura::RemoteRootWindowHostWin::Instance());
+ aura::RemoteRootWindowHostWin::Instance()->HandleSelectFolder(title,
on_success,
on_failure);
}
void HandleActivateDesktop(const base::FilePath& shortcut,
const ActivateDesktopCompleted& on_success) {
- DCHECK(aura::RemoteWindowTreeHostWin::Instance());
- aura::RemoteWindowTreeHostWin::Instance()->HandleActivateDesktop(shortcut,
+ DCHECK(aura::RemoteRootWindowHostWin::Instance());
+ aura::RemoteRootWindowHostWin::Instance()->HandleActivateDesktop(shortcut,
on_success);
}
-RemoteWindowTreeHostWin* g_instance = NULL;
+RemoteRootWindowHostWin* g_instance = NULL;
-RemoteWindowTreeHostWin* RemoteWindowTreeHostWin::Instance() {
+RemoteRootWindowHostWin* RemoteRootWindowHostWin::Instance() {
if (g_instance)
return g_instance;
return Create(gfx::Rect());
}
-RemoteWindowTreeHostWin* RemoteWindowTreeHostWin::Create(
+RemoteRootWindowHostWin* RemoteRootWindowHostWin::Create(
const gfx::Rect& bounds) {
- g_instance = g_instance ? g_instance : new RemoteWindowTreeHostWin(bounds);
+ g_instance = g_instance ? g_instance : new RemoteRootWindowHostWin(bounds);
return g_instance;
}
-RemoteWindowTreeHostWin::RemoteWindowTreeHostWin(const gfx::Rect& bounds)
+RemoteRootWindowHostWin::RemoteRootWindowHostWin(const gfx::Rect& bounds)
: remote_window_(NULL),
host_(NULL),
ignore_mouse_moves_until_set_cursor_ack_(false),
event_flags_(0) {
- prop_.reset(new ui::ViewProp(NULL, kWindowTreeHostWinKey, this));
+ prop_.reset(new ui::ViewProp(NULL, kRootWindowHostWinKey, this));
CreateCompositor(GetAcceleratedWidget());
}
-RemoteWindowTreeHostWin::~RemoteWindowTreeHostWin() {
+RemoteRootWindowHostWin::~RemoteRootWindowHostWin() {
g_instance = NULL;
}
-void RemoteWindowTreeHostWin::Connected(IPC::Sender* host, HWND remote_window) {
+void RemoteRootWindowHostWin::Connected(IPC::Sender* host, HWND remote_window) {
CHECK(host_ == NULL);
host_ = host;
remote_window_ = remote_window;
}
-void RemoteWindowTreeHostWin::Disconnected() {
+void RemoteRootWindowHostWin::Disconnected() {
// Don't CHECK here, Disconnected is called on a channel error which can
// happen before we're successfully Connected.
host_ = NULL;
remote_window_ = NULL;
}
-bool RemoteWindowTreeHostWin::OnMessageReceived(const IPC::Message& message) {
+bool RemoteRootWindowHostWin::OnMessageReceived(const IPC::Message& message) {
bool handled = true;
- IPC_BEGIN_MESSAGE_MAP(RemoteWindowTreeHostWin, message)
+ IPC_BEGIN_MESSAGE_MAP(RemoteRootWindowHostWin, message)
IPC_MESSAGE_HANDLER(MetroViewerHostMsg_MouseMoved, OnMouseMoved)
IPC_MESSAGE_HANDLER(MetroViewerHostMsg_MouseButton, OnMouseButton)
IPC_MESSAGE_HANDLER(MetroViewerHostMsg_KeyDown, OnKeyDown)
@@ -191,7 +191,7 @@ bool RemoteWindowTreeHostWin::OnMessageReceived(const IPC::Message& message) {
return handled;
}
-void RemoteWindowTreeHostWin::HandleOpenURLOnDesktop(
+void RemoteRootWindowHostWin::HandleOpenURLOnDesktop(
const base::FilePath& shortcut,
const base::string16& url) {
if (!host_)
@@ -199,7 +199,7 @@ void RemoteWindowTreeHostWin::HandleOpenURLOnDesktop(
host_->Send(new MetroViewerHostMsg_OpenURLOnDesktop(shortcut, url));
}
-void RemoteWindowTreeHostWin::HandleActivateDesktop(
+void RemoteRootWindowHostWin::HandleActivateDesktop(
const base::FilePath& shortcut,
const ActivateDesktopCompleted& on_success) {
if (!host_)
@@ -209,7 +209,7 @@ void RemoteWindowTreeHostWin::HandleActivateDesktop(
host_->Send(new MetroViewerHostMsg_ActivateDesktop(shortcut));
}
-void RemoteWindowTreeHostWin::HandleOpenFile(
+void RemoteRootWindowHostWin::HandleOpenFile(
const base::string16& title,
const base::FilePath& default_path,
const base::string16& filter,
@@ -231,7 +231,7 @@ void RemoteWindowTreeHostWin::HandleOpenFile(
false));
}
-void RemoteWindowTreeHostWin::HandleOpenMultipleFiles(
+void RemoteRootWindowHostWin::HandleOpenMultipleFiles(
const base::string16& title,
const base::FilePath& default_path,
const base::string16& filter,
@@ -252,7 +252,7 @@ void RemoteWindowTreeHostWin::HandleOpenMultipleFiles(
true));
}
-void RemoteWindowTreeHostWin::HandleSaveFile(
+void RemoteRootWindowHostWin::HandleSaveFile(
const base::string16& title,
const base::FilePath& default_path,
const base::string16& filter,
@@ -279,7 +279,7 @@ void RemoteWindowTreeHostWin::HandleSaveFile(
host_->Send(new MetroViewerHostMsg_DisplayFileSaveAs(params));
}
-void RemoteWindowTreeHostWin::HandleSelectFolder(
+void RemoteRootWindowHostWin::HandleSelectFolder(
const base::string16& title,
const SelectFolderCompletion& on_success,
const FileSelectionCanceled& on_failure) {
@@ -295,69 +295,69 @@ void RemoteWindowTreeHostWin::HandleSelectFolder(
host_->Send(new MetroViewerHostMsg_DisplaySelectFolder(title));
}
-bool RemoteWindowTreeHostWin::IsForegroundWindow() {
+bool RemoteRootWindowHostWin::IsForegroundWindow() {
return ::GetForegroundWindow() == remote_window_;
}
-Window* RemoteWindowTreeHostWin::GetAshWindow() {
+Window* RemoteRootWindowHostWin::GetAshWindow() {
return GetRootWindow()->window();
}
-RootWindow* RemoteWindowTreeHostWin::GetRootWindow() {
+RootWindow* RemoteRootWindowHostWin::GetRootWindow() {
return delegate_->AsRootWindow();
}
-gfx::AcceleratedWidget RemoteWindowTreeHostWin::GetAcceleratedWidget() {
+gfx::AcceleratedWidget RemoteRootWindowHostWin::GetAcceleratedWidget() {
if (remote_window_)
return remote_window_;
// Getting here should only happen for ash_unittests.exe and related code.
return ::GetDesktopWindow();
}
-void RemoteWindowTreeHostWin::Show() {
+void RemoteRootWindowHostWin::Show() {
}
-void RemoteWindowTreeHostWin::Hide() {
+void RemoteRootWindowHostWin::Hide() {
NOTIMPLEMENTED();
}
-void RemoteWindowTreeHostWin::ToggleFullScreen() {
+void RemoteRootWindowHostWin::ToggleFullScreen() {
}
-gfx::Rect RemoteWindowTreeHostWin::GetBounds() const {
- gfx::Rect r(gfx::Point(0, 0), aura::WindowTreeHost::GetNativeScreenSize());
+gfx::Rect RemoteRootWindowHostWin::GetBounds() const {
+ gfx::Rect r(gfx::Point(0, 0), aura::RootWindowHost::GetNativeScreenSize());
return r;
}
-void RemoteWindowTreeHostWin::SetBounds(const gfx::Rect& bounds) {
+void RemoteRootWindowHostWin::SetBounds(const gfx::Rect& bounds) {
NotifyHostResized(bounds.size());
}
-gfx::Insets RemoteWindowTreeHostWin::GetInsets() const {
+gfx::Insets RemoteRootWindowHostWin::GetInsets() const {
return gfx::Insets();
}
-void RemoteWindowTreeHostWin::SetInsets(const gfx::Insets& insets) {
+void RemoteRootWindowHostWin::SetInsets(const gfx::Insets& insets) {
}
-gfx::Point RemoteWindowTreeHostWin::GetLocationOnNativeScreen() const {
+gfx::Point RemoteRootWindowHostWin::GetLocationOnNativeScreen() const {
return gfx::Point(0, 0);
}
-void RemoteWindowTreeHostWin::SetCursor(gfx::NativeCursor native_cursor) {
+void RemoteRootWindowHostWin::SetCursor(gfx::NativeCursor native_cursor) {
if (!host_)
return;
host_->Send(
new MetroViewerHostMsg_SetCursor(uint64(native_cursor.platform())));
}
-void RemoteWindowTreeHostWin::SetCapture() {
+void RemoteRootWindowHostWin::SetCapture() {
}
-void RemoteWindowTreeHostWin::ReleaseCapture() {
+void RemoteRootWindowHostWin::ReleaseCapture() {
}
-bool RemoteWindowTreeHostWin::QueryMouseLocation(gfx::Point* location_return) {
+bool RemoteRootWindowHostWin::QueryMouseLocation(gfx::Point* location_return) {
aura::client::CursorClient* cursor_client =
aura::client::GetCursorClient(GetRootWindow()->window());
if (cursor_client && !cursor_client->IsMouseEventsEnabled()) {
@@ -371,18 +371,18 @@ bool RemoteWindowTreeHostWin::QueryMouseLocation(gfx::Point* location_return) {
return true;
}
-bool RemoteWindowTreeHostWin::ConfineCursorToRootWindow() {
+bool RemoteRootWindowHostWin::ConfineCursorToRootWindow() {
return true;
}
-void RemoteWindowTreeHostWin::UnConfineCursor() {
+void RemoteRootWindowHostWin::UnConfineCursor() {
}
-void RemoteWindowTreeHostWin::OnCursorVisibilityChanged(bool show) {
+void RemoteRootWindowHostWin::OnCursorVisibilityChanged(bool show) {
NOTIMPLEMENTED();
}
-void RemoteWindowTreeHostWin::MoveCursorTo(const gfx::Point& location) {
+void RemoteRootWindowHostWin::MoveCursorTo(const gfx::Point& location) {
VLOG(1) << "In MoveCursorTo: " << location.x() << ", " << location.y();
if (!host_)
return;
@@ -407,19 +407,19 @@ void RemoteWindowTreeHostWin::MoveCursorTo(const gfx::Point& location) {
host_->Send(new MetroViewerHostMsg_SetCursorPos(location.x(), location.y()));
}
-void RemoteWindowTreeHostWin::PostNativeEvent(
+void RemoteRootWindowHostWin::PostNativeEvent(
const base::NativeEvent& native_event) {
}
-void RemoteWindowTreeHostWin::OnDeviceScaleFactorChanged(
+void RemoteRootWindowHostWin::OnDeviceScaleFactorChanged(
float device_scale_factor) {
NOTIMPLEMENTED();
}
-void RemoteWindowTreeHostWin::PrepareForShutdown() {
+void RemoteRootWindowHostWin::PrepareForShutdown() {
}
-void RemoteWindowTreeHostWin::OnMouseMoved(int32 x, int32 y, int32 flags) {
+void RemoteRootWindowHostWin::OnMouseMoved(int32 x, int32 y, int32 flags) {
if (ignore_mouse_moves_until_set_cursor_ack_)
return;
@@ -428,7 +428,7 @@ void RemoteWindowTreeHostWin::OnMouseMoved(int32 x, int32 y, int32 flags) {
delegate_->OnHostMouseEvent(&event);
}
-void RemoteWindowTreeHostWin::OnMouseButton(
+void RemoteRootWindowHostWin::OnMouseButton(
int32 x,
int32 y,
int32 extra,
@@ -462,7 +462,7 @@ void RemoteWindowTreeHostWin::OnMouseButton(
}
}
-void RemoteWindowTreeHostWin::OnKeyDown(uint32 vkey,
+void RemoteRootWindowHostWin::OnKeyDown(uint32 vkey,
uint32 repeat_count,
uint32 scan_code,
uint32 flags) {
@@ -470,7 +470,7 @@ void RemoteWindowTreeHostWin::OnKeyDown(uint32 vkey,
flags, false);
}
-void RemoteWindowTreeHostWin::OnKeyUp(uint32 vkey,
+void RemoteRootWindowHostWin::OnKeyUp(uint32 vkey,
uint32 repeat_count,
uint32 scan_code,
uint32 flags) {
@@ -478,7 +478,7 @@ void RemoteWindowTreeHostWin::OnKeyUp(uint32 vkey,
flags, false);
}
-void RemoteWindowTreeHostWin::OnChar(uint32 key_code,
+void RemoteRootWindowHostWin::OnChar(uint32 key_code,
uint32 repeat_count,
uint32 scan_code,
uint32 flags) {
@@ -486,11 +486,11 @@ void RemoteWindowTreeHostWin::OnChar(uint32 key_code,
scan_code, flags, true);
}
-void RemoteWindowTreeHostWin::OnWindowActivated() {
+void RemoteRootWindowHostWin::OnWindowActivated() {
delegate_->OnHostActivated();
}
-void RemoteWindowTreeHostWin::OnTouchDown(int32 x,
+void RemoteRootWindowHostWin::OnTouchDown(int32 x,
int32 y,
uint64 timestamp,
uint32 pointer_id) {
@@ -501,7 +501,7 @@ void RemoteWindowTreeHostWin::OnTouchDown(int32 x,
delegate_->OnHostTouchEvent(&event);
}
-void RemoteWindowTreeHostWin::OnTouchUp(int32 x,
+void RemoteRootWindowHostWin::OnTouchUp(int32 x,
int32 y,
uint64 timestamp,
uint32 pointer_id) {
@@ -512,7 +512,7 @@ void RemoteWindowTreeHostWin::OnTouchUp(int32 x,
delegate_->OnHostTouchEvent(&event);
}
-void RemoteWindowTreeHostWin::OnTouchMoved(int32 x,
+void RemoteRootWindowHostWin::OnTouchMoved(int32 x,
int32 y,
uint64 timestamp,
uint32 pointer_id) {
@@ -523,7 +523,7 @@ void RemoteWindowTreeHostWin::OnTouchMoved(int32 x,
delegate_->OnHostTouchEvent(&event);
}
-void RemoteWindowTreeHostWin::OnFileSaveAsDone(bool success,
+void RemoteRootWindowHostWin::OnFileSaveAsDone(bool success,
const base::FilePath& filename,
int filter_index) {
if (success)
@@ -535,7 +535,7 @@ void RemoteWindowTreeHostWin::OnFileSaveAsDone(bool success,
}
-void RemoteWindowTreeHostWin::OnFileOpenDone(bool success,
+void RemoteRootWindowHostWin::OnFileOpenDone(bool success,
const base::FilePath& filename) {
if (success)
file_open_completion_callback_.Run(base::FilePath(filename), 0, NULL);
@@ -545,7 +545,7 @@ void RemoteWindowTreeHostWin::OnFileOpenDone(bool success,
failure_callback_.Reset();
}
-void RemoteWindowTreeHostWin::OnMultiFileOpenDone(
+void RemoteRootWindowHostWin::OnMultiFileOpenDone(
bool success,
const std::vector<base::FilePath>& files) {
if (success)
@@ -556,7 +556,7 @@ void RemoteWindowTreeHostWin::OnMultiFileOpenDone(
failure_callback_.Reset();
}
-void RemoteWindowTreeHostWin::OnSelectFolderDone(
+void RemoteRootWindowHostWin::OnSelectFolderDone(
bool success,
const base::FilePath& folder) {
if (success)
@@ -567,22 +567,22 @@ void RemoteWindowTreeHostWin::OnSelectFolderDone(
failure_callback_.Reset();
}
-void RemoteWindowTreeHostWin::OnSetCursorPosAck() {
+void RemoteRootWindowHostWin::OnSetCursorPosAck() {
DCHECK(ignore_mouse_moves_until_set_cursor_ack_);
ignore_mouse_moves_until_set_cursor_ack_ = false;
}
-void RemoteWindowTreeHostWin::OnWindowSizeChanged(uint32 width, uint32 height) {
+void RemoteRootWindowHostWin::OnWindowSizeChanged(uint32 width, uint32 height) {
SetBounds(gfx::Rect(0, 0, width, height));
}
-void RemoteWindowTreeHostWin::OnDesktopActivated() {
+void RemoteRootWindowHostWin::OnDesktopActivated() {
ActivateDesktopCompleted temp = activate_completed_callback_;
activate_completed_callback_.Reset();
temp.Run();
}
-void RemoteWindowTreeHostWin::DispatchKeyboardMessage(ui::EventType type,
+void RemoteRootWindowHostWin::DispatchKeyboardMessage(ui::EventType type,
uint32 vkey,
uint32 repeat_count,
uint32 scan_code,
@@ -605,7 +605,7 @@ void RemoteWindowTreeHostWin::DispatchKeyboardMessage(ui::EventType type,
}
}
-void RemoteWindowTreeHostWin::SetEventFlags(uint32 flags) {
+void RemoteRootWindowHostWin::SetEventFlags(uint32 flags) {
if (flags == event_flags_)
return;
event_flags_ = flags;
diff --git a/ui/aura/remote_root_window_host_win.h b/ui/aura/remote_root_window_host_win.h
index f9ea9e1..ed974d3 100644
--- a/ui/aura/remote_root_window_host_win.h
+++ b/ui/aura/remote_root_window_host_win.h
@@ -89,15 +89,15 @@ AURA_EXPORT void HandleActivateDesktop(
const base::FilePath& shortcut,
const ActivateDesktopCompleted& on_success);
-// WindowTreeHost implementaton that receives events from a different
+// RootWindowHost implementaton that receives events from a different
// process. In the case of Windows this is the Windows 8 (aka Metro)
// frontend process, which forwards input events to this class.
-class AURA_EXPORT RemoteWindowTreeHostWin : public WindowTreeHost {
+class AURA_EXPORT RemoteRootWindowHostWin : public RootWindowHost {
public:
- // Returns the only RemoteWindowTreeHostWin, if this is the first time
+ // Returns the only RemoteRootWindowHostWin, if this is the first time
// this function is called, it will call Create() wiht empty bounds.
- static RemoteWindowTreeHostWin* Instance();
- static RemoteWindowTreeHostWin* Create(const gfx::Rect& bounds);
+ static RemoteRootWindowHostWin* Instance();
+ static RemoteRootWindowHostWin* Create(const gfx::Rect& bounds);
// Called when the remote process has established its IPC connection.
// The |host| can be used when we need to send a message to it and
@@ -147,8 +147,8 @@ class AURA_EXPORT RemoteWindowTreeHostWin : public WindowTreeHost {
bool IsForegroundWindow();
private:
- explicit RemoteWindowTreeHostWin(const gfx::Rect& bounds);
- virtual ~RemoteWindowTreeHostWin();
+ explicit RemoteRootWindowHostWin(const gfx::Rect& bounds);
+ virtual ~RemoteRootWindowHostWin();
// IPC message handing methods:
void OnMouseMoved(int32 x, int32 y, int32 flags);
@@ -184,7 +184,7 @@ class AURA_EXPORT RemoteWindowTreeHostWin : public WindowTreeHost {
void OnWindowSizeChanged(uint32 width, uint32 height);
void OnDesktopActivated();
- // WindowTreeHost overrides:
+ // RootWindowHost overrides:
virtual RootWindow* GetRootWindow() OVERRIDE;
virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE;
virtual void Show() OVERRIDE;
@@ -208,7 +208,7 @@ class AURA_EXPORT RemoteWindowTreeHostWin : public WindowTreeHost {
virtual void PrepareForShutdown() OVERRIDE;
// Helper function to dispatch a keyboard message to the desired target.
- // The default target is the WindowTreeHostDelegate. For nested message loop
+ // The default target is the RootWindowHostDelegate. For nested message loop
// invocations we post a synthetic keyboard message directly into the message
// loop. The dispatcher for the nested loop would then decide how this
// message is routed.
@@ -262,7 +262,7 @@ class AURA_EXPORT RemoteWindowTreeHostWin : public WindowTreeHost {
// description of SetEventFlags().
uint32 event_flags_;
- DISALLOW_COPY_AND_ASSIGN(RemoteWindowTreeHostWin);
+ DISALLOW_COPY_AND_ASSIGN(RemoteRootWindowHostWin);
};
} // namespace aura
diff --git a/ui/aura/root_window.cc b/ui/aura/root_window.cc
index 01d5f25..ee2bc4f 100644
--- a/ui/aura/root_window.cc
+++ b/ui/aura/root_window.cc
@@ -69,10 +69,10 @@ void SetLastMouseLocation(const Window* root_window,
}
}
-WindowTreeHost* CreateHost(RootWindow* root_window,
+RootWindowHost* CreateHost(RootWindow* root_window,
const RootWindow::CreateParams& params) {
- WindowTreeHost* host = params.host ?
- params.host : WindowTreeHost::Create(params.initial_bounds);
+ RootWindowHost* host = params.host ?
+ params.host : RootWindowHost::Create(params.initial_bounds);
host->set_delegate(root_window);
return host;
}
@@ -169,7 +169,7 @@ void RootWindow::RepostEvent(const ui::LocatedEvent& event) {
}
}
-WindowTreeHostDelegate* RootWindow::AsWindowTreeHostDelegate() {
+RootWindowHostDelegate* RootWindow::AsRootWindowHostDelegate() {
return this;
}
@@ -321,9 +321,9 @@ void RootWindow::OnKeyboardMappingChanged() {
OnKeyboardMappingChanged(this));
}
-void RootWindow::OnWindowTreeHostCloseRequested() {
+void RootWindow::OnRootWindowHostCloseRequested() {
FOR_EACH_OBSERVER(RootWindowObserver, observers_,
- OnWindowTreeHostCloseRequested(this));
+ OnRootWindowHostCloseRequested(this));
}
void RootWindow::AddRootWindowObserver(RootWindowObserver* observer) {
@@ -589,7 +589,7 @@ void RootWindow::OnLayerAnimationAborted(
}
////////////////////////////////////////////////////////////////////////////////
-// RootWindow, WindowTreeHostDelegate implementation:
+// RootWindow, RootWindowHostDelegate implementation:
bool RootWindow::OnHostKeyEvent(ui::KeyEvent* event) {
DispatchDetails details = DispatchHeldEvents();
@@ -696,7 +696,7 @@ void RootWindow::OnHostMoved(const gfx::Point& origin) {
"origin", origin.ToString());
FOR_EACH_OBSERVER(RootWindowObserver, observers_,
- OnWindowTreeHostMoved(this, origin));
+ OnRootWindowHostMoved(this, origin));
}
void RootWindow::OnHostResized(const gfx::Size& size) {
@@ -708,7 +708,7 @@ void RootWindow::OnHostResized(const gfx::Size& size) {
return;
FOR_EACH_OBSERVER(RootWindowObserver, observers_,
- OnWindowTreeHostResized(this));
+ OnRootWindowHostResized(this));
}
RootWindow* RootWindow::AsRootWindow() {
diff --git a/ui/aura/root_window.h b/ui/aura/root_window.h
index f9a17af..7f8d0b1 100644
--- a/ui/aura/root_window.h
+++ b/ui/aura/root_window.h
@@ -45,7 +45,7 @@ class ViewProp;
namespace aura {
class RootWindow;
-class WindowTreeHost;
+class RootWindowHost;
class RootWindowObserver;
class TestScreen;
@@ -54,7 +54,7 @@ class AURA_EXPORT RootWindow : public ui::EventDispatcherDelegate,
public ui::GestureEventHelper,
public ui::LayerAnimationObserver,
public aura::client::CaptureDelegate,
- public aura::WindowTreeHostDelegate {
+ public aura::RootWindowHostDelegate {
public:
struct AURA_EXPORT CreateParams {
// CreateParams with initial_bounds and default host in pixel.
@@ -65,13 +65,13 @@ class AURA_EXPORT RootWindow : public ui::EventDispatcherDelegate,
// A host to use in place of the default one that RootWindow will create.
// NULL by default.
- WindowTreeHost* host;
+ RootWindowHost* host;
};
explicit RootWindow(const CreateParams& params);
virtual ~RootWindow();
- // Returns the WindowTreeHost for the specified accelerated widget, or NULL
+ // Returns the RootWindowHost for the specified accelerated widget, or NULL
// if there is none associated.
static RootWindow* GetForAcceleratedWidget(gfx::AcceleratedWidget widget);
@@ -79,11 +79,11 @@ class AURA_EXPORT RootWindow : public ui::EventDispatcherDelegate,
return const_cast<Window*>(const_cast<const RootWindow*>(this)->window());
}
const Window* window() const { return window_.get(); }
- WindowTreeHost* host() {
- return const_cast<WindowTreeHost*>(
+ RootWindowHost* host() {
+ return const_cast<RootWindowHost*>(
const_cast<const RootWindow*>(this)->host());
}
- const WindowTreeHost* host() const { return host_.get(); }
+ const RootWindowHost* host() const { return host_.get(); }
gfx::NativeCursor last_cursor() const { return last_cursor_; }
Window* mouse_pressed_handler() { return mouse_pressed_handler_; }
Window* mouse_moved_handler() { return mouse_moved_handler_; }
@@ -99,7 +99,7 @@ class AURA_EXPORT RootWindow : public ui::EventDispatcherDelegate,
// types (although the latter is currently a no-op).
void RepostEvent(const ui::LocatedEvent& event);
- WindowTreeHostDelegate* AsWindowTreeHostDelegate();
+ RootWindowHostDelegate* AsRootWindowHostDelegate();
// Gets/sets the size of the host window.
void SetHostSize(const gfx::Size& size_in_pixel);
@@ -130,7 +130,7 @@ class AURA_EXPORT RootWindow : public ui::EventDispatcherDelegate,
// Handles a gesture event. Returns true if handled. Unlike the other
// event-dispatching function (e.g. for touch/mouse/keyboard events), gesture
- // events are dispatched from GestureRecognizer instead of WindowTreeHost.
+ // events are dispatched from GestureRecognizer instead of RootWindowHost.
void DispatchGestureEvent(ui::GestureEvent* event);
// Invoked when |window| is being destroyed.
@@ -159,7 +159,7 @@ class AURA_EXPORT RootWindow : public ui::EventDispatcherDelegate,
void OnKeyboardMappingChanged();
// The system windowing system has sent a request that we close our window.
- void OnWindowTreeHostCloseRequested();
+ void OnRootWindowHostCloseRequested();
// Add/remove observer. There is no need to remove the observer if
// the root window is being deleted. In particular, you SHOULD NOT remove
@@ -208,7 +208,7 @@ class AURA_EXPORT RootWindow : public ui::EventDispatcherDelegate,
};
// Updates the event with the appropriate transform for the device scale
- // factor. The WindowTreeHostDelegate dispatches events in the physical pixel
+ // factor. The RootWindowHostDelegate dispatches events in the physical pixel
// coordinate. But the event processing from RootWindow onwards happen in
// device-independent pixel coordinate. So it is necessary to update the event
// received from the host.
@@ -264,7 +264,7 @@ class AURA_EXPORT RootWindow : public ui::EventDispatcherDelegate,
virtual void OnLayerAnimationAborted(
ui::LayerAnimationSequence* animation) OVERRIDE;
- // Overridden from aura::WindowTreeHostDelegate:
+ // Overridden from aura::RootWindowHostDelegate:
virtual bool OnHostKeyEvent(ui::KeyEvent* event) OVERRIDE;
virtual bool OnHostMouseEvent(ui::MouseEvent* event) OVERRIDE;
virtual bool OnHostScrollEvent(ui::ScrollEvent* event) OVERRIDE;
@@ -286,7 +286,7 @@ class AURA_EXPORT RootWindow : public ui::EventDispatcherDelegate,
// dispatch held and newly incoming mouse and touch events, typically when an
// event other than one of these needs dispatching or a matching
// ReleaseMouseMoves()/ReleaseTouchMoves() is called. NOTE: because these
- // methods dispatch events from WindowTreeHost the coordinates are in terms of
+ // methods dispatch events from RootWindowHost the coordinates are in terms of
// the root.
ui::EventDispatchDetails DispatchMouseEventImpl(ui::MouseEvent* event)
WARN_UNUSED_RESULT;
@@ -312,7 +312,7 @@ class AURA_EXPORT RootWindow : public ui::EventDispatcherDelegate,
// TODO(beng): evaluate the ideal ownership model.
scoped_ptr<Window> window_;
- scoped_ptr<WindowTreeHost> host_;
+ scoped_ptr<RootWindowHost> host_;
// Touch ids that are currently down.
uint32 touch_ids_down_;
diff --git a/ui/aura/root_window_host_ozone.cc b/ui/aura/root_window_host_ozone.cc
index 9bb2a2b..9f324c2 100644
--- a/ui/aura/root_window_host_ozone.cc
+++ b/ui/aura/root_window_host_ozone.cc
@@ -11,7 +11,7 @@
namespace aura {
-WindowTreeHostOzone::WindowTreeHostOzone(const gfx::Rect& bounds)
+RootWindowHostOzone::RootWindowHostOzone(const gfx::Rect& bounds)
: widget_(0),
bounds_(bounds) {
ui::OzonePlatform::Initialize();
@@ -31,11 +31,11 @@ WindowTreeHostOzone::WindowTreeHostOzone(const gfx::Rect& bounds)
CreateCompositor(GetAcceleratedWidget());
}
-WindowTreeHostOzone::~WindowTreeHostOzone() {
+RootWindowHostOzone::~RootWindowHostOzone() {
base::MessagePumpOzone::Current()->RemoveDispatcherForRootWindow(0);
}
-bool WindowTreeHostOzone::Dispatch(const base::NativeEvent& ne) {
+bool RootWindowHostOzone::Dispatch(const base::NativeEvent& ne) {
ui::Event* event = static_cast<ui::Event*>(ne);
if (event->IsTouchEvent()) {
ui::TouchEvent* touchev = static_cast<ui::TouchEvent*>(ne);
@@ -50,83 +50,83 @@ bool WindowTreeHostOzone::Dispatch(const base::NativeEvent& ne) {
return true;
}
-RootWindow* WindowTreeHostOzone::GetRootWindow() {
+RootWindow* RootWindowHostOzone::GetRootWindow() {
return delegate_->AsRootWindow();
}
-gfx::AcceleratedWidget WindowTreeHostOzone::GetAcceleratedWidget() {
+gfx::AcceleratedWidget RootWindowHostOzone::GetAcceleratedWidget() {
return widget_;
}
-void WindowTreeHostOzone::Show() { NOTIMPLEMENTED(); }
+void RootWindowHostOzone::Show() { NOTIMPLEMENTED(); }
-void WindowTreeHostOzone::Hide() { NOTIMPLEMENTED(); }
+void RootWindowHostOzone::Hide() { NOTIMPLEMENTED(); }
-void WindowTreeHostOzone::ToggleFullScreen() { NOTIMPLEMENTED(); }
+void RootWindowHostOzone::ToggleFullScreen() { NOTIMPLEMENTED(); }
-gfx::Rect WindowTreeHostOzone::GetBounds() const { return bounds_; }
+gfx::Rect RootWindowHostOzone::GetBounds() const { return bounds_; }
-void WindowTreeHostOzone::SetBounds(const gfx::Rect& bounds) {
+void RootWindowHostOzone::SetBounds(const gfx::Rect& bounds) {
NOTIMPLEMENTED();
}
-gfx::Insets WindowTreeHostOzone::GetInsets() const { return gfx::Insets(); }
+gfx::Insets RootWindowHostOzone::GetInsets() const { return gfx::Insets(); }
-void WindowTreeHostOzone::SetInsets(const gfx::Insets& insets) {
+void RootWindowHostOzone::SetInsets(const gfx::Insets& insets) {
NOTIMPLEMENTED();
}
-gfx::Point WindowTreeHostOzone::GetLocationOnNativeScreen() const {
+gfx::Point RootWindowHostOzone::GetLocationOnNativeScreen() const {
return bounds_.origin();
}
-void WindowTreeHostOzone::SetCapture() { NOTIMPLEMENTED(); }
+void RootWindowHostOzone::SetCapture() { NOTIMPLEMENTED(); }
-void WindowTreeHostOzone::ReleaseCapture() { NOTIMPLEMENTED(); }
+void RootWindowHostOzone::ReleaseCapture() { NOTIMPLEMENTED(); }
-void WindowTreeHostOzone::SetCursor(gfx::NativeCursor cursor) {
+void RootWindowHostOzone::SetCursor(gfx::NativeCursor cursor) {
NOTIMPLEMENTED();
}
-bool WindowTreeHostOzone::QueryMouseLocation(gfx::Point* location_return) {
+bool RootWindowHostOzone::QueryMouseLocation(gfx::Point* location_return) {
NOTIMPLEMENTED();
return false;
}
-bool WindowTreeHostOzone::ConfineCursorToRootWindow() {
+bool RootWindowHostOzone::ConfineCursorToRootWindow() {
NOTIMPLEMENTED();
return false;
}
-void WindowTreeHostOzone::UnConfineCursor() { NOTIMPLEMENTED(); }
+void RootWindowHostOzone::UnConfineCursor() { NOTIMPLEMENTED(); }
-void WindowTreeHostOzone::OnCursorVisibilityChanged(bool show) {
+void RootWindowHostOzone::OnCursorVisibilityChanged(bool show) {
NOTIMPLEMENTED();
}
-void WindowTreeHostOzone::MoveCursorTo(const gfx::Point& location) {
+void RootWindowHostOzone::MoveCursorTo(const gfx::Point& location) {
NOTIMPLEMENTED();
}
-void WindowTreeHostOzone::PostNativeEvent(
+void RootWindowHostOzone::PostNativeEvent(
const base::NativeEvent& native_event) {
NOTIMPLEMENTED();
}
-void WindowTreeHostOzone::OnDeviceScaleFactorChanged(
+void RootWindowHostOzone::OnDeviceScaleFactorChanged(
float device_scale_factor) {
NOTIMPLEMENTED();
}
-void WindowTreeHostOzone::PrepareForShutdown() { NOTIMPLEMENTED(); }
+void RootWindowHostOzone::PrepareForShutdown() { NOTIMPLEMENTED(); }
// static
-WindowTreeHost* WindowTreeHost::Create(const gfx::Rect& bounds) {
- return new WindowTreeHostOzone(bounds);
+RootWindowHost* RootWindowHost::Create(const gfx::Rect& bounds) {
+ return new RootWindowHostOzone(bounds);
}
// static
-gfx::Size WindowTreeHost::GetNativeScreenSize() {
+gfx::Size RootWindowHost::GetNativeScreenSize() {
NOTIMPLEMENTED();
return gfx::Size();
}
diff --git a/ui/aura/root_window_host_ozone.h b/ui/aura/root_window_host_ozone.h
index a026994..41f6a8e 100644
--- a/ui/aura/root_window_host_ozone.h
+++ b/ui/aura/root_window_host_ozone.h
@@ -15,17 +15,17 @@
namespace aura {
-class WindowTreeHostOzone : public WindowTreeHost,
+class RootWindowHostOzone : public RootWindowHost,
public base::MessageLoop::Dispatcher {
public:
- explicit WindowTreeHostOzone(const gfx::Rect& bounds);
- virtual ~WindowTreeHostOzone();
+ explicit RootWindowHostOzone(const gfx::Rect& bounds);
+ virtual ~RootWindowHostOzone();
private:
// Overridden from Dispatcher overrides:
virtual bool Dispatch(const base::NativeEvent& event) OVERRIDE;
- // WindowTreeHost Overrides.
+ // RootWindowHost Overrides.
virtual RootWindow* GetRootWindow() OVERRIDE;
virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE;
virtual void Show() OVERRIDE;
@@ -51,7 +51,7 @@ class WindowTreeHostOzone : public WindowTreeHost,
gfx::AcceleratedWidget widget_;
gfx::Rect bounds_;
- DISALLOW_COPY_AND_ASSIGN(WindowTreeHostOzone);
+ DISALLOW_COPY_AND_ASSIGN(RootWindowHostOzone);
};
} // namespace aura
diff --git a/ui/aura/root_window_host_win.cc b/ui/aura/root_window_host_win.cc
index e4ae7f6..7bf4284 100644
--- a/ui/aura/root_window_host_win.cc
+++ b/ui/aura/root_window_host_win.cc
@@ -29,17 +29,17 @@ bool use_popup_as_root_window_for_test = false;
} // namespace
// static
-WindowTreeHost* WindowTreeHost::Create(const gfx::Rect& bounds) {
- return new WindowTreeHostWin(bounds);
+RootWindowHost* RootWindowHost::Create(const gfx::Rect& bounds) {
+ return new RootWindowHostWin(bounds);
}
// static
-gfx::Size WindowTreeHost::GetNativeScreenSize() {
+gfx::Size RootWindowHost::GetNativeScreenSize() {
return gfx::Size(GetSystemMetrics(SM_CXSCREEN),
GetSystemMetrics(SM_CYSCREEN));
}
-WindowTreeHostWin::WindowTreeHostWin(const gfx::Rect& bounds)
+RootWindowHostWin::RootWindowHostWin(const gfx::Rect& bounds)
: fullscreen_(false),
has_capture_(false),
saved_window_style_(0),
@@ -51,27 +51,27 @@ WindowTreeHostWin::WindowTreeHostWin(const gfx::Rect& bounds)
CreateCompositor(GetAcceleratedWidget());
}
-WindowTreeHostWin::~WindowTreeHostWin() {
+RootWindowHostWin::~RootWindowHostWin() {
DestroyWindow(hwnd());
}
-RootWindow* WindowTreeHostWin::GetRootWindow() {
+RootWindow* RootWindowHostWin::GetRootWindow() {
return delegate_->AsRootWindow();
}
-gfx::AcceleratedWidget WindowTreeHostWin::GetAcceleratedWidget() {
+gfx::AcceleratedWidget RootWindowHostWin::GetAcceleratedWidget() {
return hwnd();
}
-void WindowTreeHostWin::Show() {
+void RootWindowHostWin::Show() {
ShowWindow(hwnd(), SW_SHOWNORMAL);
}
-void WindowTreeHostWin::Hide() {
+void RootWindowHostWin::Hide() {
NOTIMPLEMENTED();
}
-void WindowTreeHostWin::ToggleFullScreen() {
+void RootWindowHostWin::ToggleFullScreen() {
gfx::Rect target_rect;
if (!fullscreen_) {
fullscreen_ = true;
@@ -103,13 +103,13 @@ void WindowTreeHostWin::ToggleFullScreen() {
SWP_NOZORDER | SWP_NOACTIVATE | SWP_FRAMECHANGED);
}
-gfx::Rect WindowTreeHostWin::GetBounds() const {
+gfx::Rect RootWindowHostWin::GetBounds() const {
RECT r;
GetClientRect(hwnd(), &r);
return gfx::Rect(r);
}
-void WindowTreeHostWin::SetBounds(const gfx::Rect& bounds) {
+void RootWindowHostWin::SetBounds(const gfx::Rect& bounds) {
if (fullscreen_) {
saved_window_rect_.right = saved_window_rect_.left + bounds.width();
saved_window_rect_.bottom = saved_window_rect_.top + bounds.height();
@@ -143,21 +143,21 @@ void WindowTreeHostWin::SetBounds(const gfx::Rect& bounds) {
NotifyHostResized(bounds.size());
}
-gfx::Insets WindowTreeHostWin::GetInsets() const {
+gfx::Insets RootWindowHostWin::GetInsets() const {
return gfx::Insets();
}
-void WindowTreeHostWin::SetInsets(const gfx::Insets& insets) {
+void RootWindowHostWin::SetInsets(const gfx::Insets& insets) {
}
-gfx::Point WindowTreeHostWin::GetLocationOnNativeScreen() const {
+gfx::Point RootWindowHostWin::GetLocationOnNativeScreen() const {
RECT r;
GetClientRect(hwnd(), &r);
return gfx::Point(r.left, r.top);
}
-void WindowTreeHostWin::SetCursor(gfx::NativeCursor native_cursor) {
+void RootWindowHostWin::SetCursor(gfx::NativeCursor native_cursor) {
// Custom web cursors are handled directly.
if (native_cursor == ui::kCursorCustom)
return;
@@ -167,21 +167,21 @@ void WindowTreeHostWin::SetCursor(gfx::NativeCursor native_cursor) {
::SetCursor(native_cursor.platform());
}
-void WindowTreeHostWin::SetCapture() {
+void RootWindowHostWin::SetCapture() {
if (!has_capture_) {
has_capture_ = true;
::SetCapture(hwnd());
}
}
-void WindowTreeHostWin::ReleaseCapture() {
+void RootWindowHostWin::ReleaseCapture() {
if (has_capture_) {
has_capture_ = false;
::ReleaseCapture();
}
}
-bool WindowTreeHostWin::QueryMouseLocation(gfx::Point* location_return) {
+bool RootWindowHostWin::QueryMouseLocation(gfx::Point* location_return) {
client::CursorClient* cursor_client =
client::GetCursorClient(GetRootWindow()->window());
if (cursor_client && !cursor_client->IsMouseEventsEnabled()) {
@@ -200,44 +200,44 @@ bool WindowTreeHostWin::QueryMouseLocation(gfx::Point* location_return) {
pt.y >= 0 && static_cast<int>(pt.y) < size.height());
}
-bool WindowTreeHostWin::ConfineCursorToRootWindow() {
+bool RootWindowHostWin::ConfineCursorToRootWindow() {
RECT window_rect;
GetWindowRect(hwnd(), &window_rect);
return ClipCursor(&window_rect) != 0;
}
-void WindowTreeHostWin::UnConfineCursor() {
+void RootWindowHostWin::UnConfineCursor() {
ClipCursor(NULL);
}
-void WindowTreeHostWin::OnCursorVisibilityChanged(bool show) {
+void RootWindowHostWin::OnCursorVisibilityChanged(bool show) {
NOTIMPLEMENTED();
}
-void WindowTreeHostWin::MoveCursorTo(const gfx::Point& location) {
+void RootWindowHostWin::MoveCursorTo(const gfx::Point& location) {
// Deliberately not implemented.
}
-void WindowTreeHostWin::PostNativeEvent(const base::NativeEvent& native_event) {
+void RootWindowHostWin::PostNativeEvent(const base::NativeEvent& native_event) {
::PostMessage(
hwnd(), native_event.message, native_event.wParam, native_event.lParam);
}
-void WindowTreeHostWin::OnDeviceScaleFactorChanged(
+void RootWindowHostWin::OnDeviceScaleFactorChanged(
float device_scale_factor) {
NOTIMPLEMENTED();
}
-void WindowTreeHostWin::PrepareForShutdown() {
+void RootWindowHostWin::PrepareForShutdown() {
NOTIMPLEMENTED();
}
-void WindowTreeHostWin::OnClose() {
+void RootWindowHostWin::OnClose() {
// TODO: this obviously shouldn't be here.
base::MessageLoopForUI::current()->Quit();
}
-LRESULT WindowTreeHostWin::OnKeyEvent(UINT message,
+LRESULT RootWindowHostWin::OnKeyEvent(UINT message,
WPARAM w_param,
LPARAM l_param) {
MSG msg = { hwnd(), message, w_param, l_param };
@@ -246,7 +246,7 @@ LRESULT WindowTreeHostWin::OnKeyEvent(UINT message,
return 0;
}
-LRESULT WindowTreeHostWin::OnMouseRange(UINT message,
+LRESULT RootWindowHostWin::OnMouseRange(UINT message,
WPARAM w_param,
LPARAM l_param) {
MSG msg = { hwnd(), message, w_param, l_param, 0,
@@ -259,7 +259,7 @@ LRESULT WindowTreeHostWin::OnMouseRange(UINT message,
return 0;
}
-LRESULT WindowTreeHostWin::OnCaptureChanged(UINT message,
+LRESULT RootWindowHostWin::OnCaptureChanged(UINT message,
WPARAM w_param,
LPARAM l_param) {
if (has_capture_) {
@@ -269,7 +269,7 @@ LRESULT WindowTreeHostWin::OnCaptureChanged(UINT message,
return 0;
}
-LRESULT WindowTreeHostWin::OnNCActivate(UINT message,
+LRESULT RootWindowHostWin::OnNCActivate(UINT message,
WPARAM w_param,
LPARAM l_param) {
if (!!w_param)
@@ -277,12 +277,12 @@ LRESULT WindowTreeHostWin::OnNCActivate(UINT message,
return DefWindowProc(hwnd(), message, w_param, l_param);
}
-void WindowTreeHostWin::OnMove(const CPoint& point) {
+void RootWindowHostWin::OnMove(const CPoint& point) {
if (delegate_)
delegate_->OnHostMoved(gfx::Point(point.x, point.y));
}
-void WindowTreeHostWin::OnPaint(HDC dc) {
+void RootWindowHostWin::OnPaint(HDC dc) {
gfx::Rect damage_rect;
RECT update_rect = {0};
if (GetUpdateRect(hwnd(), &update_rect, FALSE))
@@ -291,7 +291,7 @@ void WindowTreeHostWin::OnPaint(HDC dc) {
ValidateRect(hwnd(), NULL);
}
-void WindowTreeHostWin::OnSize(UINT param, const CSize& size) {
+void RootWindowHostWin::OnSize(UINT param, const CSize& size) {
// Minimizing resizes the window to 0x0 which causes our layout to go all
// screwy, so we just ignore it.
if (delegate_ && param != SIZE_MINIMIZED)
diff --git a/ui/aura/root_window_host_win.h b/ui/aura/root_window_host_win.h
index 1330625..64215a7 100644
--- a/ui/aura/root_window_host_win.h
+++ b/ui/aura/root_window_host_win.h
@@ -12,11 +12,11 @@
namespace aura {
-class WindowTreeHostWin : public WindowTreeHost, public gfx::WindowImpl {
+class RootWindowHostWin : public RootWindowHost, public gfx::WindowImpl {
public:
- WindowTreeHostWin(const gfx::Rect& bounds);
- virtual ~WindowTreeHostWin();
- // WindowTreeHost:
+ RootWindowHostWin(const gfx::Rect& bounds);
+ virtual ~RootWindowHostWin();
+ // RootWindowHost:
virtual RootWindow* GetRootWindow() OVERRIDE;
virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE;
virtual void Show() OVERRIDE;
@@ -40,7 +40,7 @@ class WindowTreeHostWin : public WindowTreeHost, public gfx::WindowImpl {
virtual void PrepareForShutdown() OVERRIDE;
private:
- BEGIN_MSG_MAP_EX(WindowTreeHostWin)
+ BEGIN_MSG_MAP_EX(RootWindowHostWin)
// Range handlers must go first!
MESSAGE_RANGE_HANDLER_EX(WM_MOUSEFIRST, WM_MOUSELAST, OnMouseRange)
MESSAGE_RANGE_HANDLER_EX(WM_NCMOUSEMOVE, WM_NCXBUTTONDBLCLK, OnMouseRange)
@@ -79,12 +79,12 @@ class WindowTreeHostWin : public WindowTreeHost, public gfx::WindowImpl {
DWORD saved_window_style_;
DWORD saved_window_ex_style_;
- DISALLOW_COPY_AND_ASSIGN(WindowTreeHostWin);
+ DISALLOW_COPY_AND_ASSIGN(RootWindowHostWin);
};
namespace test {
-// Set true to let WindowTreeHostWin use a popup window
+// Set true to let RootWindowHostWin use a popup window
// with no frame/title so that the window size and test's
// expectations matches.
AURA_EXPORT void SetUsePopupAsRootWindowForTest(bool use);
diff --git a/ui/aura/root_window_host_x11.cc b/ui/aura/root_window_host_x11.cc
index f20acde..55c21c6 100644
--- a/ui/aura/root_window_host_x11.cc
+++ b/ui/aura/root_window_host_x11.cc
@@ -276,7 +276,7 @@ class TouchEventCalibrate : public base::MessagePumpObserver {
} // namespace internal
////////////////////////////////////////////////////////////////////////////////
-// WindowTreeHostX11::MouseMoveFilter filters out the move events that
+// RootWindowHostX11::MouseMoveFilter filters out the move events that
// jump back and forth between two points. This happens when sub pixel mouse
// move is enabled and mouse move events could be jumping between two neighbor
// pixels, e.g. move(0,0), move(1,0), move(0,0), move(1,0) and on and on.
@@ -284,7 +284,7 @@ class TouchEventCalibrate : public base::MessagePumpObserver {
// provides a Filter method to find out whether a mouse event is in a different
// location and should be processed.
-class WindowTreeHostX11::MouseMoveFilter {
+class RootWindowHostX11::MouseMoveFilter {
public:
MouseMoveFilter() : insert_index_(0) {
for (size_t i = 0; i < kMaxEvents; ++i) {
@@ -317,9 +317,9 @@ class WindowTreeHostX11::MouseMoveFilter {
};
////////////////////////////////////////////////////////////////////////////////
-// WindowTreeHostX11
+// RootWindowHostX11
-WindowTreeHostX11::WindowTreeHostX11(const gfx::Rect& bounds)
+RootWindowHostX11::RootWindowHostX11(const gfx::Rect& bounds)
: xdisplay_(gfx::GetXDisplay()),
xwindow_(0),
x_root_window_(DefaultRootWindow(xdisplay_)),
@@ -398,7 +398,7 @@ WindowTreeHostX11::WindowTreeHostX11(const gfx::Rect& bounds)
CreateCompositor(GetAcceleratedWidget());
}
-WindowTreeHostX11::~WindowTreeHostX11() {
+RootWindowHostX11::~RootWindowHostX11() {
Env::GetInstance()->RemoveObserver(this);
base::MessagePumpX11::Current()->RemoveDispatcherForRootWindow(this);
base::MessagePumpX11::Current()->RemoveDispatcherForWindow(xwindow_);
@@ -408,7 +408,7 @@ WindowTreeHostX11::~WindowTreeHostX11() {
XDestroyWindow(xdisplay_, xwindow_);
}
-bool WindowTreeHostX11::Dispatch(const base::NativeEvent& event) {
+bool RootWindowHostX11::Dispatch(const base::NativeEvent& event) {
XEvent* xev = event;
if (FindEventTarget(event) == x_root_window_)
@@ -529,7 +529,7 @@ bool WindowTreeHostX11::Dispatch(const base::NativeEvent& event) {
Atom message_type = static_cast<Atom>(xev->xclient.data.l[0]);
if (message_type == atom_cache_.GetAtom("WM_DELETE_WINDOW")) {
// We have received a close message from the window manager.
- delegate_->AsRootWindow()->OnWindowTreeHostCloseRequested();
+ delegate_->AsRootWindow()->OnRootWindowHostCloseRequested();
} else if (message_type == atom_cache_.GetAtom("_NET_WM_PING")) {
XEvent reply_event = *xev;
reply_event.xclient.window = x_root_window_;
@@ -584,15 +584,15 @@ bool WindowTreeHostX11::Dispatch(const base::NativeEvent& event) {
return true;
}
-RootWindow* WindowTreeHostX11::GetRootWindow() {
+RootWindow* RootWindowHostX11::GetRootWindow() {
return delegate_->AsRootWindow();
}
-gfx::AcceleratedWidget WindowTreeHostX11::GetAcceleratedWidget() {
+gfx::AcceleratedWidget RootWindowHostX11::GetAcceleratedWidget() {
return xwindow_;
}
-void WindowTreeHostX11::Show() {
+void RootWindowHostX11::Show() {
if (!window_mapped_) {
// Before we map the window, set size hints. Otherwise, some window managers
// will ignore toplevel XMoveWindow commands.
@@ -615,22 +615,22 @@ void WindowTreeHostX11::Show() {
}
}
-void WindowTreeHostX11::Hide() {
+void RootWindowHostX11::Hide() {
if (window_mapped_) {
XWithdrawWindow(xdisplay_, xwindow_, 0);
window_mapped_ = false;
}
}
-void WindowTreeHostX11::ToggleFullScreen() {
+void RootWindowHostX11::ToggleFullScreen() {
NOTIMPLEMENTED();
}
-gfx::Rect WindowTreeHostX11::GetBounds() const {
+gfx::Rect RootWindowHostX11::GetBounds() const {
return bounds_;
}
-void WindowTreeHostX11::SetBounds(const gfx::Rect& bounds) {
+void RootWindowHostX11::SetBounds(const gfx::Rect& bounds) {
// Even if the host window's size doesn't change, aura's root window
// size, which is in DIP, changes when the scale changes.
float current_scale = compositor()->device_scale_factor();
@@ -673,11 +673,11 @@ void WindowTreeHostX11::SetBounds(const gfx::Rect& bounds) {
}
}
-gfx::Insets WindowTreeHostX11::GetInsets() const {
+gfx::Insets RootWindowHostX11::GetInsets() const {
return insets_;
}
-void WindowTreeHostX11::SetInsets(const gfx::Insets& insets) {
+void RootWindowHostX11::SetInsets(const gfx::Insets& insets) {
insets_ = insets;
if (pointer_barriers_) {
UnConfineCursor();
@@ -685,26 +685,26 @@ void WindowTreeHostX11::SetInsets(const gfx::Insets& insets) {
}
}
-gfx::Point WindowTreeHostX11::GetLocationOnNativeScreen() const {
+gfx::Point RootWindowHostX11::GetLocationOnNativeScreen() const {
return bounds_.origin();
}
-void WindowTreeHostX11::SetCapture() {
+void RootWindowHostX11::SetCapture() {
// TODO(oshima): Grab x input.
}
-void WindowTreeHostX11::ReleaseCapture() {
+void RootWindowHostX11::ReleaseCapture() {
// TODO(oshima): Release x input.
}
-void WindowTreeHostX11::SetCursor(gfx::NativeCursor cursor) {
+void RootWindowHostX11::SetCursor(gfx::NativeCursor cursor) {
if (cursor == current_cursor_)
return;
current_cursor_ = cursor;
SetCursorInternal(cursor);
}
-bool WindowTreeHostX11::QueryMouseLocation(gfx::Point* location_return) {
+bool RootWindowHostX11::QueryMouseLocation(gfx::Point* location_return) {
client::CursorClient* cursor_client =
client::GetCursorClient(GetRootWindow()->window());
if (cursor_client && !cursor_client->IsMouseEventsEnabled()) {
@@ -728,7 +728,7 @@ bool WindowTreeHostX11::QueryMouseLocation(gfx::Point* location_return) {
win_y_return >= 0 && win_y_return < bounds_.height());
}
-bool WindowTreeHostX11::ConfineCursorToRootWindow() {
+bool RootWindowHostX11::ConfineCursorToRootWindow() {
#if XFIXES_MAJOR >= 5
DCHECK(!pointer_barriers_.get());
if (pointer_barriers_)
@@ -764,7 +764,7 @@ bool WindowTreeHostX11::ConfineCursorToRootWindow() {
return true;
}
-void WindowTreeHostX11::UnConfineCursor() {
+void RootWindowHostX11::UnConfineCursor() {
#if XFIXES_MAJOR >= 5
if (pointer_barriers_) {
XFixesDestroyPointerBarrier(xdisplay_, pointer_barriers_[0]);
@@ -776,17 +776,17 @@ void WindowTreeHostX11::UnConfineCursor() {
#endif
}
-void WindowTreeHostX11::OnCursorVisibilityChanged(bool show) {
+void RootWindowHostX11::OnCursorVisibilityChanged(bool show) {
SetCrOSTapPaused(!show);
}
-void WindowTreeHostX11::MoveCursorTo(const gfx::Point& location) {
+void RootWindowHostX11::MoveCursorTo(const gfx::Point& location) {
XWarpPointer(xdisplay_, None, x_root_window_, 0, 0, 0, 0,
bounds_.x() + location.x(),
bounds_.y() + location.y());
}
-void WindowTreeHostX11::PostNativeEvent(
+void RootWindowHostX11::PostNativeEvent(
const base::NativeEvent& native_event) {
DCHECK(xwindow_);
DCHECK(xdisplay_);
@@ -819,18 +819,18 @@ void WindowTreeHostX11::PostNativeEvent(
XSendEvent(xdisplay_, xwindow_, False, 0, &xevent);
}
-void WindowTreeHostX11::OnDeviceScaleFactorChanged(
+void RootWindowHostX11::OnDeviceScaleFactorChanged(
float device_scale_factor) {
}
-void WindowTreeHostX11::PrepareForShutdown() {
+void RootWindowHostX11::PrepareForShutdown() {
base::MessagePumpX11::Current()->RemoveDispatcherForWindow(xwindow_);
}
-void WindowTreeHostX11::OnWindowInitialized(Window* window) {
+void RootWindowHostX11::OnWindowInitialized(Window* window) {
}
-void WindowTreeHostX11::OnRootWindowInitialized(RootWindow* root_window) {
+void RootWindowHostX11::OnRootWindowInitialized(RootWindow* root_window) {
// UpdateIsInternalDisplay relies on:
// 1. delegate_ pointing to RootWindow - available after SetDelegate.
// 2. RootWindow's kDisplayIdKey property set - available by the time
@@ -846,7 +846,7 @@ void WindowTreeHostX11::OnRootWindowInitialized(RootWindow* root_window) {
SetCrOSTapPaused(false);
}
-bool WindowTreeHostX11::DispatchEventForRootWindow(
+bool RootWindowHostX11::DispatchEventForRootWindow(
const base::NativeEvent& event) {
switch (event->type) {
case ConfigureNotify:
@@ -863,13 +863,13 @@ bool WindowTreeHostX11::DispatchEventForRootWindow(
return true;
}
-void WindowTreeHostX11::DispatchXI2Event(const base::NativeEvent& event) {
+void RootWindowHostX11::DispatchXI2Event(const base::NativeEvent& event) {
ui::TouchFactory* factory = ui::TouchFactory::GetInstance();
XEvent* xev = event;
if (!factory->ShouldProcessXI2Event(xev))
return;
- TRACE_EVENT1("input", "WindowTreeHostX11::DispatchXI2Event",
+ TRACE_EVENT1("input", "RootWindowHostX11::DispatchXI2Event",
"event_latency_us",
(ui::EventTimeForNow() - ui::EventTimeFromNative(event)).
InMicroseconds());
@@ -995,18 +995,18 @@ void WindowTreeHostX11::DispatchXI2Event(const base::NativeEvent& event) {
XFreeEventData(xev->xgeneric.display, &last_event.xcookie);
}
-bool WindowTreeHostX11::IsWindowManagerPresent() {
+bool RootWindowHostX11::IsWindowManagerPresent() {
// Per ICCCM 2.8, "Manager Selections", window managers should take ownership
// of WM_Sn selections (where n is a screen number).
return XGetSelectionOwner(
xdisplay_, atom_cache_.GetAtom("WM_S0")) != None;
}
-void WindowTreeHostX11::SetCursorInternal(gfx::NativeCursor cursor) {
+void RootWindowHostX11::SetCursorInternal(gfx::NativeCursor cursor) {
XDefineCursor(xdisplay_, xwindow_, cursor.platform());
}
-void WindowTreeHostX11::TranslateAndDispatchMouseEvent(
+void RootWindowHostX11::TranslateAndDispatchMouseEvent(
ui::MouseEvent* event) {
Window* root_window = GetRootWindow()->window();
client::ScreenPositionClient* screen_position_client =
@@ -1028,14 +1028,14 @@ void WindowTreeHostX11::TranslateAndDispatchMouseEvent(
delegate_->OnHostMouseEvent(event);
}
-void WindowTreeHostX11::UpdateIsInternalDisplay() {
+void RootWindowHostX11::UpdateIsInternalDisplay() {
Window* root_window = GetRootWindow()->window();
gfx::Screen* screen = gfx::Screen::GetScreenFor(root_window);
gfx::Display display = screen->GetDisplayNearestWindow(root_window);
is_internal_display_ = display.IsInternal();
}
-void WindowTreeHostX11::SetCrOSTapPaused(bool state) {
+void RootWindowHostX11::SetCrOSTapPaused(bool state) {
#if defined(OS_CHROMEOS)
if (!ui::IsXInput2Available())
return;
@@ -1066,12 +1066,12 @@ void WindowTreeHostX11::SetCrOSTapPaused(bool state) {
}
// static
-WindowTreeHost* WindowTreeHost::Create(const gfx::Rect& bounds) {
- return new WindowTreeHostX11(bounds);
+RootWindowHost* RootWindowHost::Create(const gfx::Rect& bounds) {
+ return new RootWindowHostX11(bounds);
}
// static
-gfx::Size WindowTreeHost::GetNativeScreenSize() {
+gfx::Size RootWindowHost::GetNativeScreenSize() {
::XDisplay* xdisplay = gfx::GetXDisplay();
return gfx::Size(DisplayWidth(xdisplay, 0), DisplayHeight(xdisplay, 0));
}
diff --git a/ui/aura/root_window_host_x11.h b/ui/aura/root_window_host_x11.h
index c53476a..e8593e6 100644
--- a/ui/aura/root_window_host_x11.h
+++ b/ui/aura/root_window_host_x11.h
@@ -32,17 +32,17 @@ namespace internal {
class TouchEventCalibrate;
}
-class AURA_EXPORT WindowTreeHostX11 : public WindowTreeHost,
+class AURA_EXPORT RootWindowHostX11 : public RootWindowHost,
public base::MessageLoop::Dispatcher,
public EnvObserver {
public:
- explicit WindowTreeHostX11(const gfx::Rect& bounds);
- virtual ~WindowTreeHostX11();
+ explicit RootWindowHostX11(const gfx::Rect& bounds);
+ virtual ~RootWindowHostX11();
// Overridden from Dispatcher overrides:
virtual bool Dispatch(const base::NativeEvent& event) OVERRIDE;
- // WindowTreeHost Overrides.
+ // RootWindowHost Overrides.
virtual RootWindow* GetRootWindow() OVERRIDE;
virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE;
virtual void Show() OVERRIDE;
@@ -88,7 +88,7 @@ class AURA_EXPORT WindowTreeHostX11 : public WindowTreeHost,
void SetCursorInternal(gfx::NativeCursor cursor);
// Translates the native mouse location into screen coordinates and and
- // dispatches the event to WindowTreeHostDelegate.
+ // dispatches the event to RootWindowHostDelegate.
void TranslateAndDispatchMouseEvent(ui::MouseEvent* event);
// Update is_internal_display_ based on delegate_ state
@@ -137,13 +137,13 @@ class AURA_EXPORT WindowTreeHostX11 : public WindowTreeHost,
// Touch ids of which the touch press happens at side bezel region.
uint32 bezel_tracking_ids_;
- DISALLOW_COPY_AND_ASSIGN(WindowTreeHostX11);
+ DISALLOW_COPY_AND_ASSIGN(RootWindowHostX11);
};
namespace test {
// Set the default value of the override redirect flag used to
-// create a X window for WindowTreeHostX11.
+// create a X window for RootWindowHostX11.
AURA_EXPORT void SetUseOverrideRedirectWindowByDefault(bool override_redirect);
} // namespace test
diff --git a/ui/aura/root_window_host_x11_unittest.cc b/ui/aura/root_window_host_x11_unittest.cc
index a7dfa14..bdf1104 100644
--- a/ui/aura/root_window_host_x11_unittest.cc
+++ b/ui/aura/root_window_host_x11_unittest.cc
@@ -12,13 +12,13 @@
#include "ui/events/x/events_x_utils.h"
namespace {
-class TestWindowTreeHostDelegate : public aura::WindowTreeHostDelegate {
+class TestRootWindowHostDelegate : public aura::RootWindowHostDelegate {
public:
- TestWindowTreeHostDelegate() : last_touch_type_(ui::ET_UNKNOWN),
+ TestRootWindowHostDelegate() : last_touch_type_(ui::ET_UNKNOWN),
last_touch_id_(-1),
last_touch_location_(0, 0) {
}
- virtual ~TestWindowTreeHostDelegate() {}
+ virtual ~TestRootWindowHostDelegate() {}
virtual bool OnHostKeyEvent(ui::KeyEvent* event) OVERRIDE {
return true;
@@ -77,29 +77,29 @@ class TestWindowTreeHostDelegate : public aura::WindowTreeHostDelegate {
int last_touch_id_;
gfx::Point last_touch_location_;
- DISALLOW_COPY_AND_ASSIGN(TestWindowTreeHostDelegate);
+ DISALLOW_COPY_AND_ASSIGN(TestRootWindowHostDelegate);
};
} // namespace
namespace aura {
-typedef test::AuraTestBase WindowTreeHostX11Test;
+typedef test::AuraTestBase RootWindowHostX11Test;
-// Send X touch events to one WindowTreeHost. The WindowTreeHost's
+// Send X touch events to one RootWindowHost. The RootWindowHost's
// delegate will get corresponding ui::TouchEvent if the touch events
-// are winthin the bound of the WindowTreeHost.
-TEST_F(WindowTreeHostX11Test, DispatchTouchEventToOneRootWindow) {
+// are winthin the bound of the RootWindowHost.
+TEST_F(RootWindowHostX11Test, DispatchTouchEventToOneRootWindow) {
#if defined(OS_CHROMEOS)
// Fake a ChromeOS running env.
const char* kLsbRelease = "CHROMEOS_RELEASE_NAME=Chromium OS\n";
base::SysInfo::SetChromeOSVersionInfoForTest(kLsbRelease, base::Time());
#endif // defined(OS_CHROMEOS)
- scoped_ptr<WindowTreeHostX11> root_window_host(
- new WindowTreeHostX11(gfx::Rect(0, 0, 2560, 1700)));
- scoped_ptr<TestWindowTreeHostDelegate> delegate(
- new TestWindowTreeHostDelegate());
+ scoped_ptr<RootWindowHostX11> root_window_host(
+ new RootWindowHostX11(gfx::Rect(0, 0, 2560, 1700)));
+ scoped_ptr<TestRootWindowHostDelegate> delegate(
+ new TestRootWindowHostDelegate());
root_window_host->set_delegate(delegate.get());
std::vector<unsigned int> devices;
@@ -151,26 +151,26 @@ TEST_F(WindowTreeHostX11Test, DispatchTouchEventToOneRootWindow) {
#endif // defined(OS_CHROMEOS)
}
-// Send X touch events to two WindowTreeHost. The WindowTreeHost which is
+// Send X touch events to two RootWindowHost. The RootWindowHost which is
// the event target of the X touch events should generate the corresponding
// ui::TouchEvent for its delegate.
#if defined(OS_CHROMEOS)
-TEST_F(WindowTreeHostX11Test, DispatchTouchEventToTwoRootWindow) {
+TEST_F(RootWindowHostX11Test, DispatchTouchEventToTwoRootWindow) {
// Fake a ChromeOS running env.
const char* kLsbRelease = "CHROMEOS_RELEASE_NAME=Chromium OS\n";
base::SysInfo::SetChromeOSVersionInfoForTest(kLsbRelease, base::Time());
- scoped_ptr<WindowTreeHostX11> root_window_host1(
- new WindowTreeHostX11(gfx::Rect(0, 0, 2560, 1700)));
- scoped_ptr<TestWindowTreeHostDelegate> delegate1(
- new TestWindowTreeHostDelegate());
+ scoped_ptr<RootWindowHostX11> root_window_host1(
+ new RootWindowHostX11(gfx::Rect(0, 0, 2560, 1700)));
+ scoped_ptr<TestRootWindowHostDelegate> delegate1(
+ new TestRootWindowHostDelegate());
root_window_host1->set_delegate(delegate1.get());
int host2_y_offset = 1700;
- scoped_ptr<WindowTreeHostX11> root_window_host2(
- new WindowTreeHostX11(gfx::Rect(0, host2_y_offset, 1920, 1080)));
- scoped_ptr<TestWindowTreeHostDelegate> delegate2(
- new TestWindowTreeHostDelegate());
+ scoped_ptr<RootWindowHostX11> root_window_host2(
+ new RootWindowHostX11(gfx::Rect(0, host2_y_offset, 1920, 1080)));
+ scoped_ptr<TestRootWindowHostDelegate> delegate2(
+ new TestRootWindowHostDelegate());
root_window_host2->set_delegate(delegate2.get());
std::vector<unsigned int> devices;
@@ -183,7 +183,7 @@ TEST_F(WindowTreeHostX11Test, DispatchTouchEventToTwoRootWindow) {
EXPECT_EQ(ui::ET_UNKNOWN, delegate2->last_touch_type());
EXPECT_EQ(-1, delegate2->last_touch_id());
- // 2 Touch events are targeted at the second WindowTreeHost.
+ // 2 Touch events are targeted at the second RootWindowHost.
ui::XScopedTouchEvent touch1_begin(ui::CreateTouchEvent(
0, XI_TouchBegin, 5, gfx::Point(1500, 2500), valuators));
root_window_host1->Dispatch(touch1_begin);
diff --git a/ui/aura/root_window_observer.h b/ui/aura/root_window_observer.h
index 0ef86e1..bfb8e65 100644
--- a/ui/aura/root_window_observer.h
+++ b/ui/aura/root_window_observer.h
@@ -19,15 +19,15 @@ class Window;
class AURA_EXPORT RootWindowObserver {
public:
// Invoked after the RootWindow's host has been resized.
- virtual void OnWindowTreeHostResized(const RootWindow* root) {}
+ virtual void OnRootWindowHostResized(const RootWindow* root) {}
// Invoked after the RootWindow's host has been moved on screen.
- virtual void OnWindowTreeHostMoved(const RootWindow* root,
+ virtual void OnRootWindowHostMoved(const RootWindow* root,
const gfx::Point& new_origin) {}
// Invoked when the native windowing system sends us a request to close our
// window.
- virtual void OnWindowTreeHostCloseRequested(const RootWindow* root) {}
+ virtual void OnRootWindowHostCloseRequested(const RootWindow* root) {}
// Invoked when the keyboard mapping has changed.
virtual void OnKeyboardMappingChanged(const RootWindow* root) {}
diff --git a/ui/aura/root_window_unittest.cc b/ui/aura/root_window_unittest.cc
index f985903..eccc3e8 100644
--- a/ui/aura/root_window_unittest.cc
+++ b/ui/aura/root_window_unittest.cc
@@ -113,7 +113,7 @@ TEST_F(RootWindowTest, OnHostMouseEvent) {
gfx::Point point(101, 201);
ui::MouseEvent event1(
ui::ET_MOUSE_PRESSED, point, point, ui::EF_LEFT_MOUSE_BUTTON);
- dispatcher()->AsWindowTreeHostDelegate()->OnHostMouseEvent(&event1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostMouseEvent(&event1);
// Event was tested for non-client area for the target window.
EXPECT_EQ(1, delegate1->non_client_count());
@@ -154,7 +154,7 @@ TEST_F(RootWindowTest, MouseButtonState) {
location,
location,
ui::EF_LEFT_MOUSE_BUTTON));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostMouseEvent(event.get());
+ dispatcher()->AsRootWindowHostDelegate()->OnHostMouseEvent(event.get());
EXPECT_TRUE(Env::GetInstance()->IsMouseButtonDown());
// Additionally press the right.
@@ -163,7 +163,7 @@ TEST_F(RootWindowTest, MouseButtonState) {
location,
location,
ui::EF_LEFT_MOUSE_BUTTON | ui::EF_RIGHT_MOUSE_BUTTON));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostMouseEvent(event.get());
+ dispatcher()->AsRootWindowHostDelegate()->OnHostMouseEvent(event.get());
EXPECT_TRUE(Env::GetInstance()->IsMouseButtonDown());
// Release the left button.
@@ -172,7 +172,7 @@ TEST_F(RootWindowTest, MouseButtonState) {
location,
location,
ui::EF_RIGHT_MOUSE_BUTTON));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostMouseEvent(event.get());
+ dispatcher()->AsRootWindowHostDelegate()->OnHostMouseEvent(event.get());
EXPECT_TRUE(Env::GetInstance()->IsMouseButtonDown());
// Release the right button. We should ignore the Shift-is-down flag.
@@ -181,7 +181,7 @@ TEST_F(RootWindowTest, MouseButtonState) {
location,
location,
ui::EF_SHIFT_DOWN));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostMouseEvent(event.get());
+ dispatcher()->AsRootWindowHostDelegate()->OnHostMouseEvent(event.get());
EXPECT_FALSE(Env::GetInstance()->IsMouseButtonDown());
// Press the middle button.
@@ -190,7 +190,7 @@ TEST_F(RootWindowTest, MouseButtonState) {
location,
location,
ui::EF_MIDDLE_MOUSE_BUTTON));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostMouseEvent(event.get());
+ dispatcher()->AsRootWindowHostDelegate()->OnHostMouseEvent(event.get());
EXPECT_TRUE(Env::GetInstance()->IsMouseButtonDown());
}
@@ -334,12 +334,12 @@ TEST_F(RootWindowTest, IgnoreUnknownKeys) {
root_window()->SetEventFilter(filter); // passes ownership
ui::KeyEvent unknown_event(ui::ET_KEY_PRESSED, ui::VKEY_UNKNOWN, 0, false);
- EXPECT_FALSE(dispatcher()->AsWindowTreeHostDelegate()->OnHostKeyEvent(
+ EXPECT_FALSE(dispatcher()->AsRootWindowHostDelegate()->OnHostKeyEvent(
&unknown_event));
EXPECT_EQ(0, filter->num_key_events());
ui::KeyEvent known_event(ui::ET_KEY_PRESSED, ui::VKEY_A, 0, false);
- EXPECT_TRUE(dispatcher()->AsWindowTreeHostDelegate()->OnHostKeyEvent(
+ EXPECT_TRUE(dispatcher()->AsRootWindowHostDelegate()->OnHostKeyEvent(
&known_event));
EXPECT_EQ(1, filter->num_key_events());
}
@@ -352,7 +352,7 @@ TEST_F(RootWindowTest, NoDelegateWindowReceivesKeyEvents) {
test::TestEventHandler handler;
w1->AddPreTargetHandler(&handler);
ui::KeyEvent key_press(ui::ET_KEY_PRESSED, ui::VKEY_A, 0, false);
- EXPECT_TRUE(dispatcher()->AsWindowTreeHostDelegate()->OnHostKeyEvent(
+ EXPECT_TRUE(dispatcher()->AsRootWindowHostDelegate()->OnHostKeyEvent(
&key_press));
EXPECT_EQ(1, handler.num_key_events());
@@ -368,14 +368,14 @@ TEST_F(RootWindowTest, TouchEventsOutsideBounds) {
gfx::Point position = root_window()->bounds().origin();
position.Offset(-10, -10);
ui::TouchEvent press(ui::ET_TOUCH_PRESSED, position, 0, base::TimeDelta());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
EXPECT_EQ(1, filter->num_touch_events());
position = root_window()->bounds().origin();
position.Offset(root_window()->bounds().width() + 10,
root_window()->bounds().height() + 10);
ui::TouchEvent release(ui::ET_TOUCH_RELEASED, position, 0, base::TimeDelta());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
EXPECT_EQ(2, filter->num_touch_events());
}
@@ -397,7 +397,7 @@ TEST_F(RootWindowTest, ScrollEventDispatch) {
0, -10,
0, -10,
2);
- dispatcher()->AsWindowTreeHostDelegate()->OnHostScrollEvent(&scroll1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostScrollEvent(&scroll1);
EXPECT_EQ(1, filter->num_scroll_events());
// Scroll event on a window should be dispatched properly.
@@ -408,7 +408,7 @@ TEST_F(RootWindowTest, ScrollEventDispatch) {
-10, 0,
-10, 0,
2);
- dispatcher()->AsWindowTreeHostDelegate()->OnHostScrollEvent(&scroll2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostScrollEvent(&scroll2);
EXPECT_EQ(2, filter->num_scroll_events());
}
@@ -557,7 +557,7 @@ TEST_F(RootWindowTest, MouseMovesHeld) {
ui::MouseEvent mouse_move_event(ui::ET_MOUSE_MOVED, gfx::Point(0, 0),
gfx::Point(0, 0), 0);
- dispatcher()->AsWindowTreeHostDelegate()->OnHostMouseEvent(
+ dispatcher()->AsRootWindowHostDelegate()->OnHostMouseEvent(
&mouse_move_event);
// Discard MOUSE_ENTER.
filter->events().clear();
@@ -567,7 +567,7 @@ TEST_F(RootWindowTest, MouseMovesHeld) {
// Check that we don't immediately dispatch the MOUSE_DRAGGED event.
ui::MouseEvent mouse_dragged_event(ui::ET_MOUSE_DRAGGED, gfx::Point(0, 0),
gfx::Point(0, 0), 0);
- dispatcher()->AsWindowTreeHostDelegate()->OnHostMouseEvent(
+ dispatcher()->AsRootWindowHostDelegate()->OnHostMouseEvent(
&mouse_dragged_event);
EXPECT_TRUE(filter->events().empty());
@@ -575,7 +575,7 @@ TEST_F(RootWindowTest, MouseMovesHeld) {
// of event.
ui::MouseEvent mouse_pressed_event(ui::ET_MOUSE_PRESSED, gfx::Point(0, 0),
gfx::Point(0, 0), 0);
- dispatcher()->AsWindowTreeHostDelegate()->OnHostMouseEvent(
+ dispatcher()->AsRootWindowHostDelegate()->OnHostMouseEvent(
&mouse_pressed_event);
EXPECT_EQ("MOUSE_DRAGGED MOUSE_PRESSED",
EventTypesToString(filter->events()));
@@ -584,12 +584,12 @@ TEST_F(RootWindowTest, MouseMovesHeld) {
// Check that we coalesce held MOUSE_DRAGGED events.
ui::MouseEvent mouse_dragged_event2(ui::ET_MOUSE_DRAGGED, gfx::Point(1, 1),
gfx::Point(1, 1), 0);
- dispatcher()->AsWindowTreeHostDelegate()->OnHostMouseEvent(
+ dispatcher()->AsRootWindowHostDelegate()->OnHostMouseEvent(
&mouse_dragged_event);
- dispatcher()->AsWindowTreeHostDelegate()->OnHostMouseEvent(
+ dispatcher()->AsRootWindowHostDelegate()->OnHostMouseEvent(
&mouse_dragged_event2);
EXPECT_TRUE(filter->events().empty());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostMouseEvent(
+ dispatcher()->AsRootWindowHostDelegate()->OnHostMouseEvent(
&mouse_pressed_event);
EXPECT_EQ("MOUSE_DRAGGED MOUSE_PRESSED",
EventTypesToString(filter->events()));
@@ -597,7 +597,7 @@ TEST_F(RootWindowTest, MouseMovesHeld) {
// Check that on ReleasePointerMoves, held events are not dispatched
// immediately, but posted instead.
- dispatcher()->AsWindowTreeHostDelegate()->OnHostMouseEvent(
+ dispatcher()->AsRootWindowHostDelegate()->OnHostMouseEvent(
&mouse_dragged_event);
dispatcher()->ReleasePointerMoves();
EXPECT_TRUE(filter->events().empty());
@@ -609,10 +609,10 @@ TEST_F(RootWindowTest, MouseMovesHeld) {
// the Check that on ReleasePointerMoves, held events are not dispatched
// immediately, but posted instead.
dispatcher()->HoldPointerMoves();
- dispatcher()->AsWindowTreeHostDelegate()->OnHostMouseEvent(
+ dispatcher()->AsRootWindowHostDelegate()->OnHostMouseEvent(
&mouse_dragged_event);
dispatcher()->ReleasePointerMoves();
- dispatcher()->AsWindowTreeHostDelegate()->OnHostMouseEvent(
+ dispatcher()->AsRootWindowHostDelegate()->OnHostMouseEvent(
&mouse_pressed_event);
EXPECT_EQ("MOUSE_DRAGGED MOUSE_PRESSED",
EventTypesToString(filter->events()));
@@ -623,10 +623,10 @@ TEST_F(RootWindowTest, MouseMovesHeld) {
// Check that if the other message is another MOUSE_DRAGGED, we still coalesce
// them.
dispatcher()->HoldPointerMoves();
- dispatcher()->AsWindowTreeHostDelegate()->OnHostMouseEvent(
+ dispatcher()->AsRootWindowHostDelegate()->OnHostMouseEvent(
&mouse_dragged_event);
dispatcher()->ReleasePointerMoves();
- dispatcher()->AsWindowTreeHostDelegate()->OnHostMouseEvent(
+ dispatcher()->AsRootWindowHostDelegate()->OnHostMouseEvent(
&mouse_dragged_event2);
EXPECT_EQ("MOUSE_DRAGGED", EventTypesToString(filter->events()));
filter->events().clear();
@@ -647,7 +647,7 @@ TEST_F(RootWindowTest, TouchMovesHeld) {
// test.
ui::TouchEvent touch_pressed_event(ui::ET_TOUCH_PRESSED, gfx::Point(0, 0),
0, base::TimeDelta());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(
&touch_pressed_event);
RunAllPendingInMessageLoop();
filter->events().clear();
@@ -657,13 +657,13 @@ TEST_F(RootWindowTest, TouchMovesHeld) {
// Check that we don't immediately dispatch the TOUCH_MOVED event.
ui::TouchEvent touch_moved_event(ui::ET_TOUCH_MOVED, gfx::Point(0, 0),
0, base::TimeDelta());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(
&touch_moved_event);
EXPECT_TRUE(filter->events().empty());
// Check that on ReleasePointerMoves, held events are not dispatched
// immediately, but posted instead.
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(
&touch_moved_event);
dispatcher()->ReleasePointerMoves();
EXPECT_TRUE(filter->events().empty());
@@ -677,9 +677,9 @@ TEST_F(RootWindowTest, TouchMovesHeld) {
0, base::TimeDelta());
filter->events().clear();
dispatcher()->HoldPointerMoves();
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(
&touch_moved_event);
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(
&touch_released_event);
EXPECT_EQ("TOUCH_MOVED TOUCH_RELEASED GESTURE_END",
EventTypesToString(filter->events()));
@@ -706,20 +706,20 @@ TEST_F(RootWindowTest, DispatchSyntheticMouseEvents) {
// Dispatch a non-synthetic mouse event when mouse events are enabled.
ui::MouseEvent mouse1(ui::ET_MOUSE_MOVED, gfx::Point(10, 10),
gfx::Point(10, 10), 0);
- dispatcher()->AsWindowTreeHostDelegate()->OnHostMouseEvent(&mouse1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostMouseEvent(&mouse1);
EXPECT_FALSE(filter->events().empty());
filter->events().clear();
// Dispatch a synthetic mouse event when mouse events are enabled.
ui::MouseEvent mouse2(ui::ET_MOUSE_MOVED, gfx::Point(10, 10),
gfx::Point(10, 10), ui::EF_IS_SYNTHESIZED);
- dispatcher()->AsWindowTreeHostDelegate()->OnHostMouseEvent(&mouse2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostMouseEvent(&mouse2);
EXPECT_FALSE(filter->events().empty());
filter->events().clear();
// Dispatch a synthetic mouse event when mouse events are disabled.
cursor_client.DisableMouseEvents();
- dispatcher()->AsWindowTreeHostDelegate()->OnHostMouseEvent(&mouse2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostMouseEvent(&mouse2);
EXPECT_TRUE(filter->events().empty());
}
@@ -741,7 +741,7 @@ TEST_F(RootWindowTest, DispatchMouseExitWhenCursorHidden) {
ui::MouseEvent mouse1(ui::ET_MOUSE_MOVED, mouse_location,
mouse_location, 0);
EXPECT_TRUE(filter->events().empty());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostMouseEvent(&mouse1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostMouseEvent(&mouse1);
EXPECT_FALSE(filter->events().empty());
filter->events().clear();
@@ -1182,7 +1182,7 @@ class ValidRootDuringDestructionWindowObserver : public aura::WindowObserver {
} // namespace
#if defined(USE_OZONE)
-// Creating multiple WindowTreeHostOzone instances is broken.
+// Creating multiple RootWindowHostOzone instances is broken.
#define MAYBE_ValidRootDuringDestruction DISABLED_ValidRootDuringDestruction
#else
#define MAYBE_ValidRootDuringDestruction ValidRootDuringDestruction
@@ -1246,8 +1246,8 @@ class DontResetHeldEventWindowDelegate : public test::TestWindowDelegate {
TEST_F(RootWindowTest, DontResetHeldEvent) {
DontResetHeldEventWindowDelegate delegate(root_window());
scoped_ptr<Window> w1(CreateNormalWindow(1, root_window(), &delegate));
- WindowTreeHostDelegate* root_window_delegate =
- static_cast<WindowTreeHostDelegate*>(root_window()->GetDispatcher());
+ RootWindowHostDelegate* root_window_delegate =
+ static_cast<RootWindowHostDelegate*>(root_window()->GetDispatcher());
w1->SetBounds(gfx::Rect(0, 0, 40, 40));
ui::MouseEvent pressed(ui::ET_MOUSE_PRESSED,
gfx::Point(10, 10), gfx::Point(10, 10),
@@ -1302,7 +1302,7 @@ class DeleteRootFromHeldMouseEventDelegate : public test::TestWindowDelegate {
} // namespace
#if defined(USE_OZONE)
-// Creating multiple WindowTreeHostOzone instances is broken.
+// Creating multiple RootWindowHostOzone instances is broken.
#define MAYBE_DeleteRootFromHeldMouseEvent DISABLED_DeleteRootFromHeldMouseEvent
#else
#define MAYBE_DeleteRootFromHeldMouseEvent DeleteRootFromHeldMouseEvent
diff --git a/ui/aura/test/event_generator.cc b/ui/aura/test/event_generator.cc
index dd73933..ada197c 100644
--- a/ui/aura/test/event_generator.cc
+++ b/ui/aura/test/event_generator.cc
@@ -586,8 +586,8 @@ void EventGenerator::DoDispatchEvent(ui::Event* event, bool async) {
}
pending_events_.push_back(pending_event);
} else {
- WindowTreeHostDelegate* root_window_host_delegate =
- current_root_window_->AsWindowTreeHostDelegate();
+ RootWindowHostDelegate* root_window_host_delegate =
+ current_root_window_->AsRootWindowHostDelegate();
if (event->IsKeyEvent()) {
root_window_host_delegate->OnHostKeyEvent(
static_cast<ui::KeyEvent*>(event));
diff --git a/ui/aura/test/event_generator.h b/ui/aura/test/event_generator.h
index a914a20..ee9ebda 100644
--- a/ui/aura/test/event_generator.h
+++ b/ui/aura/test/event_generator.h
@@ -76,7 +76,7 @@ class EventGeneratorDelegate {
// handled in the nested message loop.
// 3) Similarly, |base::MessagePumpObserver| will not be invoked.
// 4) Any other code that requires native events, such as
-// tests for WindowTreeHostWin/WindowTreeHostX11.
+// tests for RootWindowHostWin/RootWindowHostX11.
//
// If one of these applies to your test, please use |ui_controls|
// package instead.
diff --git a/ui/aura/test/test_screen.cc b/ui/aura/test/test_screen.cc
index 484a478..225e56e 100644
--- a/ui/aura/test/test_screen.cc
+++ b/ui/aura/test/test_screen.cc
@@ -24,7 +24,7 @@ TestScreen* TestScreen::Create() {
// static
TestScreen* TestScreen::CreateFullscreen() {
- return new TestScreen(gfx::Rect(WindowTreeHost::GetNativeScreenSize()));
+ return new TestScreen(gfx::Rect(RootWindowHost::GetNativeScreenSize()));
}
TestScreen::~TestScreen() {
diff --git a/ui/aura/window_tree_host.cc b/ui/aura/window_tree_host.cc
index 5d615ef..2702f2f 100644
--- a/ui/aura/window_tree_host.cc
+++ b/ui/aura/window_tree_host.cc
@@ -70,9 +70,9 @@ class SimpleRootWindowTransformer : public RootWindowTransformer {
};
////////////////////////////////////////////////////////////////////////////////
-// WindowTreeHost, public:
+// RootWindowHost, public:
-WindowTreeHost::~WindowTreeHost() {
+RootWindowHost::~RootWindowHost() {
// TODO(beng): this represents an ordering change. In the old code, the
// compositor was reset before the window hierarchy was destroyed.
// verify that this has no adverse effects.
@@ -81,7 +81,7 @@ WindowTreeHost::~WindowTreeHost() {
compositor_.reset();
}
-void WindowTreeHost::InitHost() {
+void RootWindowHost::InitHost() {
compositor_->SetScaleAndSize(GetDeviceScaleFactorFromDisplay(window()),
GetBounds().size());
window()->Init(ui::LAYER_NOT_DRAWN);
@@ -93,15 +93,15 @@ void WindowTreeHost::InitHost() {
window()->Show();
}
-aura::Window* WindowTreeHost::window() {
- return const_cast<Window*>(const_cast<const WindowTreeHost*>(this)->window());
+aura::Window* RootWindowHost::window() {
+ return const_cast<Window*>(const_cast<const RootWindowHost*>(this)->window());
}
-const aura::Window* WindowTreeHost::window() const {
+const aura::Window* RootWindowHost::window() const {
return delegate_->AsRootWindow()->window();
}
-void WindowTreeHost::SetRootWindowTransformer(
+void RootWindowHost::SetRootWindowTransformer(
scoped_ptr<RootWindowTransformer> transformer) {
transformer_ = transformer.Pass();
SetInsets(transformer_->GetHostInsets());
@@ -112,7 +112,7 @@ void WindowTreeHost::SetRootWindowTransformer(
UpdateRootWindowSize(GetBounds().size());
}
-gfx::Transform WindowTreeHost::GetRootTransform() const {
+gfx::Transform RootWindowHost::GetRootTransform() const {
float scale = ui::GetDeviceScaleFactor(window()->layer());
gfx::Transform transform;
transform.Scale(scale, scale);
@@ -120,61 +120,61 @@ gfx::Transform WindowTreeHost::GetRootTransform() const {
return transform;
}
-void WindowTreeHost::SetTransform(const gfx::Transform& transform) {
+void RootWindowHost::SetTransform(const gfx::Transform& transform) {
scoped_ptr<RootWindowTransformer> transformer(
new SimpleRootWindowTransformer(window(), transform));
SetRootWindowTransformer(transformer.Pass());
}
-gfx::Transform WindowTreeHost::GetInverseRootTransform() const {
+gfx::Transform RootWindowHost::GetInverseRootTransform() const {
float scale = ui::GetDeviceScaleFactor(window()->layer());
gfx::Transform transform;
transform.Scale(1.0f / scale, 1.0f / scale);
return transformer_->GetInverseTransform() * transform;
}
-void WindowTreeHost::UpdateRootWindowSize(const gfx::Size& host_size) {
+void RootWindowHost::UpdateRootWindowSize(const gfx::Size& host_size) {
window()->SetBounds(transformer_->GetRootWindowBounds(host_size));
}
-void WindowTreeHost::ConvertPointToNativeScreen(gfx::Point* point) const {
+void RootWindowHost::ConvertPointToNativeScreen(gfx::Point* point) const {
ConvertPointToHost(point);
gfx::Point location = GetLocationOnNativeScreen();
point->Offset(location.x(), location.y());
}
-void WindowTreeHost::ConvertPointFromNativeScreen(gfx::Point* point) const {
+void RootWindowHost::ConvertPointFromNativeScreen(gfx::Point* point) const {
gfx::Point location = GetLocationOnNativeScreen();
point->Offset(-location.x(), -location.y());
ConvertPointFromHost(point);
}
-void WindowTreeHost::ConvertPointToHost(gfx::Point* point) const {
+void RootWindowHost::ConvertPointToHost(gfx::Point* point) const {
gfx::Point3F point_3f(*point);
GetRootTransform().TransformPoint(&point_3f);
*point = gfx::ToFlooredPoint(point_3f.AsPointF());
}
-void WindowTreeHost::ConvertPointFromHost(gfx::Point* point) const {
+void RootWindowHost::ConvertPointFromHost(gfx::Point* point) const {
gfx::Point3F point_3f(*point);
GetInverseRootTransform().TransformPoint(&point_3f);
*point = gfx::ToFlooredPoint(point_3f.AsPointF());
}
////////////////////////////////////////////////////////////////////////////////
-// WindowTreeHost, protected:
+// RootWindowHost, protected:
-WindowTreeHost::WindowTreeHost()
+RootWindowHost::RootWindowHost()
: delegate_(NULL) {
}
-void WindowTreeHost::CreateCompositor(
+void RootWindowHost::CreateCompositor(
gfx::AcceleratedWidget accelerated_widget) {
compositor_.reset(new ui::Compositor(GetAcceleratedWidget()));
DCHECK(compositor_.get());
}
-void WindowTreeHost::NotifyHostResized(const gfx::Size& new_size) {
+void RootWindowHost::NotifyHostResized(const gfx::Size& new_size) {
// The compositor should have the same size as the native root window host.
// Get the latest scale from display because it might have been changed.
compositor_->SetScaleAndSize(GetDeviceScaleFactorFromDisplay(window()),
diff --git a/ui/aura/window_tree_host.h b/ui/aura/window_tree_host.h
index ba48000..8e1ddd0 100644
--- a/ui/aura/window_tree_host.h
+++ b/ui/aura/window_tree_host.h
@@ -27,18 +27,18 @@ class Compositor;
namespace aura {
class RootWindow;
-class WindowTreeHostDelegate;
+class RootWindowHostDelegate;
class RootWindowTransformer;
-// WindowTreeHost bridges between a native window and the embedded RootWindow.
+// RootWindowHost bridges between a native window and the embedded RootWindow.
// It provides the accelerated widget and maps events from the native os to
// aura.
-class AURA_EXPORT WindowTreeHost {
+class AURA_EXPORT RootWindowHost {
public:
- virtual ~WindowTreeHost();
+ virtual ~RootWindowHost();
- // Creates a new WindowTreeHost. The caller owns the returned value.
- static WindowTreeHost* Create(const gfx::Rect& bounds);
+ // Creates a new RootWindowHost. The caller owns the returned value.
+ static RootWindowHost* Create(const gfx::Rect& bounds);
void InitHost();
@@ -63,7 +63,7 @@ class AURA_EXPORT WindowTreeHost {
// (gfx::Screen only reports on the virtual desktop exposed by Aura.)
static gfx::Size GetNativeScreenSize();
- void set_delegate(WindowTreeHostDelegate* delegate) {
+ void set_delegate(RootWindowHostDelegate* delegate) {
delegate_ = delegate;
}
@@ -87,16 +87,16 @@ class AURA_EXPORT WindowTreeHost {
// Returns the accelerated widget.
virtual gfx::AcceleratedWidget GetAcceleratedWidget() = 0;
- // Shows the WindowTreeHost.
+ // Shows the RootWindowHost.
virtual void Show() = 0;
- // Hides the WindowTreeHost.
+ // Hides the RootWindowHost.
virtual void Hide() = 0;
// Toggles the host's full screen state.
virtual void ToggleFullScreen() = 0;
- // Gets/Sets the size of the WindowTreeHost.
+ // Gets/Sets the size of the RootWindowHost.
virtual gfx::Rect GetBounds() const = 0;
virtual void SetBounds(const gfx::Rect& bounds) = 0;
@@ -148,7 +148,7 @@ class AURA_EXPORT WindowTreeHost {
protected:
friend class TestScreen; // TODO(beng): see if we can remove/consolidate.
- WindowTreeHost();
+ RootWindowHost();
void CreateCompositor(gfx::AcceleratedWidget accelerated_widget);
@@ -157,14 +157,14 @@ class AURA_EXPORT WindowTreeHost {
void NotifyHostResized(const gfx::Size& new_size);
- WindowTreeHostDelegate* delegate_;
+ RootWindowHostDelegate* delegate_;
private:
scoped_ptr<ui::Compositor> compositor_;
scoped_ptr<RootWindowTransformer> transformer_;
- DISALLOW_COPY_AND_ASSIGN(WindowTreeHost);
+ DISALLOW_COPY_AND_ASSIGN(RootWindowHost);
};
} // namespace aura
diff --git a/ui/aura/window_tree_host_delegate.h b/ui/aura/window_tree_host_delegate.h
index efdffc3..e99903b 100644
--- a/ui/aura/window_tree_host_delegate.h
+++ b/ui/aura/window_tree_host_delegate.h
@@ -25,9 +25,9 @@ namespace aura {
class RootWindow;
-// A private interface used by WindowTreeHost implementations to communicate
+// A private interface used by RootWindowHost implementations to communicate
// with their owning RootWindow.
-class AURA_EXPORT WindowTreeHostDelegate {
+class AURA_EXPORT RootWindowHostDelegate {
public:
virtual bool OnHostKeyEvent(ui::KeyEvent* event) = 0;
virtual bool OnHostMouseEvent(ui::MouseEvent* event) = 0;
@@ -52,7 +52,7 @@ class AURA_EXPORT WindowTreeHostDelegate {
virtual const RootWindow* AsRootWindow() const = 0;
protected:
- virtual ~WindowTreeHostDelegate() {}
+ virtual ~RootWindowHostDelegate() {}
};
} // namespace aura
diff --git a/ui/aura/window_unittest.cc b/ui/aura/window_unittest.cc
index 4802716..a891825 100644
--- a/ui/aura/window_unittest.cc
+++ b/ui/aura/window_unittest.cc
@@ -488,13 +488,13 @@ TEST_F(WindowTest, HitTest) {
ui::TouchEvent pressed(
ui::ET_TOUCH_PRESSED, gfx::Point(50, 50), 0, getTime());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&pressed);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&pressed);
EXPECT_TRUE(w1.HitTest(gfx::Point(-2, -2)));
EXPECT_TRUE(w1.HitTest(gfx::Point(-5, -5)));
EXPECT_FALSE(w1.HitTest(gfx::Point(-5, -6)));
ui::TouchEvent released(
ui::ET_TOUCH_RELEASED, gfx::Point(50, 50), 0, getTime());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&released);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&released);
EXPECT_FALSE(w1.HitTest(gfx::Point(-2, -2)));
// TODO(beng): clip Window to parent.
@@ -845,7 +845,7 @@ TEST_F(WindowTest, CaptureTests) {
ui::TouchEvent touchev(
ui::ET_TOUCH_PRESSED, gfx::Point(50, 50), 0, getTime());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&touchev);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&touchev);
EXPECT_EQ(1, delegate.touch_event_count());
delegate.ResetCounts();
@@ -861,7 +861,7 @@ TEST_F(WindowTest, CaptureTests) {
ui::TouchEvent touchev2(
ui::ET_TOUCH_PRESSED, gfx::Point(250, 250), 1, getTime());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&touchev2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&touchev2);
EXPECT_EQ(0, delegate.touch_event_count());
// Removing the capture window from parent should reset the capture window
@@ -884,7 +884,7 @@ TEST_F(WindowTest, TouchCaptureCancelsOtherTouches) {
// Press on w1.
ui::TouchEvent press(
ui::ET_TOUCH_PRESSED, gfx::Point(10, 10), 0, getTime());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
// We will get both GESTURE_BEGIN and GESTURE_TAP_DOWN.
EXPECT_EQ(2, delegate1.gesture_event_count());
delegate1.ResetCounts();
@@ -898,7 +898,7 @@ TEST_F(WindowTest, TouchCaptureCancelsOtherTouches) {
// Events now go to w2.
ui::TouchEvent move(ui::ET_TOUCH_MOVED, gfx::Point(10, 20), 0, getTime());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move);
EXPECT_EQ(0, delegate1.gesture_event_count());
EXPECT_EQ(0, delegate1.touch_event_count());
EXPECT_EQ(0, delegate2.gesture_event_count());
@@ -906,14 +906,14 @@ TEST_F(WindowTest, TouchCaptureCancelsOtherTouches) {
ui::TouchEvent release(
ui::ET_TOUCH_RELEASED, gfx::Point(10, 20), 0, getTime());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
EXPECT_EQ(0, delegate1.gesture_event_count());
EXPECT_EQ(0, delegate2.gesture_event_count());
// A new press is captured by w2.
ui::TouchEvent press2(
ui::ET_TOUCH_PRESSED, gfx::Point(10, 10), 0, getTime());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2);
EXPECT_EQ(0, delegate1.gesture_event_count());
// We will get both GESTURE_BEGIN and GESTURE_TAP_DOWN.
EXPECT_EQ(2, delegate2.gesture_event_count());
@@ -935,7 +935,7 @@ TEST_F(WindowTest, TouchCaptureDoesntCancelCapturedTouches) {
ui::TouchEvent press(
ui::ET_TOUCH_PRESSED, gfx::Point(10, 10), 0, getTime());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
// We will get both GESTURE_BEGIN and GESTURE_TAP_DOWN.
EXPECT_EQ(2, delegate.gesture_event_count());
@@ -950,7 +950,7 @@ TEST_F(WindowTest, TouchCaptureDoesntCancelCapturedTouches) {
// On move We will get TOUCH_MOVED, GESTURE_TAP_CANCEL,
// GESTURE_SCROLL_START and GESTURE_SCROLL_UPDATE.
ui::TouchEvent move(ui::ET_TOUCH_MOVED, gfx::Point(10, 20), 0, getTime());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move);
EXPECT_EQ(1, delegate.touch_event_count());
EXPECT_EQ(3, delegate.gesture_event_count());
delegate.ResetCounts();
@@ -963,7 +963,7 @@ TEST_F(WindowTest, TouchCaptureDoesntCancelCapturedTouches) {
// On move we still get TOUCH_MOVED and GESTURE_SCROLL_UPDATE.
ui::TouchEvent move2(ui::ET_TOUCH_MOVED, gfx::Point(10, 30), 0, getTime());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move2);
EXPECT_EQ(1, delegate.touch_event_count());
EXPECT_EQ(1, delegate.gesture_event_count());
delegate.ResetCounts();
@@ -971,7 +971,7 @@ TEST_F(WindowTest, TouchCaptureDoesntCancelCapturedTouches) {
// And on release we get TOUCH_RELEASED, GESTURE_SCROLL_END, GESTURE_END
ui::TouchEvent release(
ui::ET_TOUCH_RELEASED, gfx::Point(10, 20), 0, getTime());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
EXPECT_EQ(1, delegate.touch_event_count());
EXPECT_EQ(2, delegate.gesture_event_count());
}
@@ -984,7 +984,7 @@ TEST_F(WindowTest, TransferCaptureTouchEvents) {
scoped_ptr<Window> w1(CreateTestWindowWithDelegate(
&d1, 0, gfx::Rect(0, 0, 20, 20), root_window()));
ui::TouchEvent p1(ui::ET_TOUCH_PRESSED, gfx::Point(10, 10), 0, getTime());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&p1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&p1);
// We will get both GESTURE_BEGIN and GESTURE_TAP_DOWN.
EXPECT_EQ(1, d1.touch_event_count());
EXPECT_EQ(2, d1.gesture_event_count());
@@ -995,7 +995,7 @@ TEST_F(WindowTest, TransferCaptureTouchEvents) {
scoped_ptr<Window> w2(CreateTestWindowWithDelegate(
&d2, 0, gfx::Rect(40, 0, 40, 20), root_window()));
ui::TouchEvent p2(ui::ET_TOUCH_PRESSED, gfx::Point(41, 10), 1, getTime());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&p2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&p2);
EXPECT_EQ(0, d1.touch_event_count());
EXPECT_EQ(0, d1.gesture_event_count());
// We will get both GESTURE_BEGIN and GESTURE_TAP_DOWN for new target window.
@@ -1031,7 +1031,7 @@ TEST_F(WindowTest, TransferCaptureTouchEvents) {
// Move touch id originally associated with |w2|. Since capture was transfered
// from 2 to 3 only |w3| should get the event.
ui::TouchEvent m3(ui::ET_TOUCH_MOVED, gfx::Point(110, 105), 1, getTime());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&m3);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&m3);
EXPECT_EQ(0, d1.touch_event_count());
EXPECT_EQ(0, d1.gesture_event_count());
EXPECT_EQ(0, d2.touch_event_count());
@@ -1054,7 +1054,7 @@ TEST_F(WindowTest, TransferCaptureTouchEvents) {
// And when we move the touch again, |w3| still gets the events.
ui::TouchEvent m4(ui::ET_TOUCH_MOVED, gfx::Point(120, 105), 1, getTime());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&m4);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&m4);
EXPECT_EQ(0, d1.touch_event_count());
EXPECT_EQ(0, d1.gesture_event_count());
EXPECT_EQ(0, d2.touch_event_count());
@@ -1205,7 +1205,7 @@ TEST_F(WindowTest, MouseEnterExit) {
}
// Verifies that the WindowDelegate receives MouseExit from ET_MOUSE_EXITED.
-TEST_F(WindowTest, WindowTreeHostExit) {
+TEST_F(WindowTest, RootWindowHostExit) {
MouseEnterExitWindowDelegate d1;
scoped_ptr<Window> w1(
CreateTestWindowWithDelegate(&d1, 1, gfx::Rect(10, 10, 50, 50),
@@ -1219,7 +1219,7 @@ TEST_F(WindowTest, WindowTreeHostExit) {
ui::MouseEvent exit_event(
ui::ET_MOUSE_EXITED, gfx::Point(), gfx::Point(), 0);
- dispatcher()->AsWindowTreeHostDelegate()->OnHostMouseEvent(&exit_event);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostMouseEvent(&exit_event);
EXPECT_FALSE(d1.entered());
EXPECT_TRUE(d1.exited());
}
@@ -1576,7 +1576,7 @@ TEST_F(WindowTest, TransformGesture) {
ui::TouchEvent press(
ui::ET_TOUCH_PRESSED, gfx::Point(size.height() - 10, 10), 0, getTime());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
EXPECT_EQ(gfx::Point(10, 10).ToString(), delegate->position().ToString());
}
diff --git a/ui/base/ime/input_method.h b/ui/base/ime/input_method.h
index 289b912..53c3c37 100644
--- a/ui/base/ime/input_method.h
+++ b/ui/base/ime/input_method.h
@@ -45,7 +45,7 @@ class TextInputClient;
// - Keeps track of the focused TextInputClient to see which client can call
// APIs, OnTextInputTypeChanged, OnCaretBoundsChanged, and CancelComposition,
// that change the state of the input method.
-// In Aura environment, aura::WindowTreeHost creates an instance of
+// In Aura environment, aura::RootWindowHost creates an instance of
// ui::InputMethod and owns it.
class InputMethod {
public:
diff --git a/ui/events/ozone/event_factory_ozone.h b/ui/events/ozone/event_factory_ozone.h
index 92c6115..389946a 100644
--- a/ui/events/ozone/event_factory_ozone.h
+++ b/ui/events/ozone/event_factory_ozone.h
@@ -24,7 +24,7 @@ class EVENTS_EXPORT EventFactoryOzone {
EventFactoryOzone();
virtual ~EventFactoryOzone();
- // Called from WindowTreeHostOzone to initialize and start processing events.
+ // Called from RootWindowHostOzone to initialize and start processing events.
// This should create the initial set of converters, and potentially arrange
// for more converters to be created as new event sources become available.
// No events processing should happen until this is called. All processes have
diff --git a/ui/keyboard/keyboard_util.cc b/ui/keyboard/keyboard_util.cc
index 80bddc5..42c26a0 100644
--- a/ui/keyboard/keyboard_util.cc
+++ b/ui/keyboard/keyboard_util.cc
@@ -29,7 +29,7 @@ void SendProcessKeyEvent(ui::EventType type,
ui::TranslatedKeyEvent event(type == ui::ET_KEY_PRESSED,
ui::VKEY_PROCESSKEY,
ui::EF_NONE);
- dispatcher->AsWindowTreeHostDelegate()->OnHostKeyEvent(&event);
+ dispatcher->AsRootWindowHostDelegate()->OnHostKeyEvent(&event);
}
base::LazyInstance<base::Time> g_keyboard_load_time_start =
@@ -92,17 +92,17 @@ bool MoveCursor(int swipe_direction,
// First deal with the x movement.
if (codex != ui::VKEY_UNKNOWN) {
ui::KeyEvent press_event(ui::ET_KEY_PRESSED, codex, modifier_flags, 0);
- dispatcher->AsWindowTreeHostDelegate()->OnHostKeyEvent(&press_event);
+ dispatcher->AsRootWindowHostDelegate()->OnHostKeyEvent(&press_event);
ui::KeyEvent release_event(ui::ET_KEY_RELEASED, codex, modifier_flags, 0);
- dispatcher->AsWindowTreeHostDelegate()->OnHostKeyEvent(&release_event);
+ dispatcher->AsRootWindowHostDelegate()->OnHostKeyEvent(&release_event);
}
// Then deal with the y movement.
if (codey != ui::VKEY_UNKNOWN) {
ui::KeyEvent press_event(ui::ET_KEY_PRESSED, codey, modifier_flags, 0);
- dispatcher->AsWindowTreeHostDelegate()->OnHostKeyEvent(&press_event);
+ dispatcher->AsRootWindowHostDelegate()->OnHostKeyEvent(&press_event);
ui::KeyEvent release_event(ui::ET_KEY_RELEASED, codey, modifier_flags, 0);
- dispatcher->AsWindowTreeHostDelegate()->OnHostKeyEvent(&release_event);
+ dispatcher->AsRootWindowHostDelegate()->OnHostKeyEvent(&release_event);
}
return true;
}
@@ -154,7 +154,7 @@ bool SendKeyEvent(const std::string type,
}
ui::KeyEvent event(event_type, code, modifiers, false);
- dispatcher->AsWindowTreeHostDelegate()->OnHostKeyEvent(&event);
+ dispatcher->AsRootWindowHostDelegate()->OnHostKeyEvent(&event);
}
return true;
}
diff --git a/ui/views/corewm/capture_controller_unittest.cc b/ui/views/corewm/capture_controller_unittest.cc
index a32e56e..f6ac7b3 100644
--- a/ui/views/corewm/capture_controller_unittest.cc
+++ b/ui/views/corewm/capture_controller_unittest.cc
@@ -103,7 +103,7 @@ TEST_F(CaptureControllerTest, ResetMouseEventHandlerOnCapture) {
// dispatch further mouse events to |w1|.
ui::MouseEvent mouse_pressed_event(ui::ET_MOUSE_PRESSED, gfx::Point(5, 5),
gfx::Point(5, 5), 0);
- dispatcher()->AsWindowTreeHostDelegate()->OnHostMouseEvent(
+ dispatcher()->AsRootWindowHostDelegate()->OnHostMouseEvent(
&mouse_pressed_event);
EXPECT_EQ(w1.get(), dispatcher()->mouse_pressed_handler());
diff --git a/ui/views/corewm/compound_event_filter_unittest.cc b/ui/views/corewm/compound_event_filter_unittest.cc
index b094d74..6b852e4 100644
--- a/ui/views/corewm/compound_event_filter_unittest.cc
+++ b/ui/views/corewm/compound_event_filter_unittest.cc
@@ -65,36 +65,36 @@ TEST_F(CompoundEventFilterTest, CursorVisibilityChange) {
// Send key event to hide the cursor.
ui::KeyEvent key(ui::ET_KEY_PRESSED, ui::VKEY_A, 0, true);
- dispatcher()->AsWindowTreeHostDelegate()->OnHostKeyEvent(&key);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostKeyEvent(&key);
EXPECT_FALSE(cursor_client.IsCursorVisible());
// Synthesized mouse event should not show the cursor.
ui::MouseEvent enter(ui::ET_MOUSE_ENTERED, gfx::Point(10, 10),
gfx::Point(10, 10), 0);
enter.set_flags(enter.flags() | ui::EF_IS_SYNTHESIZED);
- dispatcher()->AsWindowTreeHostDelegate()->OnHostMouseEvent(&enter);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostMouseEvent(&enter);
EXPECT_FALSE(cursor_client.IsCursorVisible());
ui::MouseEvent move(ui::ET_MOUSE_MOVED, gfx::Point(10, 10),
gfx::Point(10, 10), 0);
move.set_flags(enter.flags() | ui::EF_IS_SYNTHESIZED);
- dispatcher()->AsWindowTreeHostDelegate()->OnHostMouseEvent(&move);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostMouseEvent(&move);
EXPECT_FALSE(cursor_client.IsCursorVisible());
ui::MouseEvent real_move(ui::ET_MOUSE_MOVED, gfx::Point(10, 10),
gfx::Point(10, 10), 0);
- dispatcher()->AsWindowTreeHostDelegate()->OnHostMouseEvent(&real_move);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostMouseEvent(&real_move);
EXPECT_TRUE(cursor_client.IsCursorVisible());
// Send key event to hide the cursor again.
- dispatcher()->AsWindowTreeHostDelegate()->OnHostKeyEvent(&key);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostKeyEvent(&key);
EXPECT_FALSE(cursor_client.IsCursorVisible());
// Mouse synthesized exit event should not show the cursor.
ui::MouseEvent exit(ui::ET_MOUSE_EXITED, gfx::Point(10, 10),
gfx::Point(10, 10), 0);
exit.set_flags(enter.flags() | ui::EF_IS_SYNTHESIZED);
- dispatcher()->AsWindowTreeHostDelegate()->OnHostMouseEvent(&exit);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostMouseEvent(&exit);
EXPECT_FALSE(cursor_client.IsCursorVisible());
}
@@ -111,29 +111,29 @@ TEST_F(CompoundEventFilterTest, TouchHidesCursor) {
ui::MouseEvent mouse0(ui::ET_MOUSE_MOVED, gfx::Point(10, 10),
gfx::Point(10, 10), 0);
- dispatcher()->AsWindowTreeHostDelegate()->OnHostMouseEvent(&mouse0);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostMouseEvent(&mouse0);
EXPECT_TRUE(cursor_client.IsMouseEventsEnabled());
// This press is required for the GestureRecognizer to associate a target
// with kTouchId
ui::TouchEvent press0(
ui::ET_TOUCH_PRESSED, gfx::Point(90, 90), 1, GetTime());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press0);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press0);
EXPECT_FALSE(cursor_client.IsMouseEventsEnabled());
ui::TouchEvent move(ui::ET_TOUCH_MOVED, gfx::Point(10, 10), 1, GetTime());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move);
EXPECT_FALSE(cursor_client.IsMouseEventsEnabled());
ui::TouchEvent release(
ui::ET_TOUCH_RELEASED, gfx::Point(10, 10), 1, GetTime());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
EXPECT_FALSE(cursor_client.IsMouseEventsEnabled());
ui::MouseEvent mouse1(ui::ET_MOUSE_MOVED, gfx::Point(10, 10),
gfx::Point(10, 10), 0);
// Move the cursor again. The cursor should be visible.
- dispatcher()->AsWindowTreeHostDelegate()->OnHostMouseEvent(&mouse1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostMouseEvent(&mouse1);
EXPECT_TRUE(cursor_client.IsMouseEventsEnabled());
// Now activate the window and press on it again.
@@ -141,7 +141,7 @@ TEST_F(CompoundEventFilterTest, TouchHidesCursor) {
ui::ET_TOUCH_PRESSED, gfx::Point(90, 90), 1, GetTime());
aura::client::GetActivationClient(
root_window())->ActivateWindow(window.get());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1);
EXPECT_FALSE(cursor_client.IsMouseEventsEnabled());
aura::Env::GetInstance()->RemovePreTargetHandler(compound_filter.get());
}
diff --git a/ui/views/corewm/input_method_event_filter.cc b/ui/views/corewm/input_method_event_filter.cc
index 8a73691..8e9ead8e 100644
--- a/ui/views/corewm/input_method_event_filter.cc
+++ b/ui/views/corewm/input_method_event_filter.cc
@@ -63,7 +63,7 @@ bool InputMethodEventFilter::DispatchKeyEventPostIME(
DCHECK(event.message != WM_CHAR);
#endif
ui::TranslatedKeyEvent aura_event(event, false /* is_char */);
- return target_dispatcher_->AsWindowTreeHostDelegate()->OnHostKeyEvent(
+ return target_dispatcher_->AsRootWindowHostDelegate()->OnHostKeyEvent(
&aura_event);
}
@@ -73,7 +73,7 @@ bool InputMethodEventFilter::DispatchFabricatedKeyEventPostIME(
int flags) {
ui::TranslatedKeyEvent aura_event(type == ui::ET_KEY_PRESSED, key_code,
flags);
- return target_dispatcher_->AsWindowTreeHostDelegate()->OnHostKeyEvent(
+ return target_dispatcher_->AsRootWindowHostDelegate()->OnHostKeyEvent(
&aura_event);
}
diff --git a/ui/views/corewm/tooltip_win.h b/ui/views/corewm/tooltip_win.h
index b031a32..e454aac 100644
--- a/ui/views/corewm/tooltip_win.h
+++ b/ui/views/corewm/tooltip_win.h
@@ -24,7 +24,7 @@ class VIEWS_EXPORT TooltipWin : public Tooltip {
explicit TooltipWin(HWND parent);
virtual ~TooltipWin();
- // HandleNotify() is forwarded from DesktopWindowTreeHostWin to keep the
+ // HandleNotify() is forwarded from DesktopRootWindowHostWin to keep the
// native tooltip in sync.
bool HandleNotify(int w_param, NMHDR* l_param, LRESULT* l_result);
diff --git a/ui/views/test/ui_controls_factory_desktop_aurax11.cc b/ui/views/test/ui_controls_factory_desktop_aurax11.cc
index 6db2e4a..5fd0e1e 100644
--- a/ui/views/test/ui_controls_factory_desktop_aurax11.cc
+++ b/ui/views/test/ui_controls_factory_desktop_aurax11.cc
@@ -259,10 +259,10 @@ class UIControlsDesktopX11 : public UIControlsAura {
// Most interactive_ui_tests run inside of the aura_test_helper
// environment. This means that we can't rely on gfx::Screen and several
// other things to work properly. Therefore we hack around this by
- // iterating across the windows owned DesktopWindowTreeHostX11 since this
+ // iterating across the windows owned DesktopRootWindowHostX11 since this
// doesn't rely on having a DesktopScreenX11.
std::vector<aura::Window*> windows =
- DesktopWindowTreeHostX11::GetAllOpenWindows();
+ DesktopRootWindowHostX11::GetAllOpenWindows();
for (std::vector<aura::Window*>::const_iterator it = windows.begin();
it != windows.end(); ++it) {
if ((*it)->GetBoundsInScreen().Contains(point)) {
diff --git a/ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.h b/ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.h
index e751776..8e8711e 100644
--- a/ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.h
+++ b/ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.h
@@ -42,7 +42,7 @@ namespace views {
class DesktopNativeCursorManager;
// Implements drag and drop on X11 for aura. On one side, this class takes raw
-// X11 events forwarded from DesktopWindowTreeHostLinux, while on the other, it
+// X11 events forwarded from DesktopRootWindowHostLinux, while on the other, it
// handles the views drag events.
class VIEWS_EXPORT DesktopDragDropClientAuraX11
: public aura::client::DragDropClient,
diff --git a/ui/views/widget/desktop_aura/desktop_drop_target_win.h b/ui/views/widget/desktop_aura/desktop_drop_target_win.h
index 9e11ff6..113fd75 100644
--- a/ui/views/widget/desktop_aura/desktop_drop_target_win.h
+++ b/ui/views/widget/desktop_aura/desktop_drop_target_win.h
@@ -23,7 +23,7 @@ class OSExchangeData;
namespace views {
// DesktopDropTargetWin takes care of managing drag and drop for
-// DesktopWindowTreeHostWin. It converts Windows OLE drop messages into
+// DesktopRootWindowHostWin. It converts Windows OLE drop messages into
// aura::client::DragDropDelegate calls.
class DesktopDropTargetWin : public ui::DropTargetWin,
public aura::WindowObserver {
diff --git a/ui/views/widget/desktop_aura/desktop_factory_ozone.h b/ui/views/widget/desktop_aura/desktop_factory_ozone.h
index d2a0023..e557d3b 100644
--- a/ui/views/widget/desktop_aura/desktop_factory_ozone.h
+++ b/ui/views/widget/desktop_aura/desktop_factory_ozone.h
@@ -13,7 +13,7 @@ class Rect;
namespace views {
class DesktopNativeWidgetAura;
-class DesktopWindowTreeHost;
+class DesktopRootWindowHost;
namespace internal {
class NativeWidgetDelegate;
@@ -30,9 +30,9 @@ class VIEWS_EXPORT DesktopFactoryOzone {
// Sets the implementation delegate. Ownership is retained by the caller.
static void SetInstance(DesktopFactoryOzone* impl);
- // Delegates implementation of DesktopWindowTreeHost::Create externally to
+ // Delegates implementation of DesktopRootWindowHost::Create externally to
// Ozone implementation.
- virtual DesktopWindowTreeHost* CreateWindowTreeHost(
+ virtual DesktopRootWindowHost* CreateRootWindowHost(
internal::NativeWidgetDelegate* native_widget_delegate,
DesktopNativeWidgetAura* desktop_native_widget_aura) = 0;
diff --git a/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc b/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
index 394b7a8..ab01728 100644
--- a/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
+++ b/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
@@ -239,7 +239,7 @@ DesktopNativeWidgetAura* DesktopNativeWidgetAura::ForWindow(
void DesktopNativeWidgetAura::OnHostClosed() {
// Don't invoke Widget::OnNativeWidgetDestroying(), its done by
- // DesktopWindowTreeHost.
+ // DesktopRootWindowHost.
// The WindowModalityController is at the front of the event pretarget
// handler list. We destroy it first to preserve order symantics.
@@ -254,7 +254,7 @@ void DesktopNativeWidgetAura::OnHostClosed() {
capture_window->ReleaseCapture();
}
- // DesktopWindowTreeHost owns the ActivationController which ShadowController
+ // DesktopRootWindowHost owns the ActivationController which ShadowController
// references. Make sure we destroy ShadowController early on.
shadow_controller_.reset();
tooltip_manager_.reset();
@@ -279,10 +279,10 @@ void DesktopNativeWidgetAura::OnHostClosed() {
delete this;
}
-void DesktopNativeWidgetAura::OnDesktopWindowTreeHostDestroyed(
+void DesktopNativeWidgetAura::OnDesktopRootWindowHostDestroyed(
aura::RootWindow* root) {
- // |root_window_| is still valid, but DesktopWindowTreeHost is nearly
- // destroyed. Do cleanup here of members DesktopWindowTreeHost may also use.
+ // |root_window_| is still valid, but DesktopRootWindowHost is nearly
+ // destroyed. Do cleanup here of members DesktopRootWindowHost may also use.
aura::client::SetFocusClient(root->window(), NULL);
aura::client::SetActivationClient(root->window(), NULL);
focus_client_.reset();
@@ -361,7 +361,7 @@ void DesktopNativeWidgetAura::InitNativeWidget(
desktop_root_window_host_ = params.desktop_root_window_host ?
params.desktop_root_window_host :
- DesktopWindowTreeHost::Create(native_widget_delegate_, this);
+ DesktopRootWindowHost::Create(native_widget_delegate_, this);
aura::RootWindow::CreateParams rw_params(params.bounds);
desktop_root_window_host_->Init(content_window_, params, &rw_params);
@@ -377,7 +377,7 @@ void DesktopNativeWidgetAura::InitNativeWidget(
new views::corewm::WindowModalityController(root_window_->window()));
// |root_window_event_filter_| must be created before
- // OnWindowTreeHostCreated() is invoked.
+ // OnRootWindowHostCreated() is invoked.
// CEF sets focus to the window the user clicks down on.
// TODO(beng): see if we can't do this some other way. CEF seems a heavy-
@@ -427,7 +427,7 @@ void DesktopNativeWidgetAura::InitNativeWidget(
focus_client_->FocusWindow(content_window_);
- OnWindowTreeHostResized(root_window_.get());
+ OnRootWindowHostResized(root_window_.get());
root_window_->AddRootWindowObserver(this);
@@ -625,7 +625,7 @@ void DesktopNativeWidgetAura::SetBounds(const gfx::Rect& bounds) {
// TODO(ananta)
// This code by default scales the bounds rectangle by 1.
// We could probably get rid of this and similar logic from
- // the DesktopNativeWidgetAura::OnWindowTreeHostResized function.
+ // the DesktopNativeWidgetAura::OnRootWindowHostResized function.
float scale = 1;
aura::Window* root = root_window_->window();
if (root) {
@@ -635,7 +635,7 @@ void DesktopNativeWidgetAura::SetBounds(const gfx::Rect& bounds) {
gfx::Rect bounds_in_pixels(
gfx::ToCeiledPoint(gfx::ScalePoint(bounds.origin(), scale)),
gfx::ToFlooredSize(gfx::ScaleSize(bounds.size(), scale)));
- desktop_root_window_host_->AsWindowTreeHost()->SetBounds(bounds_in_pixels);
+ desktop_root_window_host_->AsRootWindowHost()->SetBounds(bounds_in_pixels);
}
void DesktopNativeWidgetAura::SetSize(const gfx::Size& size) {
@@ -675,14 +675,14 @@ void DesktopNativeWidgetAura::CloseNow() {
void DesktopNativeWidgetAura::Show() {
if (!content_window_)
return;
- desktop_root_window_host_->AsWindowTreeHost()->Show();
+ desktop_root_window_host_->AsRootWindowHost()->Show();
content_window_->Show();
}
void DesktopNativeWidgetAura::Hide() {
if (!content_window_)
return;
- desktop_root_window_host_->AsWindowTreeHost()->Hide();
+ desktop_root_window_host_->AsRootWindowHost()->Hide();
content_window_->Hide();
}
@@ -839,7 +839,7 @@ void DesktopNativeWidgetAura::SetVisibilityChangedAnimationsEnabled(
}
ui::NativeTheme* DesktopNativeWidgetAura::GetNativeTheme() const {
- return DesktopWindowTreeHost::GetNativeTheme(content_window_);
+ return DesktopRootWindowHost::GetNativeTheme(content_window_);
}
void DesktopNativeWidgetAura::OnRootViewLayout() const {
@@ -1067,12 +1067,12 @@ int DesktopNativeWidgetAura::OnPerformDrop(const ui::DropTargetEvent& event) {
////////////////////////////////////////////////////////////////////////////////
// DesktopNativeWidgetAura, aura::RootWindowObserver implementation:
-void DesktopNativeWidgetAura::OnWindowTreeHostCloseRequested(
+void DesktopNativeWidgetAura::OnRootWindowHostCloseRequested(
const aura::RootWindow* root) {
Close();
}
-void DesktopNativeWidgetAura::OnWindowTreeHostResized(
+void DesktopNativeWidgetAura::OnRootWindowHostResized(
const aura::RootWindow* root) {
// Don't update the bounds of the child layers when animating closed. If we
// did it would force a paint, which we don't want. We don't want the paint
@@ -1088,10 +1088,10 @@ void DesktopNativeWidgetAura::OnWindowTreeHostResized(
native_widget_delegate_->OnNativeWidgetSizeChanged(new_bounds.size());
}
-void DesktopNativeWidgetAura::OnWindowTreeHostMoved(
+void DesktopNativeWidgetAura::OnRootWindowHostMoved(
const aura::RootWindow* root,
const gfx::Point& new_origin) {
- TRACE_EVENT1("views", "DesktopNativeWidgetAura::OnWindowTreeHostMoved",
+ TRACE_EVENT1("views", "DesktopNativeWidgetAura::OnRootWindowHostMoved",
"new_origin", new_origin.ToString());
native_widget_delegate_->OnNativeWidgetMove();
diff --git a/ui/views/widget/desktop_aura/desktop_native_widget_aura.h b/ui/views/widget/desktop_aura/desktop_native_widget_aura.h
index a7ebd96..9fe207a 100644
--- a/ui/views/widget/desktop_aura/desktop_native_widget_aura.h
+++ b/ui/views/widget/desktop_aura/desktop_native_widget_aura.h
@@ -41,7 +41,7 @@ class WindowModalityController;
class DesktopCaptureClient;
class DesktopDispatcherClient;
class DesktopEventClient;
-class DesktopWindowTreeHost;
+class DesktopRootWindowHost;
class DropHelper;
class FocusManagerEventHandler;
class TooltipManagerAura;
@@ -63,13 +63,13 @@ class VIEWS_EXPORT DesktopNativeWidgetAura
// Maps from window to DesktopNativeWidgetAura.
static DesktopNativeWidgetAura* ForWindow(aura::Window* window);
- // Called by our DesktopWindowTreeHost after it has deleted native resources;
+ // Called by our DesktopRootWindowHost after it has deleted native resources;
// this is the signal that we should start our shutdown.
virtual void OnHostClosed();
- // Called from ~DesktopWindowTreeHost. This takes the RootWindow as by the
+ // Called from ~DesktopRootWindowHost. This takes the RootWindow as by the
// time we get here |root_window_| is NULL.
- virtual void OnDesktopWindowTreeHostDestroyed(aura::RootWindow* root);
+ virtual void OnDesktopRootWindowHostDestroyed(aura::RootWindow* root);
corewm::InputMethodEventFilter* input_method_event_filter() {
return input_method_event_filter_.get();
@@ -218,10 +218,10 @@ class VIEWS_EXPORT DesktopNativeWidgetAura
virtual int OnPerformDrop(const ui::DropTargetEvent& event) OVERRIDE;
// Overridden from aura::RootWindowObserver:
- virtual void OnWindowTreeHostCloseRequested(
+ virtual void OnRootWindowHostCloseRequested(
const aura::RootWindow* root) OVERRIDE;
- virtual void OnWindowTreeHostResized(const aura::RootWindow* root) OVERRIDE;
- virtual void OnWindowTreeHostMoved(const aura::RootWindow* root,
+ virtual void OnRootWindowHostResized(const aura::RootWindow* root) OVERRIDE;
+ virtual void OnRootWindowHostMoved(const aura::RootWindow* root,
const gfx::Point& new_origin) OVERRIDE;
private:
@@ -240,7 +240,7 @@ class VIEWS_EXPORT DesktopNativeWidgetAura
scoped_ptr<DesktopCaptureClient> capture_client_;
// The NativeWidget owns the RootWindow. Required because the RootWindow owns
- // its WindowTreeHost, so DesktopWindowTreeHost can't own it.
+ // its RootWindowHost, so DesktopRootWindowHost can't own it.
scoped_ptr<aura::RootWindow> root_window_;
// The following factory is used for calls to close the NativeWidgetAura
@@ -251,7 +251,7 @@ class VIEWS_EXPORT DesktopNativeWidgetAura
bool can_activate_;
// Ownership passed to RootWindow on Init.
- DesktopWindowTreeHost* desktop_root_window_host_;
+ DesktopRootWindowHost* desktop_root_window_host_;
// Child of the root, contains |content_window_|.
aura::Window* content_window_container_;
diff --git a/ui/views/widget/desktop_aura/desktop_root_window_host.h b/ui/views/widget/desktop_aura/desktop_root_window_host.h
index 8c2704a..77c6150 100644
--- a/ui/views/widget/desktop_aura/desktop_root_window_host.h
+++ b/ui/views/widget/desktop_aura/desktop_root_window_host.h
@@ -12,7 +12,7 @@
#include "ui/views/widget/widget.h"
namespace aura {
-class WindowTreeHost;
+class RootWindowHost;
class Window;
namespace client {
@@ -42,11 +42,11 @@ class NativeWidgetDelegate;
class DesktopNativeCursorManager;
class DesktopNativeWidgetAura;
-class VIEWS_EXPORT DesktopWindowTreeHost {
+class VIEWS_EXPORT DesktopRootWindowHost {
public:
- virtual ~DesktopWindowTreeHost() {}
+ virtual ~DesktopRootWindowHost() {}
- static DesktopWindowTreeHost* Create(
+ static DesktopRootWindowHost* Create(
internal::NativeWidgetDelegate* native_widget_delegate,
DesktopNativeWidgetAura* desktop_native_widget_aura);
@@ -64,19 +64,19 @@ class VIEWS_EXPORT DesktopWindowTreeHost {
// Creates and returns the Tooltip implementation to use. Return value is
// owned by DesktopNativeWidgetAura and lives as long as
- // DesktopWindowTreeHost.
+ // DesktopRootWindowHost.
virtual scoped_ptr<corewm::Tooltip> CreateTooltip() = 0;
// Creates and returns the DragDropClient implementation to use. Return value
// is owned by DesktopNativeWidgetAura and lives as long as
- // DesktopWindowTreeHost.
+ // DesktopRootWindowHost.
virtual scoped_ptr<aura::client::DragDropClient> CreateDragDropClient(
DesktopNativeCursorManager* cursor_manager) = 0;
virtual void Close() = 0;
virtual void CloseNow() = 0;
- virtual aura::WindowTreeHost* AsWindowTreeHost() = 0;
+ virtual aura::RootWindowHost* AsRootWindowHost() = 0;
virtual void ShowWindowWithState(ui::WindowShowState show_state) = 0;
virtual void ShowMaximizedWithBounds(const gfx::Rect& restored_bounds) = 0;
diff --git a/ui/views/widget/desktop_aura/desktop_root_window_host_observer_x11.h b/ui/views/widget/desktop_aura/desktop_root_window_host_observer_x11.h
index c8e8a48..f430b38 100644
--- a/ui/views/widget/desktop_aura/desktop_root_window_host_observer_x11.h
+++ b/ui/views/widget/desktop_aura/desktop_root_window_host_observer_x11.h
@@ -10,9 +10,9 @@
namespace views {
// Allows for the observation of lower level window events.
-class VIEWS_EXPORT DesktopWindowTreeHostObserverX11 {
+class VIEWS_EXPORT DesktopRootWindowHostObserverX11 {
public:
- virtual ~DesktopWindowTreeHostObserverX11() {}
+ virtual ~DesktopRootWindowHostObserverX11() {}
// Called after we receive a MapNotify event (the X11 server has allocated
// resources for it).
diff --git a/ui/views/widget/desktop_aura/desktop_root_window_host_ozone.cc b/ui/views/widget/desktop_aura/desktop_root_window_host_ozone.cc
index e327cb1..ffca2a6 100644
--- a/ui/views/widget/desktop_aura/desktop_root_window_host_ozone.cc
+++ b/ui/views/widget/desktop_aura/desktop_root_window_host_ozone.cc
@@ -8,12 +8,12 @@
namespace views {
-DesktopWindowTreeHost* DesktopWindowTreeHost::Create(
+DesktopRootWindowHost* DesktopRootWindowHost::Create(
internal::NativeWidgetDelegate* native_widget_delegate,
DesktopNativeWidgetAura* desktop_native_widget_aura) {
DesktopFactoryOzone* d_factory = DesktopFactoryOzone::GetInstance();
- return d_factory->CreateWindowTreeHost(native_widget_delegate,
+ return d_factory->CreateRootWindowHost(native_widget_delegate,
desktop_native_widget_aura);
}
diff --git a/ui/views/widget/desktop_aura/desktop_root_window_host_win.cc b/ui/views/widget/desktop_aura/desktop_root_window_host_win.cc
index f96207c..b1969b3 100644
--- a/ui/views/widget/desktop_aura/desktop_root_window_host_win.cc
+++ b/ui/views/widget/desktop_aura/desktop_root_window_host_win.cc
@@ -63,14 +63,14 @@ void InsetBottomRight(gfx::Rect* rect, gfx::Vector2d vector) {
DEFINE_WINDOW_PROPERTY_KEY(aura::Window*, kContentWindowForRootWindow, NULL);
-// Identifies the DesktopWindowTreeHostWin associated with the RootWindow.
-DEFINE_WINDOW_PROPERTY_KEY(DesktopWindowTreeHostWin*, kDesktopWindowTreeHostKey,
+// Identifies the DesktopRootWindowHostWin associated with the RootWindow.
+DEFINE_WINDOW_PROPERTY_KEY(DesktopRootWindowHostWin*, kDesktopRootWindowHostKey,
NULL);
////////////////////////////////////////////////////////////////////////////////
-// DesktopWindowTreeHostWin, public:
+// DesktopRootWindowHostWin, public:
-DesktopWindowTreeHostWin::DesktopWindowTreeHostWin(
+DesktopRootWindowHostWin::DesktopRootWindowHostWin(
internal::NativeWidgetDelegate* native_widget_delegate,
DesktopNativeWidgetAura* desktop_native_widget_aura)
: root_window_(NULL),
@@ -86,20 +86,20 @@ DesktopWindowTreeHostWin::DesktopWindowTreeHostWin(
is_cursor_visible_(true) {
}
-DesktopWindowTreeHostWin::~DesktopWindowTreeHostWin() {
+DesktopRootWindowHostWin::~DesktopRootWindowHostWin() {
// WARNING: |content_window_| has been destroyed by the time we get here.
- desktop_native_widget_aura_->OnDesktopWindowTreeHostDestroyed(
+ desktop_native_widget_aura_->OnDesktopRootWindowHostDestroyed(
root_window_);
}
// static
-aura::Window* DesktopWindowTreeHostWin::GetContentWindowForHWND(HWND hwnd) {
+aura::Window* DesktopRootWindowHostWin::GetContentWindowForHWND(HWND hwnd) {
aura::RootWindow* root = aura::RootWindow::GetForAcceleratedWidget(hwnd);
return root ? root->window()->GetProperty(kContentWindowForRootWindow) : NULL;
}
// static
-ui::NativeTheme* DesktopWindowTreeHost::GetNativeTheme(aura::Window* window) {
+ui::NativeTheme* DesktopRootWindowHost::GetNativeTheme(aura::Window* window) {
// Use NativeThemeWin for windows shown on the desktop, those not on the
// desktop come from Ash and get NativeThemeAura.
aura::WindowEventDispatcher* dispatcher =
@@ -107,7 +107,7 @@ ui::NativeTheme* DesktopWindowTreeHost::GetNativeTheme(aura::Window* window) {
if (dispatcher) {
HWND host_hwnd = dispatcher->host()->GetAcceleratedWidget();
if (host_hwnd &&
- DesktopWindowTreeHostWin::GetContentWindowForHWND(host_hwnd)) {
+ DesktopRootWindowHostWin::GetContentWindowForHWND(host_hwnd)) {
return ui::NativeThemeWin::instance();
}
}
@@ -115,9 +115,9 @@ ui::NativeTheme* DesktopWindowTreeHost::GetNativeTheme(aura::Window* window) {
}
////////////////////////////////////////////////////////////////////////////////
-// DesktopWindowTreeHostWin, DesktopWindowTreeHost implementation:
+// DesktopRootWindowHostWin, DesktopRootWindowHost implementation:
-void DesktopWindowTreeHostWin::Init(
+void DesktopRootWindowHostWin::Init(
aura::Window* content_window,
const Widget::InitParams& params,
aura::RootWindow::CreateParams* rw_create_params) {
@@ -147,14 +147,14 @@ void DesktopWindowTreeHostWin::Init(
rw_create_params->host = this;
}
-void DesktopWindowTreeHostWin::OnRootWindowCreated(
+void DesktopRootWindowHostWin::OnRootWindowCreated(
aura::RootWindow* root,
const Widget::InitParams& params) {
root_window_ = root;
root_window_->window()->SetProperty(kContentWindowForRootWindow,
content_window_);
- root_window_->window()->SetProperty(kDesktopWindowTreeHostKey, this);
+ root_window_->window()->SetProperty(kDesktopRootWindowHostKey, this);
should_animate_window_close_ =
content_window_->type() != aura::client::WINDOW_TYPE_NORMAL &&
@@ -164,21 +164,21 @@ void DesktopWindowTreeHostWin::OnRootWindowCreated(
SetWindowTransparency();
}
-scoped_ptr<corewm::Tooltip> DesktopWindowTreeHostWin::CreateTooltip() {
+scoped_ptr<corewm::Tooltip> DesktopRootWindowHostWin::CreateTooltip() {
DCHECK(!tooltip_);
tooltip_ = new corewm::TooltipWin(GetAcceleratedWidget());
return scoped_ptr<corewm::Tooltip>(tooltip_);
}
scoped_ptr<aura::client::DragDropClient>
-DesktopWindowTreeHostWin::CreateDragDropClient(
+DesktopRootWindowHostWin::CreateDragDropClient(
DesktopNativeCursorManager* cursor_manager) {
drag_drop_client_ = new DesktopDragDropClientWin(root_window_->window(),
GetHWND());
return scoped_ptr<aura::client::DragDropClient>(drag_drop_client_).Pass();
}
-void DesktopWindowTreeHostWin::Close() {
+void DesktopRootWindowHostWin::Close() {
// TODO(beng): Move this entire branch to DNWA so it can be shared with X11.
if (should_animate_window_close_) {
pending_close_ = true;
@@ -194,30 +194,30 @@ void DesktopWindowTreeHostWin::Close() {
}
}
-void DesktopWindowTreeHostWin::CloseNow() {
+void DesktopRootWindowHostWin::CloseNow() {
message_handler_->CloseNow();
}
-aura::WindowTreeHost* DesktopWindowTreeHostWin::AsWindowTreeHost() {
+aura::RootWindowHost* DesktopRootWindowHostWin::AsRootWindowHost() {
return this;
}
-void DesktopWindowTreeHostWin::ShowWindowWithState(
+void DesktopRootWindowHostWin::ShowWindowWithState(
ui::WindowShowState show_state) {
message_handler_->ShowWindowWithState(show_state);
}
-void DesktopWindowTreeHostWin::ShowMaximizedWithBounds(
+void DesktopRootWindowHostWin::ShowMaximizedWithBounds(
const gfx::Rect& restored_bounds) {
gfx::Rect pixel_bounds = gfx::win::DIPToScreenRect(restored_bounds);
message_handler_->ShowMaximizedWithBounds(pixel_bounds);
}
-bool DesktopWindowTreeHostWin::IsVisible() const {
+bool DesktopRootWindowHostWin::IsVisible() const {
return message_handler_->IsVisible();
}
-void DesktopWindowTreeHostWin::SetSize(const gfx::Size& size) {
+void DesktopRootWindowHostWin::SetSize(const gfx::Size& size) {
gfx::Size size_in_pixels = gfx::win::DIPToScreenSize(size);
gfx::Size expanded = GetExpandedWindowSize(
message_handler_->window_ex_style(), size_in_pixels);
@@ -227,12 +227,12 @@ void DesktopWindowTreeHostWin::SetSize(const gfx::Size& size) {
message_handler_->SetSize(expanded);
}
-void DesktopWindowTreeHostWin::CenterWindow(const gfx::Size& size) {
+void DesktopRootWindowHostWin::CenterWindow(const gfx::Size& size) {
gfx::Size size_in_pixels = gfx::win::DIPToScreenSize(size);
message_handler_->CenterWindow(size_in_pixels);
}
-void DesktopWindowTreeHostWin::GetWindowPlacement(
+void DesktopRootWindowHostWin::GetWindowPlacement(
gfx::Rect* bounds,
ui::WindowShowState* show_state) const {
message_handler_->GetWindowPlacement(bounds, show_state);
@@ -240,25 +240,25 @@ void DesktopWindowTreeHostWin::GetWindowPlacement(
*bounds = gfx::win::ScreenToDIPRect(*bounds);
}
-gfx::Rect DesktopWindowTreeHostWin::GetWindowBoundsInScreen() const {
+gfx::Rect DesktopRootWindowHostWin::GetWindowBoundsInScreen() const {
gfx::Rect pixel_bounds = message_handler_->GetWindowBoundsInScreen();
InsetBottomRight(&pixel_bounds, window_enlargement_);
return gfx::win::ScreenToDIPRect(pixel_bounds);
}
-gfx::Rect DesktopWindowTreeHostWin::GetClientAreaBoundsInScreen() const {
+gfx::Rect DesktopRootWindowHostWin::GetClientAreaBoundsInScreen() const {
gfx::Rect pixel_bounds = message_handler_->GetClientAreaBoundsInScreen();
InsetBottomRight(&pixel_bounds, window_enlargement_);
return gfx::win::ScreenToDIPRect(pixel_bounds);
}
-gfx::Rect DesktopWindowTreeHostWin::GetRestoredBounds() const {
+gfx::Rect DesktopRootWindowHostWin::GetRestoredBounds() const {
gfx::Rect pixel_bounds = message_handler_->GetRestoredBounds();
InsetBottomRight(&pixel_bounds, window_enlargement_);
return gfx::win::ScreenToDIPRect(pixel_bounds);
}
-gfx::Rect DesktopWindowTreeHostWin::GetWorkAreaBoundsInScreen() const {
+gfx::Rect DesktopRootWindowHostWin::GetWorkAreaBoundsInScreen() const {
MONITORINFO monitor_info;
monitor_info.cbSize = sizeof(monitor_info);
GetMonitorInfo(MonitorFromWindow(message_handler_->hwnd(),
@@ -268,7 +268,7 @@ gfx::Rect DesktopWindowTreeHostWin::GetWorkAreaBoundsInScreen() const {
return gfx::win::ScreenToDIPRect(pixel_bounds);
}
-void DesktopWindowTreeHostWin::SetShape(gfx::NativeRegion native_region) {
+void DesktopRootWindowHostWin::SetShape(gfx::NativeRegion native_region) {
if (native_region) {
message_handler_->SetRegion(gfx::CreateHRGNFromSkRegion(*native_region));
} else {
@@ -278,59 +278,59 @@ void DesktopWindowTreeHostWin::SetShape(gfx::NativeRegion native_region) {
delete native_region;
}
-void DesktopWindowTreeHostWin::Activate() {
+void DesktopRootWindowHostWin::Activate() {
message_handler_->Activate();
}
-void DesktopWindowTreeHostWin::Deactivate() {
+void DesktopRootWindowHostWin::Deactivate() {
message_handler_->Deactivate();
}
-bool DesktopWindowTreeHostWin::IsActive() const {
+bool DesktopRootWindowHostWin::IsActive() const {
return message_handler_->IsActive();
}
-void DesktopWindowTreeHostWin::Maximize() {
+void DesktopRootWindowHostWin::Maximize() {
message_handler_->Maximize();
}
-void DesktopWindowTreeHostWin::Minimize() {
+void DesktopRootWindowHostWin::Minimize() {
message_handler_->Minimize();
}
-void DesktopWindowTreeHostWin::Restore() {
+void DesktopRootWindowHostWin::Restore() {
message_handler_->Restore();
}
-bool DesktopWindowTreeHostWin::IsMaximized() const {
+bool DesktopRootWindowHostWin::IsMaximized() const {
return message_handler_->IsMaximized();
}
-bool DesktopWindowTreeHostWin::IsMinimized() const {
+bool DesktopRootWindowHostWin::IsMinimized() const {
return message_handler_->IsMinimized();
}
-bool DesktopWindowTreeHostWin::HasCapture() const {
+bool DesktopRootWindowHostWin::HasCapture() const {
return message_handler_->HasCapture();
}
-void DesktopWindowTreeHostWin::SetAlwaysOnTop(bool always_on_top) {
+void DesktopRootWindowHostWin::SetAlwaysOnTop(bool always_on_top) {
message_handler_->SetAlwaysOnTop(always_on_top);
}
-bool DesktopWindowTreeHostWin::IsAlwaysOnTop() const {
+bool DesktopRootWindowHostWin::IsAlwaysOnTop() const {
return message_handler_->IsAlwaysOnTop();
}
-void DesktopWindowTreeHostWin::SetWindowTitle(const string16& title) {
+void DesktopRootWindowHostWin::SetWindowTitle(const string16& title) {
message_handler_->SetTitle(title);
}
-void DesktopWindowTreeHostWin::ClearNativeFocus() {
+void DesktopRootWindowHostWin::ClearNativeFocus() {
message_handler_->ClearNativeFocus();
}
-Widget::MoveLoopResult DesktopWindowTreeHostWin::RunMoveLoop(
+Widget::MoveLoopResult DesktopRootWindowHostWin::RunMoveLoop(
const gfx::Vector2d& drag_offset,
Widget::MoveLoopSource source,
Widget::MoveLoopEscapeBehavior escape_behavior) {
@@ -340,99 +340,99 @@ Widget::MoveLoopResult DesktopWindowTreeHostWin::RunMoveLoop(
Widget::MOVE_LOOP_SUCCESSFUL : Widget::MOVE_LOOP_CANCELED;
}
-void DesktopWindowTreeHostWin::EndMoveLoop() {
+void DesktopRootWindowHostWin::EndMoveLoop() {
message_handler_->EndMoveLoop();
}
-void DesktopWindowTreeHostWin::SetVisibilityChangedAnimationsEnabled(
+void DesktopRootWindowHostWin::SetVisibilityChangedAnimationsEnabled(
bool value) {
message_handler_->SetVisibilityChangedAnimationsEnabled(value);
content_window_->SetProperty(aura::client::kAnimationsDisabledKey, !value);
}
-bool DesktopWindowTreeHostWin::ShouldUseNativeFrame() {
+bool DesktopRootWindowHostWin::ShouldUseNativeFrame() {
return ui::win::IsAeroGlassEnabled();
}
-void DesktopWindowTreeHostWin::FrameTypeChanged() {
+void DesktopRootWindowHostWin::FrameTypeChanged() {
message_handler_->FrameTypeChanged();
SetWindowTransparency();
}
-NonClientFrameView* DesktopWindowTreeHostWin::CreateNonClientFrameView() {
+NonClientFrameView* DesktopRootWindowHostWin::CreateNonClientFrameView() {
return GetWidget()->ShouldUseNativeFrame() ?
new NativeFrameView(GetWidget()) : NULL;
}
-void DesktopWindowTreeHostWin::SetFullscreen(bool fullscreen) {
+void DesktopRootWindowHostWin::SetFullscreen(bool fullscreen) {
message_handler_->fullscreen_handler()->SetFullscreen(fullscreen);
SetWindowTransparency();
}
-bool DesktopWindowTreeHostWin::IsFullscreen() const {
+bool DesktopRootWindowHostWin::IsFullscreen() const {
return message_handler_->fullscreen_handler()->fullscreen();
}
-void DesktopWindowTreeHostWin::SetOpacity(unsigned char opacity) {
+void DesktopRootWindowHostWin::SetOpacity(unsigned char opacity) {
message_handler_->SetOpacity(static_cast<BYTE>(opacity));
content_window_->layer()->SetOpacity(opacity / 255.0);
}
-void DesktopWindowTreeHostWin::SetWindowIcons(
+void DesktopRootWindowHostWin::SetWindowIcons(
const gfx::ImageSkia& window_icon, const gfx::ImageSkia& app_icon) {
message_handler_->SetWindowIcons(window_icon, app_icon);
}
-void DesktopWindowTreeHostWin::InitModalType(ui::ModalType modal_type) {
+void DesktopRootWindowHostWin::InitModalType(ui::ModalType modal_type) {
message_handler_->InitModalType(modal_type);
}
-void DesktopWindowTreeHostWin::FlashFrame(bool flash_frame) {
+void DesktopRootWindowHostWin::FlashFrame(bool flash_frame) {
message_handler_->FlashFrame(flash_frame);
}
-void DesktopWindowTreeHostWin::OnRootViewLayout() const {
+void DesktopRootWindowHostWin::OnRootViewLayout() const {
}
-void DesktopWindowTreeHostWin::OnNativeWidgetFocus() {
+void DesktopRootWindowHostWin::OnNativeWidgetFocus() {
// HWNDMessageHandler will perform the proper updating on its own.
}
-void DesktopWindowTreeHostWin::OnNativeWidgetBlur() {
+void DesktopRootWindowHostWin::OnNativeWidgetBlur() {
}
-bool DesktopWindowTreeHostWin::IsAnimatingClosed() const {
+bool DesktopRootWindowHostWin::IsAnimatingClosed() const {
return pending_close_;
}
////////////////////////////////////////////////////////////////////////////////
-// DesktopWindowTreeHostWin, WindowTreeHost implementation:
+// DesktopRootWindowHostWin, RootWindowHost implementation:
-aura::RootWindow* DesktopWindowTreeHostWin::GetRootWindow() {
+aura::RootWindow* DesktopRootWindowHostWin::GetRootWindow() {
return root_window_;
}
-gfx::AcceleratedWidget DesktopWindowTreeHostWin::GetAcceleratedWidget() {
+gfx::AcceleratedWidget DesktopRootWindowHostWin::GetAcceleratedWidget() {
return message_handler_->hwnd();
}
-void DesktopWindowTreeHostWin::Show() {
+void DesktopRootWindowHostWin::Show() {
message_handler_->Show();
}
-void DesktopWindowTreeHostWin::Hide() {
+void DesktopRootWindowHostWin::Hide() {
if (!pending_close_)
message_handler_->Hide();
}
-void DesktopWindowTreeHostWin::ToggleFullScreen() {
+void DesktopRootWindowHostWin::ToggleFullScreen() {
SetWindowTransparency();
}
// GetBounds and SetBounds work in pixel coordinates, whereas other get/set
// methods work in DIP.
-gfx::Rect DesktopWindowTreeHostWin::GetBounds() const {
+gfx::Rect DesktopRootWindowHostWin::GetBounds() const {
// Match the logic in HWNDMessageHandler::ClientAreaSizeChanged().
gfx::Rect bounds(WidgetSizeIsClientSize() ?
message_handler_->GetClientAreaBoundsInScreen() :
@@ -452,7 +452,7 @@ gfx::Rect DesktopWindowTreeHostWin::GetBounds() const {
return without_expansion;
}
-void DesktopWindowTreeHostWin::SetBounds(const gfx::Rect& bounds) {
+void DesktopRootWindowHostWin::SetBounds(const gfx::Rect& bounds) {
// If the window bounds have to be expanded we need to subtract the
// window_expansion_top_left_delta_ from the origin and add the
// window_expansion_bottom_right_delta_ to the width and height
@@ -472,33 +472,33 @@ void DesktopWindowTreeHostWin::SetBounds(const gfx::Rect& bounds) {
message_handler_->SetBounds(new_expanded);
}
-gfx::Insets DesktopWindowTreeHostWin::GetInsets() const {
+gfx::Insets DesktopRootWindowHostWin::GetInsets() const {
return gfx::Insets();
}
-void DesktopWindowTreeHostWin::SetInsets(const gfx::Insets& insets) {
+void DesktopRootWindowHostWin::SetInsets(const gfx::Insets& insets) {
}
-gfx::Point DesktopWindowTreeHostWin::GetLocationOnNativeScreen() const {
+gfx::Point DesktopRootWindowHostWin::GetLocationOnNativeScreen() const {
return GetBounds().origin();
}
-void DesktopWindowTreeHostWin::SetCapture() {
+void DesktopRootWindowHostWin::SetCapture() {
message_handler_->SetCapture();
}
-void DesktopWindowTreeHostWin::ReleaseCapture() {
+void DesktopRootWindowHostWin::ReleaseCapture() {
message_handler_->ReleaseCapture();
}
-void DesktopWindowTreeHostWin::SetCursor(gfx::NativeCursor cursor) {
+void DesktopRootWindowHostWin::SetCursor(gfx::NativeCursor cursor) {
ui::CursorLoaderWin cursor_loader;
cursor_loader.SetPlatformCursor(&cursor);
message_handler_->SetCursor(cursor.platform());
}
-bool DesktopWindowTreeHostWin::QueryMouseLocation(gfx::Point* location_return) {
+bool DesktopRootWindowHostWin::QueryMouseLocation(gfx::Point* location_return) {
aura::client::CursorClient* cursor_client =
aura::client::GetCursorClient(root_window_->window());
if (cursor_client && !cursor_client->IsMouseEventsEnabled()) {
@@ -512,44 +512,44 @@ bool DesktopWindowTreeHostWin::QueryMouseLocation(gfx::Point* location_return) {
return true;
}
-bool DesktopWindowTreeHostWin::ConfineCursorToRootWindow() {
+bool DesktopRootWindowHostWin::ConfineCursorToRootWindow() {
RECT window_rect = root_window_->window()->GetBoundsInScreen().ToRECT();
::ClipCursor(&window_rect);
return true;
}
-void DesktopWindowTreeHostWin::UnConfineCursor() {
+void DesktopRootWindowHostWin::UnConfineCursor() {
::ClipCursor(NULL);
}
-void DesktopWindowTreeHostWin::OnCursorVisibilityChanged(bool show) {
+void DesktopRootWindowHostWin::OnCursorVisibilityChanged(bool show) {
if (is_cursor_visible_ == show)
return;
is_cursor_visible_ = show;
::ShowCursor(!!show);
}
-void DesktopWindowTreeHostWin::MoveCursorTo(const gfx::Point& location) {
+void DesktopRootWindowHostWin::MoveCursorTo(const gfx::Point& location) {
POINT cursor_location = location.ToPOINT();
::ClientToScreen(GetHWND(), &cursor_location);
::SetCursorPos(cursor_location.x, cursor_location.y);
}
-void DesktopWindowTreeHostWin::PostNativeEvent(
+void DesktopRootWindowHostWin::PostNativeEvent(
const base::NativeEvent& native_event) {
}
-void DesktopWindowTreeHostWin::OnDeviceScaleFactorChanged(
+void DesktopRootWindowHostWin::OnDeviceScaleFactorChanged(
float device_scale_factor) {
}
-void DesktopWindowTreeHostWin::PrepareForShutdown() {
+void DesktopRootWindowHostWin::PrepareForShutdown() {
}
////////////////////////////////////////////////////////////////////////////////
-// DesktopWindowTreeHostWin, aura::AnimationHost implementation:
+// DesktopRootWindowHostWin, aura::AnimationHost implementation:
-void DesktopWindowTreeHostWin::SetHostTransitionOffsets(
+void DesktopRootWindowHostWin::SetHostTransitionOffsets(
const gfx::Vector2d& top_left_delta,
const gfx::Vector2d& bottom_right_delta) {
gfx::Rect bounds_without_expansion = GetBounds();
@@ -558,88 +558,88 @@ void DesktopWindowTreeHostWin::SetHostTransitionOffsets(
SetBounds(bounds_without_expansion);
}
-void DesktopWindowTreeHostWin::OnWindowHidingAnimationCompleted() {
+void DesktopRootWindowHostWin::OnWindowHidingAnimationCompleted() {
if (pending_close_)
message_handler_->Close();
}
////////////////////////////////////////////////////////////////////////////////
-// DesktopWindowTreeHostWin, HWNDMessageHandlerDelegate implementation:
+// DesktopRootWindowHostWin, HWNDMessageHandlerDelegate implementation:
-bool DesktopWindowTreeHostWin::IsWidgetWindow() const {
+bool DesktopRootWindowHostWin::IsWidgetWindow() const {
return has_non_client_view_;
}
-bool DesktopWindowTreeHostWin::IsUsingCustomFrame() const {
+bool DesktopRootWindowHostWin::IsUsingCustomFrame() const {
return !GetWidget()->ShouldUseNativeFrame();
}
-void DesktopWindowTreeHostWin::SchedulePaint() {
+void DesktopRootWindowHostWin::SchedulePaint() {
GetWidget()->GetRootView()->SchedulePaint();
}
-void DesktopWindowTreeHostWin::EnableInactiveRendering() {
+void DesktopRootWindowHostWin::EnableInactiveRendering() {
native_widget_delegate_->EnableInactiveRendering();
}
-bool DesktopWindowTreeHostWin::IsInactiveRenderingDisabled() {
+bool DesktopRootWindowHostWin::IsInactiveRenderingDisabled() {
return native_widget_delegate_->IsInactiveRenderingDisabled();
}
-bool DesktopWindowTreeHostWin::CanResize() const {
+bool DesktopRootWindowHostWin::CanResize() const {
return GetWidget()->widget_delegate()->CanResize();
}
-bool DesktopWindowTreeHostWin::CanMaximize() const {
+bool DesktopRootWindowHostWin::CanMaximize() const {
return GetWidget()->widget_delegate()->CanMaximize();
}
-bool DesktopWindowTreeHostWin::CanActivate() const {
+bool DesktopRootWindowHostWin::CanActivate() const {
if (IsModalWindowActive())
return true;
return native_widget_delegate_->CanActivate();
}
-bool DesktopWindowTreeHostWin::WidgetSizeIsClientSize() const {
+bool DesktopRootWindowHostWin::WidgetSizeIsClientSize() const {
const Widget* widget = GetWidget()->GetTopLevelWidget();
return IsMaximized() || (widget && widget->ShouldUseNativeFrame());
}
-bool DesktopWindowTreeHostWin::CanSaveFocus() const {
+bool DesktopRootWindowHostWin::CanSaveFocus() const {
return GetWidget()->is_top_level();
}
-void DesktopWindowTreeHostWin::SaveFocusOnDeactivate() {
+void DesktopRootWindowHostWin::SaveFocusOnDeactivate() {
GetWidget()->GetFocusManager()->StoreFocusedView(true);
}
-void DesktopWindowTreeHostWin::RestoreFocusOnActivate() {
+void DesktopRootWindowHostWin::RestoreFocusOnActivate() {
RestoreFocusOnEnable();
}
-void DesktopWindowTreeHostWin::RestoreFocusOnEnable() {
+void DesktopRootWindowHostWin::RestoreFocusOnEnable() {
GetWidget()->GetFocusManager()->RestoreFocusedView();
}
-bool DesktopWindowTreeHostWin::IsModal() const {
+bool DesktopRootWindowHostWin::IsModal() const {
return native_widget_delegate_->IsModal();
}
-int DesktopWindowTreeHostWin::GetInitialShowState() const {
+int DesktopRootWindowHostWin::GetInitialShowState() const {
return SW_SHOWNORMAL;
}
-bool DesktopWindowTreeHostWin::WillProcessWorkAreaChange() const {
+bool DesktopRootWindowHostWin::WillProcessWorkAreaChange() const {
return GetWidget()->widget_delegate()->WillProcessWorkAreaChange();
}
-int DesktopWindowTreeHostWin::GetNonClientComponent(
+int DesktopRootWindowHostWin::GetNonClientComponent(
const gfx::Point& point) const {
gfx::Point dip_position = gfx::win::ScreenToDIPPoint(point);
return native_widget_delegate_->GetNonClientComponent(dip_position);
}
-void DesktopWindowTreeHostWin::GetWindowMask(const gfx::Size& size,
+void DesktopRootWindowHostWin::GetWindowMask(const gfx::Size& size,
gfx::Path* path) {
if (GetWidget()->non_client_view()) {
GetWidget()->non_client_view()->GetWindowMask(size, path);
@@ -652,45 +652,45 @@ void DesktopWindowTreeHostWin::GetWindowMask(const gfx::Size& size,
}
}
-bool DesktopWindowTreeHostWin::GetClientAreaInsets(gfx::Insets* insets) const {
+bool DesktopRootWindowHostWin::GetClientAreaInsets(gfx::Insets* insets) const {
return false;
}
-void DesktopWindowTreeHostWin::GetMinMaxSize(gfx::Size* min_size,
+void DesktopRootWindowHostWin::GetMinMaxSize(gfx::Size* min_size,
gfx::Size* max_size) const {
*min_size = native_widget_delegate_->GetMinimumSize();
*max_size = native_widget_delegate_->GetMaximumSize();
}
-gfx::Size DesktopWindowTreeHostWin::GetRootViewSize() const {
+gfx::Size DesktopRootWindowHostWin::GetRootViewSize() const {
return GetWidget()->GetRootView()->size();
}
-void DesktopWindowTreeHostWin::ResetWindowControls() {
+void DesktopRootWindowHostWin::ResetWindowControls() {
GetWidget()->non_client_view()->ResetWindowControls();
}
-void DesktopWindowTreeHostWin::PaintLayeredWindow(gfx::Canvas* canvas) {
+void DesktopRootWindowHostWin::PaintLayeredWindow(gfx::Canvas* canvas) {
GetWidget()->GetRootView()->Paint(canvas);
}
-gfx::NativeViewAccessible DesktopWindowTreeHostWin::GetNativeViewAccessible() {
+gfx::NativeViewAccessible DesktopRootWindowHostWin::GetNativeViewAccessible() {
return GetWidget()->GetRootView()->GetNativeViewAccessible();
}
-InputMethod* DesktopWindowTreeHostWin::GetInputMethod() {
+InputMethod* DesktopRootWindowHostWin::GetInputMethod() {
return GetWidget()->GetInputMethodDirect();
}
-bool DesktopWindowTreeHostWin::ShouldHandleSystemCommands() const {
+bool DesktopRootWindowHostWin::ShouldHandleSystemCommands() const {
return GetWidget()->widget_delegate()->ShouldHandleSystemCommands();
}
-void DesktopWindowTreeHostWin::HandleAppDeactivated() {
+void DesktopRootWindowHostWin::HandleAppDeactivated() {
native_widget_delegate_->EnableInactiveRendering();
}
-void DesktopWindowTreeHostWin::HandleActivationChanged(bool active) {
+void DesktopRootWindowHostWin::HandleActivationChanged(bool active) {
// This can be invoked from HWNDMessageHandler::Init(), at which point we're
// not in a good state and need to ignore it.
if (!delegate_)
@@ -701,36 +701,36 @@ void DesktopWindowTreeHostWin::HandleActivationChanged(bool active) {
desktop_native_widget_aura_->HandleActivationChanged(active);
}
-bool DesktopWindowTreeHostWin::HandleAppCommand(short command) {
+bool DesktopRootWindowHostWin::HandleAppCommand(short command) {
// We treat APPCOMMAND ids as an extension of our command namespace, and just
// let the delegate figure out what to do...
return GetWidget()->widget_delegate() &&
GetWidget()->widget_delegate()->ExecuteWindowsCommand(command);
}
-void DesktopWindowTreeHostWin::HandleCancelMode() {
+void DesktopRootWindowHostWin::HandleCancelMode() {
delegate_->OnHostCancelMode();
}
-void DesktopWindowTreeHostWin::HandleCaptureLost() {
+void DesktopRootWindowHostWin::HandleCaptureLost() {
delegate_->OnHostLostWindowCapture();
native_widget_delegate_->OnMouseCaptureLost();
}
-void DesktopWindowTreeHostWin::HandleClose() {
+void DesktopRootWindowHostWin::HandleClose() {
GetWidget()->Close();
}
-bool DesktopWindowTreeHostWin::HandleCommand(int command) {
+bool DesktopRootWindowHostWin::HandleCommand(int command) {
return GetWidget()->widget_delegate()->ExecuteWindowsCommand(command);
}
-void DesktopWindowTreeHostWin::HandleAccelerator(
+void DesktopRootWindowHostWin::HandleAccelerator(
const ui::Accelerator& accelerator) {
GetWidget()->GetFocusManager()->ProcessAccelerator(accelerator);
}
-void DesktopWindowTreeHostWin::HandleCreate() {
+void DesktopRootWindowHostWin::HandleCreate() {
// TODO(beng): moar
NOTIMPLEMENTED();
@@ -740,92 +740,92 @@ void DesktopWindowTreeHostWin::HandleCreate() {
// 2. MouseWheel.
}
-void DesktopWindowTreeHostWin::HandleDestroying() {
+void DesktopRootWindowHostWin::HandleDestroying() {
drag_drop_client_->OnNativeWidgetDestroying(GetHWND());
native_widget_delegate_->OnNativeWidgetDestroying();
}
-void DesktopWindowTreeHostWin::HandleDestroyed() {
+void DesktopRootWindowHostWin::HandleDestroyed() {
desktop_native_widget_aura_->OnHostClosed();
}
-bool DesktopWindowTreeHostWin::HandleInitialFocus() {
+bool DesktopRootWindowHostWin::HandleInitialFocus() {
return GetWidget()->SetInitialFocus();
}
-void DesktopWindowTreeHostWin::HandleDisplayChange() {
+void DesktopRootWindowHostWin::HandleDisplayChange() {
GetWidget()->widget_delegate()->OnDisplayChanged();
}
-void DesktopWindowTreeHostWin::HandleBeginWMSizeMove() {
+void DesktopRootWindowHostWin::HandleBeginWMSizeMove() {
native_widget_delegate_->OnNativeWidgetBeginUserBoundsChange();
}
-void DesktopWindowTreeHostWin::HandleEndWMSizeMove() {
+void DesktopRootWindowHostWin::HandleEndWMSizeMove() {
native_widget_delegate_->OnNativeWidgetEndUserBoundsChange();
}
-void DesktopWindowTreeHostWin::HandleMove() {
+void DesktopRootWindowHostWin::HandleMove() {
native_widget_delegate_->OnNativeWidgetMove();
if (delegate_)
delegate_->OnHostMoved(GetBounds().origin());
}
-void DesktopWindowTreeHostWin::HandleWorkAreaChanged() {
+void DesktopRootWindowHostWin::HandleWorkAreaChanged() {
GetWidget()->widget_delegate()->OnWorkAreaChanged();
}
-void DesktopWindowTreeHostWin::HandleVisibilityChanging(bool visible) {
+void DesktopRootWindowHostWin::HandleVisibilityChanging(bool visible) {
native_widget_delegate_->OnNativeWidgetVisibilityChanging(visible);
}
-void DesktopWindowTreeHostWin::HandleVisibilityChanged(bool visible) {
+void DesktopRootWindowHostWin::HandleVisibilityChanged(bool visible) {
native_widget_delegate_->OnNativeWidgetVisibilityChanged(visible);
}
-void DesktopWindowTreeHostWin::HandleClientSizeChanged(
+void DesktopRootWindowHostWin::HandleClientSizeChanged(
const gfx::Size& new_size) {
if (delegate_)
NotifyHostResized(new_size);
}
-void DesktopWindowTreeHostWin::HandleFrameChanged() {
+void DesktopRootWindowHostWin::HandleFrameChanged() {
SetWindowTransparency();
// Replace the frame and layout the contents.
GetWidget()->non_client_view()->UpdateFrame(true);
}
-void DesktopWindowTreeHostWin::HandleNativeFocus(HWND last_focused_window) {
+void DesktopRootWindowHostWin::HandleNativeFocus(HWND last_focused_window) {
// TODO(beng): inform the native_widget_delegate_.
InputMethod* input_method = GetInputMethod();
if (input_method)
input_method->OnFocus();
}
-void DesktopWindowTreeHostWin::HandleNativeBlur(HWND focused_window) {
+void DesktopRootWindowHostWin::HandleNativeBlur(HWND focused_window) {
// TODO(beng): inform the native_widget_delegate_.
InputMethod* input_method = GetInputMethod();
if (input_method)
input_method->OnBlur();
}
-bool DesktopWindowTreeHostWin::HandleMouseEvent(const ui::MouseEvent& event) {
+bool DesktopRootWindowHostWin::HandleMouseEvent(const ui::MouseEvent& event) {
if (base::win::IsTSFAwareRequired() && event.IsAnyButton())
ui::TSFBridge::GetInstance()->CancelComposition();
return delegate_->OnHostMouseEvent(const_cast<ui::MouseEvent*>(&event));
}
-bool DesktopWindowTreeHostWin::HandleKeyEvent(const ui::KeyEvent& event) {
+bool DesktopRootWindowHostWin::HandleKeyEvent(const ui::KeyEvent& event) {
return false;
}
-bool DesktopWindowTreeHostWin::HandleUntranslatedKeyEvent(
+bool DesktopRootWindowHostWin::HandleUntranslatedKeyEvent(
const ui::KeyEvent& event) {
scoped_ptr<ui::KeyEvent> duplicate_event(event.Copy());
return delegate_->OnHostKeyEvent(duplicate_event.get());
}
-void DesktopWindowTreeHostWin::HandleTouchEvent(
+void DesktopRootWindowHostWin::HandleTouchEvent(
const ui::TouchEvent& event) {
// HWNDMessageHandler asynchronously processes touch events. Because of this
// it's possible for the aura::RootWindow to have been destroyed by the time
@@ -837,8 +837,8 @@ void DesktopWindowTreeHostWin::HandleTouchEvent(
aura::RootWindow* root =
aura::RootWindow::GetForAcceleratedWidget(GetCapture());
if (root) {
- DesktopWindowTreeHostWin* target =
- root->window()->GetProperty(kDesktopWindowTreeHostKey);
+ DesktopRootWindowHostWin* target =
+ root->window()->GetProperty(kDesktopRootWindowHostKey);
if (target && target->HasCapture() && target != this) {
POINT target_location(event.location().ToPOINT());
ClientToScreen(GetHWND(), &target_location);
@@ -855,7 +855,7 @@ void DesktopWindowTreeHostWin::HandleTouchEvent(
const_cast<ui::TouchEvent*>(&event));
}
-bool DesktopWindowTreeHostWin::HandleIMEMessage(UINT message,
+bool DesktopRootWindowHostWin::HandleIMEMessage(UINT message,
WPARAM w_param,
LPARAM l_param,
LRESULT* result) {
@@ -868,63 +868,63 @@ bool DesktopWindowTreeHostWin::HandleIMEMessage(UINT message,
input_method()->OnUntranslatedIMEMessage(msg, result);
}
-void DesktopWindowTreeHostWin::HandleInputLanguageChange(
+void DesktopRootWindowHostWin::HandleInputLanguageChange(
DWORD character_set,
HKL input_language_id) {
desktop_native_widget_aura_->input_method_event_filter()->
input_method()->OnInputLocaleChanged();
}
-bool DesktopWindowTreeHostWin::HandlePaintAccelerated(
+bool DesktopRootWindowHostWin::HandlePaintAccelerated(
const gfx::Rect& invalid_rect) {
return native_widget_delegate_->OnNativeWidgetPaintAccelerated(invalid_rect);
}
-void DesktopWindowTreeHostWin::HandlePaint(gfx::Canvas* canvas) {
+void DesktopRootWindowHostWin::HandlePaint(gfx::Canvas* canvas) {
compositor()->ScheduleRedrawRect(gfx::Rect());
}
-bool DesktopWindowTreeHostWin::HandleTooltipNotify(int w_param,
+bool DesktopRootWindowHostWin::HandleTooltipNotify(int w_param,
NMHDR* l_param,
LRESULT* l_result) {
return tooltip_ && tooltip_->HandleNotify(w_param, l_param, l_result);
}
-void DesktopWindowTreeHostWin::HandleTooltipMouseMove(UINT message,
+void DesktopRootWindowHostWin::HandleTooltipMouseMove(UINT message,
WPARAM w_param,
LPARAM l_param) {
// TooltipWin implementation doesn't need this.
// TODO(sky): remove from HWNDMessageHandler once non-aura path nuked.
}
-bool DesktopWindowTreeHostWin::PreHandleMSG(UINT message,
+bool DesktopRootWindowHostWin::PreHandleMSG(UINT message,
WPARAM w_param,
LPARAM l_param,
LRESULT* result) {
return false;
}
-void DesktopWindowTreeHostWin::PostHandleMSG(UINT message,
+void DesktopRootWindowHostWin::PostHandleMSG(UINT message,
WPARAM w_param,
LPARAM l_param) {
}
////////////////////////////////////////////////////////////////////////////////
-// DesktopWindowTreeHostWin, private:
+// DesktopRootWindowHostWin, private:
-Widget* DesktopWindowTreeHostWin::GetWidget() {
+Widget* DesktopRootWindowHostWin::GetWidget() {
return native_widget_delegate_->AsWidget();
}
-const Widget* DesktopWindowTreeHostWin::GetWidget() const {
+const Widget* DesktopRootWindowHostWin::GetWidget() const {
return native_widget_delegate_->AsWidget();
}
-HWND DesktopWindowTreeHostWin::GetHWND() const {
+HWND DesktopRootWindowHostWin::GetHWND() const {
return message_handler_->hwnd();
}
-void DesktopWindowTreeHostWin::SetWindowTransparency() {
+void DesktopRootWindowHostWin::SetWindowTransparency() {
bool transparent = ShouldUseNativeFrame() && !IsFullscreen();
root_window_->host()->compositor()->SetHostHasTransparentBackground(
transparent);
@@ -932,7 +932,7 @@ void DesktopWindowTreeHostWin::SetWindowTransparency() {
content_window_->SetTransparent(transparent);
}
-bool DesktopWindowTreeHostWin::IsModalWindowActive() const {
+bool DesktopRootWindowHostWin::IsModalWindowActive() const {
// This function can get called during window creation which occurs before
// root_window_ has been created.
if (!root_window_)
@@ -950,13 +950,13 @@ bool DesktopWindowTreeHostWin::IsModalWindowActive() const {
}
////////////////////////////////////////////////////////////////////////////////
-// DesktopWindowTreeHost, public:
+// DesktopRootWindowHost, public:
// static
-DesktopWindowTreeHost* DesktopWindowTreeHost::Create(
+DesktopRootWindowHost* DesktopRootWindowHost::Create(
internal::NativeWidgetDelegate* native_widget_delegate,
DesktopNativeWidgetAura* desktop_native_widget_aura) {
- return new DesktopWindowTreeHostWin(native_widget_delegate,
+ return new DesktopRootWindowHostWin(native_widget_delegate,
desktop_native_widget_aura);
}
diff --git a/ui/views/widget/desktop_aura/desktop_root_window_host_win.h b/ui/views/widget/desktop_aura/desktop_root_window_host_win.h
index c5c9489..6ac7f6f9 100644
--- a/ui/views/widget/desktop_aura/desktop_root_window_host_win.h
+++ b/ui/views/widget/desktop_aura/desktop_root_window_host_win.h
@@ -27,22 +27,22 @@ namespace corewm {
class TooltipWin;
}
-class VIEWS_EXPORT DesktopWindowTreeHostWin
- : public DesktopWindowTreeHost,
+class VIEWS_EXPORT DesktopRootWindowHostWin
+ : public DesktopRootWindowHost,
public aura::client::AnimationHost,
- public aura::WindowTreeHost,
+ public aura::RootWindowHost,
public HWNDMessageHandlerDelegate {
public:
- DesktopWindowTreeHostWin(
+ DesktopRootWindowHostWin(
internal::NativeWidgetDelegate* native_widget_delegate,
DesktopNativeWidgetAura* desktop_native_widget_aura);
- virtual ~DesktopWindowTreeHostWin();
+ virtual ~DesktopRootWindowHostWin();
// A way of converting an HWND into a content window.
static aura::Window* GetContentWindowForHWND(HWND hwnd);
protected:
- // Overridden from DesktopWindowTreeHost:
+ // Overridden from DesktopRootWindowHost:
virtual void Init(aura::Window* content_window,
const Widget::InitParams& params,
aura::RootWindow::CreateParams* rw_create_params) OVERRIDE;
@@ -53,7 +53,7 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin
CreateDragDropClient(DesktopNativeCursorManager* cursor_manager) OVERRIDE;
virtual void Close() OVERRIDE;
virtual void CloseNow() OVERRIDE;
- virtual aura::WindowTreeHost* AsWindowTreeHost() OVERRIDE;
+ virtual aura::RootWindowHost* AsRootWindowHost() OVERRIDE;
virtual void ShowWindowWithState(ui::WindowShowState show_state) OVERRIDE;
virtual void ShowMaximizedWithBounds(
const gfx::Rect& restored_bounds) OVERRIDE;
@@ -102,7 +102,7 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin
virtual void OnNativeWidgetBlur() OVERRIDE;
virtual bool IsAnimatingClosed() const OVERRIDE;
- // Overridden from aura::WindowTreeHost:
+ // Overridden from aura::RootWindowHost:
virtual aura::RootWindow* GetRootWindow() OVERRIDE;
virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE;
virtual void Show() OVERRIDE;
@@ -268,7 +268,7 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin
// State of the cursor.
bool is_cursor_visible_;
- DISALLOW_COPY_AND_ASSIGN(DesktopWindowTreeHostWin);
+ DISALLOW_COPY_AND_ASSIGN(DesktopRootWindowHostWin);
};
} // namespace views
diff --git a/ui/views/widget/desktop_aura/desktop_root_window_host_win_unittest.cc b/ui/views/widget/desktop_aura/desktop_root_window_host_win_unittest.cc
index 838d403..a002f10 100644
--- a/ui/views/widget/desktop_aura/desktop_root_window_host_win_unittest.cc
+++ b/ui/views/widget/desktop_aura/desktop_root_window_host_win_unittest.cc
@@ -11,35 +11,35 @@
namespace views {
-typedef ViewsTestBase DesktopWindowTreeHostWinTest;
+typedef ViewsTestBase DesktopRootWindowHostWinTest;
namespace {
// See description above SaveFocusOnDeactivateFromHandleCreate.
-class TestDesktopWindowTreeHostWin : public DesktopWindowTreeHostWin {
+class TestDesktopRootWindowHostWin : public DesktopRootWindowHostWin {
public:
- TestDesktopWindowTreeHostWin(
+ TestDesktopRootWindowHostWin(
internal::NativeWidgetDelegate* native_widget_delegate,
DesktopNativeWidgetAura* desktop_native_widget_aura)
- : DesktopWindowTreeHostWin(native_widget_delegate,
+ : DesktopRootWindowHostWin(native_widget_delegate,
desktop_native_widget_aura) {}
- virtual ~TestDesktopWindowTreeHostWin() {}
+ virtual ~TestDesktopRootWindowHostWin() {}
- // DesktopWindowTreeHostWin overrides:
+ // DesktopRootWindowHostWin overrides:
virtual void HandleCreate() OVERRIDE {
- DesktopWindowTreeHostWin::HandleCreate();
+ DesktopRootWindowHostWin::HandleCreate();
SaveFocusOnDeactivate();
}
private:
- DISALLOW_COPY_AND_ASSIGN(TestDesktopWindowTreeHostWin);
+ DISALLOW_COPY_AND_ASSIGN(TestDesktopRootWindowHostWin);
};
} // namespace
// Verifies if SaveFocusOnDeactivate() is invoked from
-// DesktopWindowTreeHostWin::HandleCreate we don't crash.
-TEST_F(DesktopWindowTreeHostWinTest, SaveFocusOnDeactivateFromHandleCreate) {
+// DesktopRootWindowHostWin::HandleCreate we don't crash.
+TEST_F(DesktopRootWindowHostWinTest, SaveFocusOnDeactivateFromHandleCreate) {
Widget widget;
Widget::InitParams params = CreateParams(Widget::InitParams::TYPE_WINDOW);
params.bounds = gfx::Rect(0, 0, 200, 200);
@@ -47,7 +47,7 @@ TEST_F(DesktopWindowTreeHostWinTest, SaveFocusOnDeactivateFromHandleCreate) {
DesktopNativeWidgetAura* desktop_native_widget_aura =
new DesktopNativeWidgetAura(&widget);
params.native_widget = desktop_native_widget_aura;
- params.desktop_root_window_host = new TestDesktopWindowTreeHostWin(
+ params.desktop_root_window_host = new TestDesktopRootWindowHostWin(
&widget, desktop_native_widget_aura);
widget.Init(params);
}
diff --git a/ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc b/ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc
index 126008a..f958123 100644
--- a/ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc
+++ b/ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc
@@ -51,15 +51,15 @@
namespace views {
-DesktopWindowTreeHostX11* DesktopWindowTreeHostX11::g_current_capture =
+DesktopRootWindowHostX11* DesktopRootWindowHostX11::g_current_capture =
NULL;
-std::list<XID>* DesktopWindowTreeHostX11::open_windows_ = NULL;
+std::list<XID>* DesktopRootWindowHostX11::open_windows_ = NULL;
DEFINE_WINDOW_PROPERTY_KEY(
aura::Window*, kViewsWindowForRootWindow, NULL);
DEFINE_WINDOW_PROPERTY_KEY(
- DesktopWindowTreeHostX11*, kHostForRootWindow, NULL);
+ DesktopRootWindowHostX11*, kHostForRootWindow, NULL);
namespace {
@@ -115,9 +115,9 @@ const char* kAtomsToCache[] = {
} // namespace
////////////////////////////////////////////////////////////////////////////////
-// DesktopWindowTreeHostX11, public:
+// DesktopRootWindowHostX11, public:
-DesktopWindowTreeHostX11::DesktopWindowTreeHostX11(
+DesktopRootWindowHostX11::DesktopRootWindowHostX11(
internal::NativeWidgetDelegate* native_widget_delegate,
DesktopNativeWidgetAura* desktop_native_widget_aura)
: close_widget_factory_(this),
@@ -138,26 +138,26 @@ DesktopWindowTreeHostX11::DesktopWindowTreeHostX11(
window_parent_(NULL) {
}
-DesktopWindowTreeHostX11::~DesktopWindowTreeHostX11() {
+DesktopRootWindowHostX11::~DesktopRootWindowHostX11() {
root_window_->window()->ClearProperty(kHostForRootWindow);
aura::client::SetWindowMoveClient(root_window_->window(), NULL);
- desktop_native_widget_aura_->OnDesktopWindowTreeHostDestroyed(root_window_);
+ desktop_native_widget_aura_->OnDesktopRootWindowHostDestroyed(root_window_);
}
// static
-aura::Window* DesktopWindowTreeHostX11::GetContentWindowForXID(XID xid) {
+aura::Window* DesktopRootWindowHostX11::GetContentWindowForXID(XID xid) {
aura::RootWindow* root = aura::RootWindow::GetForAcceleratedWidget(xid);
return root ? root->window()->GetProperty(kViewsWindowForRootWindow) : NULL;
}
// static
-DesktopWindowTreeHostX11* DesktopWindowTreeHostX11::GetHostForXID(XID xid) {
+DesktopRootWindowHostX11* DesktopRootWindowHostX11::GetHostForXID(XID xid) {
aura::RootWindow* root = aura::RootWindow::GetForAcceleratedWidget(xid);
return root ? root->window()->GetProperty(kHostForRootWindow) : NULL;
}
// static
-std::vector<aura::Window*> DesktopWindowTreeHostX11::GetAllOpenWindows() {
+std::vector<aura::Window*> DesktopRootWindowHostX11::GetAllOpenWindows() {
std::vector<aura::Window*> windows(open_windows().size());
std::transform(open_windows().begin(),
open_windows().end(),
@@ -166,11 +166,11 @@ std::vector<aura::Window*> DesktopWindowTreeHostX11::GetAllOpenWindows() {
return windows;
}
-gfx::Rect DesktopWindowTreeHostX11::GetX11RootWindowBounds() const {
+gfx::Rect DesktopRootWindowHostX11::GetX11RootWindowBounds() const {
return bounds_;
}
-void DesktopWindowTreeHostX11::HandleNativeWidgetActivationChanged(
+void DesktopRootWindowHostX11::HandleNativeWidgetActivationChanged(
bool active) {
if (active) {
delegate_->OnHostActivated();
@@ -183,31 +183,31 @@ void DesktopWindowTreeHostX11::HandleNativeWidgetActivationChanged(
native_widget_delegate_->AsWidget()->GetRootView()->SchedulePaint();
}
-void DesktopWindowTreeHostX11::AddObserver(
- views::DesktopWindowTreeHostObserverX11* observer) {
+void DesktopRootWindowHostX11::AddObserver(
+ views::DesktopRootWindowHostObserverX11* observer) {
observer_list_.AddObserver(observer);
}
-void DesktopWindowTreeHostX11::RemoveObserver(
- views::DesktopWindowTreeHostObserverX11* observer) {
+void DesktopRootWindowHostX11::RemoveObserver(
+ views::DesktopRootWindowHostObserverX11* observer) {
observer_list_.RemoveObserver(observer);
}
-void DesktopWindowTreeHostX11::CleanUpWindowList() {
+void DesktopRootWindowHostX11::CleanUpWindowList() {
delete open_windows_;
open_windows_ = NULL;
}
////////////////////////////////////////////////////////////////////////////////
-// DesktopWindowTreeHostX11, DesktopWindowTreeHost implementation:
+// DesktopRootWindowHostX11, DesktopRootWindowHost implementation:
-void DesktopWindowTreeHostX11::Init(
+void DesktopRootWindowHostX11::Init(
aura::Window* content_window,
const Widget::InitParams& params,
aura::RootWindow::CreateParams* rw_create_params) {
content_window_ = content_window;
- // TODO(erg): Check whether we *should* be building a WindowTreeHost here, or
+ // TODO(erg): Check whether we *should* be building a RootWindowHost here, or
// whether we should be proxying requests to another DRWHL.
// In some situations, views tries to make a zero sized window, and that
@@ -224,7 +224,7 @@ void DesktopWindowTreeHostX11::Init(
rw_create_params->host = this;
}
-void DesktopWindowTreeHostX11::OnRootWindowCreated(
+void DesktopRootWindowHostX11::OnRootWindowCreated(
aura::RootWindow* root,
const Widget::InitParams& params) {
root_window_ = root;
@@ -257,20 +257,20 @@ void DesktopWindowTreeHostX11::OnRootWindowCreated(
native_widget_delegate_->OnNativeWidgetCreated(true);
}
-scoped_ptr<corewm::Tooltip> DesktopWindowTreeHostX11::CreateTooltip() {
+scoped_ptr<corewm::Tooltip> DesktopRootWindowHostX11::CreateTooltip() {
return scoped_ptr<corewm::Tooltip>(
new corewm::TooltipAura(gfx::SCREEN_TYPE_NATIVE));
}
scoped_ptr<aura::client::DragDropClient>
-DesktopWindowTreeHostX11::CreateDragDropClient(
+DesktopRootWindowHostX11::CreateDragDropClient(
DesktopNativeCursorManager* cursor_manager) {
drag_drop_client_ = new DesktopDragDropClientAuraX11(
root_window_->window(), cursor_manager, xdisplay_, xwindow_);
return scoped_ptr<aura::client::DragDropClient>(drag_drop_client_).Pass();
}
-void DesktopWindowTreeHostX11::Close() {
+void DesktopRootWindowHostX11::Close() {
// TODO(erg): Might need to do additional hiding tasks here.
if (!close_widget_factory_.HasWeakPtrs()) {
@@ -280,12 +280,12 @@ void DesktopWindowTreeHostX11::Close() {
// dereference us when the callback returns).
base::MessageLoop::current()->PostTask(
FROM_HERE,
- base::Bind(&DesktopWindowTreeHostX11::CloseNow,
+ base::Bind(&DesktopRootWindowHostX11::CloseNow,
close_widget_factory_.GetWeakPtr()));
}
}
-void DesktopWindowTreeHostX11::CloseNow() {
+void DesktopRootWindowHostX11::CloseNow() {
if (xwindow_ == None)
return;
@@ -293,8 +293,8 @@ void DesktopWindowTreeHostX11::CloseNow() {
// If we have children, close them. Use a copy for iteration because they'll
// remove themselves.
- std::set<DesktopWindowTreeHostX11*> window_children_copy = window_children_;
- for (std::set<DesktopWindowTreeHostX11*>::iterator it =
+ std::set<DesktopRootWindowHostX11*> window_children_copy = window_children_;
+ for (std::set<DesktopRootWindowHostX11*>::iterator it =
window_children_copy.begin(); it != window_children_copy.end();
++it) {
(*it)->CloseNow();
@@ -321,11 +321,11 @@ void DesktopWindowTreeHostX11::CloseNow() {
desktop_native_widget_aura_->OnHostClosed();
}
-aura::WindowTreeHost* DesktopWindowTreeHostX11::AsWindowTreeHost() {
+aura::RootWindowHost* DesktopRootWindowHostX11::AsRootWindowHost() {
return this;
}
-void DesktopWindowTreeHostX11::ShowWindowWithState(
+void DesktopRootWindowHostX11::ShowWindowWithState(
ui::WindowShowState show_state) {
if (show_state != ui::SHOW_STATE_DEFAULT &&
show_state != ui::SHOW_STATE_NORMAL) {
@@ -336,23 +336,23 @@ void DesktopWindowTreeHostX11::ShowWindowWithState(
Show();
}
-void DesktopWindowTreeHostX11::ShowMaximizedWithBounds(
+void DesktopRootWindowHostX11::ShowMaximizedWithBounds(
const gfx::Rect& restored_bounds) {
restored_bounds_ = restored_bounds;
Maximize();
Show();
}
-bool DesktopWindowTreeHostX11::IsVisible() const {
+bool DesktopRootWindowHostX11::IsVisible() const {
return window_mapped_;
}
-void DesktopWindowTreeHostX11::SetSize(const gfx::Size& size) {
+void DesktopRootWindowHostX11::SetSize(const gfx::Size& size) {
// TODO(erg):
NOTIMPLEMENTED();
}
-void DesktopWindowTreeHostX11::CenterWindow(const gfx::Size& size) {
+void DesktopRootWindowHostX11::CenterWindow(const gfx::Size& size) {
gfx::Rect parent_bounds = GetWorkAreaBoundsInScreen();
// If |window_|'s transient parent bounds are big enough to contain |size|,
@@ -378,7 +378,7 @@ void DesktopWindowTreeHostX11::CenterWindow(const gfx::Size& size) {
SetBounds(window_bounds);
}
-void DesktopWindowTreeHostX11::GetWindowPlacement(
+void DesktopRootWindowHostX11::GetWindowPlacement(
gfx::Rect* bounds,
ui::WindowShowState* show_state) const {
*bounds = bounds_;
@@ -396,14 +396,14 @@ void DesktopWindowTreeHostX11::GetWindowPlacement(
}
}
-gfx::Rect DesktopWindowTreeHostX11::GetWindowBoundsInScreen() const {
+gfx::Rect DesktopRootWindowHostX11::GetWindowBoundsInScreen() const {
return bounds_;
}
-gfx::Rect DesktopWindowTreeHostX11::GetClientAreaBoundsInScreen() const {
+gfx::Rect DesktopRootWindowHostX11::GetClientAreaBoundsInScreen() const {
// TODO(erg): The NativeWidgetAura version returns |bounds_|, claiming its
// needed for View::ConvertPointToScreen() to work
- // correctly. DesktopWindowTreeHostWin::GetClientAreaBoundsInScreen() just
+ // correctly. DesktopRootWindowHostWin::GetClientAreaBoundsInScreen() just
// asks windows what it thinks the client rect is.
//
// Attempts to calculate the rect by asking the NonClientFrameView what it
@@ -412,7 +412,7 @@ gfx::Rect DesktopWindowTreeHostX11::GetClientAreaBoundsInScreen() const {
return bounds_;
}
-gfx::Rect DesktopWindowTreeHostX11::GetRestoredBounds() const {
+gfx::Rect DesktopRootWindowHostX11::GetRestoredBounds() const {
// We can't reliably track the restored bounds of a window, but we can get
// the 90% case down. When *chrome* is the process that requests maximizing
// or restoring bounds, we can record the current bounds before we request
@@ -423,7 +423,7 @@ gfx::Rect DesktopWindowTreeHostX11::GetRestoredBounds() const {
return GetWindowBoundsInScreen();
}
-gfx::Rect DesktopWindowTreeHostX11::GetWorkAreaBoundsInScreen() const {
+gfx::Rect DesktopRootWindowHostX11::GetWorkAreaBoundsInScreen() const {
std::vector<int> value;
if (ui::GetIntArrayProperty(x_root_window_, "_NET_WORKAREA", &value) &&
value.size() >= 4) {
@@ -444,7 +444,7 @@ gfx::Rect DesktopWindowTreeHostX11::GetWorkAreaBoundsInScreen() const {
return gfx::Rect(x, y, width, height);
}
-void DesktopWindowTreeHostX11::SetShape(gfx::NativeRegion native_region) {
+void DesktopRootWindowHostX11::SetShape(gfx::NativeRegion native_region) {
if (native_region) {
Region region = gfx::CreateRegionFromSkRegion(*native_region);
XShapeCombineRegion(
@@ -457,20 +457,20 @@ void DesktopWindowTreeHostX11::SetShape(gfx::NativeRegion native_region) {
delete native_region;
}
-void DesktopWindowTreeHostX11::Activate() {
+void DesktopRootWindowHostX11::Activate() {
X11DesktopHandler::get()->ActivateWindow(xwindow_);
}
-void DesktopWindowTreeHostX11::Deactivate() {
+void DesktopRootWindowHostX11::Deactivate() {
// Deactivating a window means activating nothing.
X11DesktopHandler::get()->ActivateWindow(None);
}
-bool DesktopWindowTreeHostX11::IsActive() const {
+bool DesktopRootWindowHostX11::IsActive() const {
return X11DesktopHandler::get()->IsActiveWindow(xwindow_);
}
-void DesktopWindowTreeHostX11::Maximize() {
+void DesktopRootWindowHostX11::Maximize() {
// When we're the process requesting the maximizing, we can accurately keep
// track of our restored bounds instead of relying on the heuristics that are
// in the PropertyNotify and ConfigureNotify handlers.
@@ -481,42 +481,42 @@ void DesktopWindowTreeHostX11::Maximize() {
atom_cache_.GetAtom("_NET_WM_STATE_MAXIMIZED_HORZ"));
}
-void DesktopWindowTreeHostX11::Minimize() {
+void DesktopRootWindowHostX11::Minimize() {
XIconifyWindow(xdisplay_, xwindow_, 0);
}
-void DesktopWindowTreeHostX11::Restore() {
+void DesktopRootWindowHostX11::Restore() {
SetWMSpecState(false,
atom_cache_.GetAtom("_NET_WM_STATE_MAXIMIZED_VERT"),
atom_cache_.GetAtom("_NET_WM_STATE_MAXIMIZED_HORZ"));
}
-bool DesktopWindowTreeHostX11::IsMaximized() const {
+bool DesktopRootWindowHostX11::IsMaximized() const {
return (HasWMSpecProperty("_NET_WM_STATE_MAXIMIZED_VERT") ||
HasWMSpecProperty("_NET_WM_STATE_MAXIMIZED_HORZ"));
}
-bool DesktopWindowTreeHostX11::IsMinimized() const {
+bool DesktopRootWindowHostX11::IsMinimized() const {
return HasWMSpecProperty("_NET_WM_STATE_HIDDEN");
}
-bool DesktopWindowTreeHostX11::HasCapture() const {
+bool DesktopRootWindowHostX11::HasCapture() const {
return g_current_capture == this;
}
-void DesktopWindowTreeHostX11::SetAlwaysOnTop(bool always_on_top) {
+void DesktopRootWindowHostX11::SetAlwaysOnTop(bool always_on_top) {
is_always_on_top_ = always_on_top;
SetWMSpecState(always_on_top,
atom_cache_.GetAtom("_NET_WM_STATE_ABOVE"),
None);
}
-bool DesktopWindowTreeHostX11::IsAlwaysOnTop() const {
+bool DesktopRootWindowHostX11::IsAlwaysOnTop() const {
return is_always_on_top_;
}
-void DesktopWindowTreeHostX11::SetWindowTitle(const string16& title) {
+void DesktopRootWindowHostX11::SetWindowTitle(const string16& title) {
std::string utf8str = UTF16ToUTF8(title);
XChangeProperty(xdisplay_,
@@ -535,7 +535,7 @@ void DesktopWindowTreeHostX11::SetWindowTitle(const string16& title) {
XStoreName(xdisplay_, xwindow_, utf8str.c_str());
}
-void DesktopWindowTreeHostX11::ClearNativeFocus() {
+void DesktopRootWindowHostX11::ClearNativeFocus() {
// This method is weird and misnamed. Instead of clearing the native focus,
// it sets the focus to our |content_window_|, which will trigger a cascade
// of focus changes into views.
@@ -546,7 +546,7 @@ void DesktopWindowTreeHostX11::ClearNativeFocus() {
}
}
-Widget::MoveLoopResult DesktopWindowTreeHostX11::RunMoveLoop(
+Widget::MoveLoopResult DesktopRootWindowHostX11::RunMoveLoop(
const gfx::Vector2d& drag_offset,
Widget::MoveLoopSource source,
Widget::MoveLoopEscapeBehavior escape_behavior) {
@@ -563,42 +563,42 @@ Widget::MoveLoopResult DesktopWindowTreeHostX11::RunMoveLoop(
return Widget::MOVE_LOOP_CANCELED;
}
-void DesktopWindowTreeHostX11::EndMoveLoop() {
+void DesktopRootWindowHostX11::EndMoveLoop() {
x11_window_move_client_->EndMoveLoop();
}
-void DesktopWindowTreeHostX11::SetVisibilityChangedAnimationsEnabled(
+void DesktopRootWindowHostX11::SetVisibilityChangedAnimationsEnabled(
bool value) {
// Much like the previous NativeWidgetGtk, we don't have anything to do here.
}
-bool DesktopWindowTreeHostX11::ShouldUseNativeFrame() {
+bool DesktopRootWindowHostX11::ShouldUseNativeFrame() {
return false;
}
-void DesktopWindowTreeHostX11::FrameTypeChanged() {
+void DesktopRootWindowHostX11::FrameTypeChanged() {
// Replace the frame and layout the contents. Even though we don't have a
// swapable glass frame like on Windows, we still replace the frame because
// the button assets don't update otherwise.
native_widget_delegate_->AsWidget()->non_client_view()->UpdateFrame(true);
}
-NonClientFrameView* DesktopWindowTreeHostX11::CreateNonClientFrameView() {
+NonClientFrameView* DesktopRootWindowHostX11::CreateNonClientFrameView() {
return NULL;
}
-void DesktopWindowTreeHostX11::SetFullscreen(bool fullscreen) {
+void DesktopRootWindowHostX11::SetFullscreen(bool fullscreen) {
is_fullscreen_ = fullscreen;
SetWMSpecState(fullscreen,
atom_cache_.GetAtom("_NET_WM_STATE_FULLSCREEN"),
None);
}
-bool DesktopWindowTreeHostX11::IsFullscreen() const {
+bool DesktopRootWindowHostX11::IsFullscreen() const {
return is_fullscreen_;
}
-void DesktopWindowTreeHostX11::SetOpacity(unsigned char opacity) {
+void DesktopRootWindowHostX11::SetOpacity(unsigned char opacity) {
// X server opacity is in terms of 32 bit unsigned int space, and counts from
// the opposite direction.
// XChangeProperty() expects "cardinality" to be long.
@@ -616,7 +616,7 @@ void DesktopWindowTreeHostX11::SetOpacity(unsigned char opacity) {
}
}
-void DesktopWindowTreeHostX11::SetWindowIcons(
+void DesktopRootWindowHostX11::SetWindowIcons(
const gfx::ImageSkia& window_icon, const gfx::ImageSkia& app_icon) {
// TODO(erg): The way we handle icons across different versions of chrome
// could be substantially improved. The Windows version does its own thing
@@ -640,7 +640,7 @@ void DesktopWindowTreeHostX11::SetWindowIcons(
ui::SetAtomArrayProperty(xwindow_, "_NET_WM_ICON", "CARDINAL", data);
}
-void DesktopWindowTreeHostX11::InitModalType(ui::ModalType modal_type) {
+void DesktopRootWindowHostX11::InitModalType(ui::ModalType modal_type) {
switch (modal_type) {
case ui::MODAL_TYPE_NONE:
break;
@@ -652,12 +652,12 @@ void DesktopWindowTreeHostX11::InitModalType(ui::ModalType modal_type) {
}
}
-void DesktopWindowTreeHostX11::FlashFrame(bool flash_frame) {
+void DesktopRootWindowHostX11::FlashFrame(bool flash_frame) {
// TODO(erg):
NOTIMPLEMENTED();
}
-void DesktopWindowTreeHostX11::OnRootViewLayout() const {
+void DesktopRootWindowHostX11::OnRootViewLayout() const {
if (!window_mapped_)
return;
@@ -686,31 +686,31 @@ void DesktopWindowTreeHostX11::OnRootViewLayout() const {
XSetWMNormalHints(xdisplay_, xwindow_, &hints);
}
-void DesktopWindowTreeHostX11::OnNativeWidgetFocus() {
+void DesktopRootWindowHostX11::OnNativeWidgetFocus() {
native_widget_delegate_->AsWidget()->GetInputMethod()->OnFocus();
}
-void DesktopWindowTreeHostX11::OnNativeWidgetBlur() {
+void DesktopRootWindowHostX11::OnNativeWidgetBlur() {
if (xwindow_)
native_widget_delegate_->AsWidget()->GetInputMethod()->OnBlur();
}
-bool DesktopWindowTreeHostX11::IsAnimatingClosed() const {
+bool DesktopRootWindowHostX11::IsAnimatingClosed() const {
return false;
}
////////////////////////////////////////////////////////////////////////////////
-// DesktopWindowTreeHostX11, aura::WindowTreeHost implementation:
+// DesktopRootWindowHostX11, aura::RootWindowHost implementation:
-aura::RootWindow* DesktopWindowTreeHostX11::GetRootWindow() {
+aura::RootWindow* DesktopRootWindowHostX11::GetRootWindow() {
return root_window_;
}
-gfx::AcceleratedWidget DesktopWindowTreeHostX11::GetAcceleratedWidget() {
+gfx::AcceleratedWidget DesktopRootWindowHostX11::GetAcceleratedWidget() {
return xwindow_;
}
-void DesktopWindowTreeHostX11::Show() {
+void DesktopRootWindowHostX11::Show() {
if (!window_mapped_) {
// Before we map the window, set size hints. Otherwise, some window managers
// will ignore toplevel XMoveWindow commands.
@@ -730,22 +730,22 @@ void DesktopWindowTreeHostX11::Show() {
}
}
-void DesktopWindowTreeHostX11::Hide() {
+void DesktopRootWindowHostX11::Hide() {
if (window_mapped_) {
XWithdrawWindow(xdisplay_, xwindow_, 0);
window_mapped_ = false;
}
}
-void DesktopWindowTreeHostX11::ToggleFullScreen() {
+void DesktopRootWindowHostX11::ToggleFullScreen() {
NOTIMPLEMENTED();
}
-gfx::Rect DesktopWindowTreeHostX11::GetBounds() const {
+gfx::Rect DesktopRootWindowHostX11::GetBounds() const {
return bounds_;
}
-void DesktopWindowTreeHostX11::SetBounds(const gfx::Rect& bounds) {
+void DesktopRootWindowHostX11::SetBounds(const gfx::Rect& bounds) {
bool origin_changed = bounds_.origin() != bounds.origin();
bool size_changed = bounds_.size() != bounds.size();
XWindowChanges changes = {0};
@@ -784,18 +784,18 @@ void DesktopWindowTreeHostX11::SetBounds(const gfx::Rect& bounds) {
compositor()->ScheduleRedrawRect(gfx::Rect(bounds.size()));
}
-gfx::Insets DesktopWindowTreeHostX11::GetInsets() const {
+gfx::Insets DesktopRootWindowHostX11::GetInsets() const {
return gfx::Insets();
}
-void DesktopWindowTreeHostX11::SetInsets(const gfx::Insets& insets) {
+void DesktopRootWindowHostX11::SetInsets(const gfx::Insets& insets) {
}
-gfx::Point DesktopWindowTreeHostX11::GetLocationOnNativeScreen() const {
+gfx::Point DesktopRootWindowHostX11::GetLocationOnNativeScreen() const {
return bounds_.origin();
}
-void DesktopWindowTreeHostX11::SetCapture() {
+void DesktopRootWindowHostX11::SetCapture() {
// This is vaguely based on the old NativeWidgetGtk implementation.
//
// X11's XPointerGrab() shouldn't be used for everything; it doesn't map
@@ -817,16 +817,16 @@ void DesktopWindowTreeHostX11::SetCapture() {
// to skip this for now.
}
-void DesktopWindowTreeHostX11::ReleaseCapture() {
+void DesktopRootWindowHostX11::ReleaseCapture() {
if (g_current_capture)
g_current_capture->OnCaptureReleased();
}
-void DesktopWindowTreeHostX11::SetCursor(gfx::NativeCursor cursor) {
+void DesktopRootWindowHostX11::SetCursor(gfx::NativeCursor cursor) {
XDefineCursor(xdisplay_, xwindow_, cursor.platform());
}
-bool DesktopWindowTreeHostX11::QueryMouseLocation(
+bool DesktopRootWindowHostX11::QueryMouseLocation(
gfx::Point* location_return) {
aura::client::CursorClient* cursor_client =
aura::client::GetCursorClient(GetRootWindow()->window());
@@ -852,26 +852,26 @@ bool DesktopWindowTreeHostX11::QueryMouseLocation(
win_y_return >= 0 && win_y_return < bounds_.height());
}
-bool DesktopWindowTreeHostX11::ConfineCursorToRootWindow() {
+bool DesktopRootWindowHostX11::ConfineCursorToRootWindow() {
NOTIMPLEMENTED();
return false;
}
-void DesktopWindowTreeHostX11::UnConfineCursor() {
+void DesktopRootWindowHostX11::UnConfineCursor() {
NOTIMPLEMENTED();
}
-void DesktopWindowTreeHostX11::OnCursorVisibilityChanged(bool show) {
+void DesktopRootWindowHostX11::OnCursorVisibilityChanged(bool show) {
// TODO(erg): Conditional on us enabling touch on desktop linux builds, do
// the same tap-to-click disabling here that chromeos does.
}
-void DesktopWindowTreeHostX11::MoveCursorTo(const gfx::Point& location) {
+void DesktopRootWindowHostX11::MoveCursorTo(const gfx::Point& location) {
XWarpPointer(xdisplay_, None, x_root_window_, 0, 0, 0, 0,
bounds_.x() + location.x(), bounds_.y() + location.y());
}
-void DesktopWindowTreeHostX11::PostNativeEvent(
+void DesktopRootWindowHostX11::PostNativeEvent(
const base::NativeEvent& native_event) {
DCHECK(xwindow_);
DCHECK(xdisplay_);
@@ -904,17 +904,17 @@ void DesktopWindowTreeHostX11::PostNativeEvent(
XSendEvent(xdisplay_, xwindow_, False, 0, &xevent);
}
-void DesktopWindowTreeHostX11::OnDeviceScaleFactorChanged(
+void DesktopRootWindowHostX11::OnDeviceScaleFactorChanged(
float device_scale_factor) {
}
-void DesktopWindowTreeHostX11::PrepareForShutdown() {
+void DesktopRootWindowHostX11::PrepareForShutdown() {
}
////////////////////////////////////////////////////////////////////////////////
-// DesktopWindowTreeHostX11, private:
+// DesktopRootWindowHostX11, private:
-void DesktopWindowTreeHostX11::InitX11Window(
+void DesktopRootWindowHostX11::InitX11Window(
const Widget::InitParams& params) {
unsigned long attribute_mask = CWBackPixmap;
XSetWindowAttributes swa;
@@ -1060,14 +1060,14 @@ void DesktopWindowTreeHostX11::InitX11Window(
CreateCompositor(GetAcceleratedWidget());
}
-bool DesktopWindowTreeHostX11::IsWindowManagerPresent() {
+bool DesktopRootWindowHostX11::IsWindowManagerPresent() {
// Per ICCCM 2.8, "Manager Selections", window managers should take ownership
// of WM_Sn selections (where n is a screen number).
return XGetSelectionOwner(
xdisplay_, atom_cache_.GetAtom("WM_S0")) != None;
}
-void DesktopWindowTreeHostX11::SetWMSpecState(bool enabled,
+void DesktopRootWindowHostX11::SetWMSpecState(bool enabled,
::Atom state1,
::Atom state2) {
XEvent xclient;
@@ -1088,22 +1088,22 @@ void DesktopWindowTreeHostX11::SetWMSpecState(bool enabled,
&xclient);
}
-bool DesktopWindowTreeHostX11::HasWMSpecProperty(const char* property) const {
+bool DesktopRootWindowHostX11::HasWMSpecProperty(const char* property) const {
return window_properties_.find(atom_cache_.GetAtom(property)) !=
window_properties_.end();
}
-void DesktopWindowTreeHostX11::OnCaptureReleased() {
+void DesktopRootWindowHostX11::OnCaptureReleased() {
g_current_capture = NULL;
delegate_->OnHostLostWindowCapture();
native_widget_delegate_->OnMouseCaptureLost();
}
-void DesktopWindowTreeHostX11::DispatchMouseEvent(ui::MouseEvent* event) {
+void DesktopRootWindowHostX11::DispatchMouseEvent(ui::MouseEvent* event) {
if (!g_current_capture || g_current_capture == this) {
delegate_->OnHostMouseEvent(event);
} else {
- // Another DesktopWindowTreeHostX11 has installed itself as
+ // Another DesktopRootWindowHostX11 has installed itself as
// capture. Translate the event's location and dispatch to the other.
event->ConvertLocationToTarget(root_window_->window(),
g_current_capture->root_window_->window());
@@ -1111,7 +1111,7 @@ void DesktopWindowTreeHostX11::DispatchMouseEvent(ui::MouseEvent* event) {
}
}
-void DesktopWindowTreeHostX11::ResetWindowRegion() {
+void DesktopRootWindowHostX11::ResetWindowRegion() {
if (!IsMaximized()) {
gfx::Path window_mask;
views::Widget* widget = native_widget_delegate_->AsWidget();
@@ -1137,7 +1137,7 @@ void DesktopWindowTreeHostX11::ResetWindowRegion() {
0, 0, &r, 1, ShapeSet, YXBanded);
}
-void DesktopWindowTreeHostX11::SerializeImageRepresentation(
+void DesktopRootWindowHostX11::SerializeImageRepresentation(
const gfx::ImageSkiaRep& rep,
std::vector<unsigned long>* data) {
int width = rep.GetWidth();
@@ -1154,19 +1154,19 @@ void DesktopWindowTreeHostX11::SerializeImageRepresentation(
data->push_back(bitmap.getColor(x, y));
}
-std::list<XID>& DesktopWindowTreeHostX11::open_windows() {
+std::list<XID>& DesktopRootWindowHostX11::open_windows() {
if (!open_windows_)
open_windows_ = new std::list<XID>();
return *open_windows_;
}
////////////////////////////////////////////////////////////////////////////////
-// DesktopWindowTreeHostX11, MessageLoop::Dispatcher implementation:
+// DesktopRootWindowHostX11, MessageLoop::Dispatcher implementation:
-bool DesktopWindowTreeHostX11::Dispatch(const base::NativeEvent& event) {
+bool DesktopRootWindowHostX11::Dispatch(const base::NativeEvent& event) {
XEvent* xev = event;
- TRACE_EVENT1("views", "DesktopWindowTreeHostX11::Dispatch",
+ TRACE_EVENT1("views", "DesktopRootWindowHostX11::Dispatch",
"event->type", event->type);
// May want to factor CheckXEventForConsistency(xev); into a common location
@@ -1361,13 +1361,13 @@ bool DesktopWindowTreeHostX11::Dispatch(const base::NativeEvent& event) {
if (!IsWindowManagerPresent() && focus_when_shown_)
XSetInputFocus(xdisplay_, xwindow_, RevertToNone, CurrentTime);
- FOR_EACH_OBSERVER(DesktopWindowTreeHostObserverX11,
+ FOR_EACH_OBSERVER(DesktopRootWindowHostObserverX11,
observer_list_,
OnWindowMapped(xwindow_));
break;
}
case UnmapNotify: {
- FOR_EACH_OBSERVER(DesktopWindowTreeHostObserverX11,
+ FOR_EACH_OBSERVER(DesktopRootWindowHostObserverX11,
observer_list_,
OnWindowUnmapped(xwindow_));
break;
@@ -1378,7 +1378,7 @@ bool DesktopWindowTreeHostX11::Dispatch(const base::NativeEvent& event) {
Atom protocol = static_cast<Atom>(xev->xclient.data.l[0]);
if (protocol == atom_cache_.GetAtom("WM_DELETE_WINDOW")) {
// We have received a close message from the window manager.
- root_window_->OnWindowTreeHostCloseRequested();
+ root_window_->OnRootWindowHostCloseRequested();
} else if (protocol == atom_cache_.GetAtom("_NET_WM_PING")) {
XEvent reply_event = *xev;
reply_event.xclient.window = x_root_window_;
@@ -1498,18 +1498,18 @@ bool DesktopWindowTreeHostX11::Dispatch(const base::NativeEvent& event) {
}
////////////////////////////////////////////////////////////////////////////////
-// DesktopWindowTreeHost, public:
+// DesktopRootWindowHost, public:
// static
-DesktopWindowTreeHost* DesktopWindowTreeHost::Create(
+DesktopRootWindowHost* DesktopRootWindowHost::Create(
internal::NativeWidgetDelegate* native_widget_delegate,
DesktopNativeWidgetAura* desktop_native_widget_aura) {
- return new DesktopWindowTreeHostX11(native_widget_delegate,
+ return new DesktopRootWindowHostX11(native_widget_delegate,
desktop_native_widget_aura);
}
// static
-ui::NativeTheme* DesktopWindowTreeHost::GetNativeTheme(aura::Window* window) {
+ui::NativeTheme* DesktopRootWindowHost::GetNativeTheme(aura::Window* window) {
const views::LinuxUI* linux_ui = views::LinuxUI::instance();
if (linux_ui) {
ui::NativeTheme* native_theme = linux_ui->GetNativeTheme();
diff --git a/ui/views/widget/desktop_aura/desktop_root_window_host_x11.h b/ui/views/widget/desktop_aura/desktop_root_window_host_x11.h
index c1308bfd..8309cfc 100644
--- a/ui/views/widget/desktop_aura/desktop_root_window_host_x11.h
+++ b/ui/views/widget/desktop_aura/desktop_root_window_host_x11.h
@@ -28,25 +28,25 @@ class ImageSkiaRep;
namespace views {
class DesktopDragDropClientAuraX11;
class DesktopDispatcherClient;
-class DesktopWindowTreeHostObserverX11;
+class DesktopRootWindowHostObserverX11;
class X11DesktopWindowMoveClient;
class X11WindowEventFilter;
-class VIEWS_EXPORT DesktopWindowTreeHostX11 :
- public DesktopWindowTreeHost,
- public aura::WindowTreeHost,
+class VIEWS_EXPORT DesktopRootWindowHostX11 :
+ public DesktopRootWindowHost,
+ public aura::RootWindowHost,
public base::MessageLoop::Dispatcher {
public:
- DesktopWindowTreeHostX11(
+ DesktopRootWindowHostX11(
internal::NativeWidgetDelegate* native_widget_delegate,
DesktopNativeWidgetAura* desktop_native_widget_aura);
- virtual ~DesktopWindowTreeHostX11();
+ virtual ~DesktopRootWindowHostX11();
// A way of converting an X11 |xid| host window into a |content_window_|.
static aura::Window* GetContentWindowForXID(XID xid);
// A way of converting an X11 |xid| host window into this object.
- static DesktopWindowTreeHostX11* GetHostForXID(XID xid);
+ static DesktopRootWindowHostX11* GetHostForXID(XID xid);
// Get all open top-level windows. This includes windows that may not be
// visible. This list is sorted in their stacking order, i.e. the first window
@@ -60,14 +60,14 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11 :
// has changed our activation.
void HandleNativeWidgetActivationChanged(bool active);
- void AddObserver(views::DesktopWindowTreeHostObserverX11* observer);
- void RemoveObserver(views::DesktopWindowTreeHostObserverX11* observer);
+ void AddObserver(views::DesktopRootWindowHostObserverX11* observer);
+ void RemoveObserver(views::DesktopRootWindowHostObserverX11* observer);
// Deallocates the internal list of open windows.
static void CleanUpWindowList();
protected:
- // Overridden from DesktopWindowTreeHost:
+ // Overridden from DesktopRootWindowHost:
virtual void Init(aura::Window* content_window,
const Widget::InitParams& params,
aura::RootWindow::CreateParams* rw_create_params) OVERRIDE;
@@ -78,7 +78,7 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11 :
CreateDragDropClient(DesktopNativeCursorManager* cursor_manager) OVERRIDE;
virtual void Close() OVERRIDE;
virtual void CloseNow() OVERRIDE;
- virtual aura::WindowTreeHost* AsWindowTreeHost() OVERRIDE;
+ virtual aura::RootWindowHost* AsRootWindowHost() OVERRIDE;
virtual void ShowWindowWithState(ui::WindowShowState show_state) OVERRIDE;
virtual void ShowMaximizedWithBounds(
const gfx::Rect& restored_bounds) OVERRIDE;
@@ -127,7 +127,7 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11 :
virtual void OnNativeWidgetBlur() OVERRIDE;
virtual bool IsAnimatingClosed() const OVERRIDE;
- // Overridden from aura::WindowTreeHost:
+ // Overridden from aura::RootWindowHost:
virtual aura::RootWindow* GetRootWindow() OVERRIDE;
virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE;
virtual void Show() OVERRIDE;
@@ -193,7 +193,7 @@ private:
// Overridden from Dispatcher:
virtual bool Dispatch(const base::NativeEvent& event) OVERRIDE;
- base::WeakPtrFactory<DesktopWindowTreeHostX11> close_widget_factory_;
+ base::WeakPtrFactory<DesktopRootWindowHostX11> close_widget_factory_;
// X11 things
// The display and the native X window hosting the root window.
@@ -258,23 +258,23 @@ private:
// We can optionally have a parent which can order us to close, or own
// children who we're responsible for closing when we CloseNow().
- DesktopWindowTreeHostX11* window_parent_;
- std::set<DesktopWindowTreeHostX11*> window_children_;
+ DesktopRootWindowHostX11* window_parent_;
+ std::set<DesktopRootWindowHostX11*> window_children_;
- ObserverList<DesktopWindowTreeHostObserverX11> observer_list_;
+ ObserverList<DesktopRootWindowHostObserverX11> observer_list_;
// The current root window host that has capture. While X11 has something
// like Windows SetCapture()/ReleaseCapture(), it is entirely implicit and
// there are no notifications when this changes. We need to track this so we
// can notify widgets when they have lost capture, which controls a bunch of
// things in views like hiding menus.
- static DesktopWindowTreeHostX11* g_current_capture;
+ static DesktopRootWindowHostX11* g_current_capture;
// A list of all (top-level) windows that have been created but not yet
// destroyed.
static std::list<XID>* open_windows_;
- DISALLOW_COPY_AND_ASSIGN(DesktopWindowTreeHostX11);
+ DISALLOW_COPY_AND_ASSIGN(DesktopRootWindowHostX11);
};
} // namespace views
diff --git a/ui/views/widget/desktop_aura/desktop_screen.h b/ui/views/widget/desktop_aura/desktop_screen.h
index 2db961d..ad66bd4 100644
--- a/ui/views/widget/desktop_aura/desktop_screen.h
+++ b/ui/views/widget/desktop_aura/desktop_screen.h
@@ -14,7 +14,7 @@ class Screen;
namespace views {
// Creates a Screen that represents the screen of the environment that hosts
-// a WindowTreeHost. Caller owns the result.
+// a RootWindowHost. Caller owns the result.
VIEWS_EXPORT gfx::Screen* CreateDesktopScreen();
} // namespace views
diff --git a/ui/views/widget/desktop_aura/desktop_screen_win.cc b/ui/views/widget/desktop_aura/desktop_screen_win.cc
index 99a5449..86823a0 100644
--- a/ui/views/widget/desktop_aura/desktop_screen_win.cc
+++ b/ui/views/widget/desktop_aura/desktop_screen_win.cc
@@ -60,7 +60,7 @@ HWND DesktopScreenWin::GetHWNDFromNativeView(gfx::NativeView window) const {
gfx::NativeWindow DesktopScreenWin::GetNativeWindowFromHWND(HWND hwnd) const {
return (::IsWindow(hwnd)) ?
- DesktopWindowTreeHostWin::GetContentWindowForHWND(hwnd) : NULL;
+ DesktopRootWindowHostWin::GetContentWindowForHWND(hwnd) : NULL;
}
////////////////////////////////////////////////////////////////////////////////
diff --git a/ui/views/widget/desktop_aura/desktop_screen_x11.cc b/ui/views/widget/desktop_aura/desktop_screen_x11.cc
index 754d204..f17c3f2 100644
--- a/ui/views/widget/desktop_aura/desktop_screen_x11.cc
+++ b/ui/views/widget/desktop_aura/desktop_screen_x11.cc
@@ -183,7 +183,7 @@ gfx::NativeWindow DesktopScreenX11::GetWindowUnderCursor() {
gfx::NativeWindow DesktopScreenX11::GetWindowAtScreenPoint(
const gfx::Point& point) {
std::vector<aura::Window*> windows =
- DesktopWindowTreeHostX11::GetAllOpenWindows();
+ DesktopRootWindowHostX11::GetAllOpenWindows();
for (std::vector<aura::Window*>::const_iterator it = windows.begin();
it != windows.end(); ++it) {
@@ -215,7 +215,7 @@ gfx::Display DesktopScreenX11::GetDisplayNearestWindow(
// bounds.
aura::WindowEventDispatcher* dispatcher = window->GetDispatcher();
if (dispatcher) {
- DesktopWindowTreeHostX11* rwh = DesktopWindowTreeHostX11::GetHostForXID(
+ DesktopRootWindowHostX11* rwh = DesktopRootWindowHostX11::GetHostForXID(
dispatcher->host()->GetAcceleratedWidget());
if (rwh)
return GetDisplayMatching(rwh->GetX11RootWindowBounds());
diff --git a/ui/views/widget/desktop_aura/desktop_screen_x11_unittest.cc b/ui/views/widget/desktop_aura/desktop_screen_x11_unittest.cc
index c8efae8..55ce070 100644
--- a/ui/views/widget/desktop_aura/desktop_screen_x11_unittest.cc
+++ b/ui/views/widget/desktop_aura/desktop_screen_x11_unittest.cc
@@ -203,9 +203,9 @@ TEST_F(DesktopScreenX11Test, GetWindowAtScreenPoint) {
Widget* window_two = BuildTopLevelDesktopWidget(gfx::Rect(50, 50, 10, 10));
Widget* window_three = BuildTopLevelDesktopWidget(gfx::Rect(15, 15, 20, 20));
- // Make sure the internal state of DesktopWindowTreeHostX11 is set up
+ // Make sure the internal state of DesktopRootWindowHostX11 is set up
// correctly.
- ASSERT_EQ(3u, DesktopWindowTreeHostX11::GetAllOpenWindows().size());
+ ASSERT_EQ(3u, DesktopRootWindowHostX11::GetAllOpenWindows().size());
EXPECT_EQ(window_one->GetNativeWindow(),
screen()->GetWindowAtScreenPoint(gfx::Point(15, 15)));
diff --git a/ui/views/widget/desktop_aura/x11_desktop_handler.cc b/ui/views/widget/desktop_aura/x11_desktop_handler.cc
index 3a14e04..0cfe040 100644
--- a/ui/views/widget/desktop_aura/x11_desktop_handler.cc
+++ b/ui/views/widget/desktop_aura/x11_desktop_handler.cc
@@ -151,13 +151,13 @@ void X11DesktopHandler::OnWillDestroyEnv() {
void X11DesktopHandler::OnActiveWindowChanged(::Window xid) {
if (current_window_ == xid)
return;
- DesktopWindowTreeHostX11* old_host =
- views::DesktopWindowTreeHostX11::GetHostForXID(current_window_);
+ DesktopRootWindowHostX11* old_host =
+ views::DesktopRootWindowHostX11::GetHostForXID(current_window_);
if (old_host)
old_host->HandleNativeWidgetActivationChanged(false);
- DesktopWindowTreeHostX11* new_host =
- views::DesktopWindowTreeHostX11::GetHostForXID(xid);
+ DesktopRootWindowHostX11* new_host =
+ views::DesktopRootWindowHostX11::GetHostForXID(xid);
if (new_host)
new_host->HandleNativeWidgetActivationChanged(true);
diff --git a/ui/views/widget/desktop_aura/x11_desktop_window_move_client.cc b/ui/views/widget/desktop_aura/x11_desktop_window_move_client.cc
index 0e81528..a79d365 100644
--- a/ui/views/widget/desktop_aura/x11_desktop_window_move_client.cc
+++ b/ui/views/widget/desktop_aura/x11_desktop_window_move_client.cc
@@ -71,7 +71,7 @@ void X11DesktopWindowMoveClient::OnMoveLoopEnded() {
}
////////////////////////////////////////////////////////////////////////////////
-// DesktopWindowTreeHostLinux, aura::client::WindowMoveClient implementation:
+// DesktopRootWindowHostLinux, aura::client::WindowMoveClient implementation:
aura::client::WindowMoveResult X11DesktopWindowMoveClient::RunMoveLoop(
aura::Window* source,
@@ -90,7 +90,7 @@ void X11DesktopWindowMoveClient::EndMoveLoop() {
}
////////////////////////////////////////////////////////////////////////////////
-// DesktopWindowTreeHostLinux, private:
+// DesktopRootWindowHostLinux, private:
void X11DesktopWindowMoveClient::SetHostBounds(const gfx::Rect& rect) {
root_window_->SetHostBounds(rect);
diff --git a/ui/views/widget/desktop_aura/x11_whole_screen_move_loop.cc b/ui/views/widget/desktop_aura/x11_whole_screen_move_loop.cc
index 30a44bf..a88fdce 100644
--- a/ui/views/widget/desktop_aura/x11_whole_screen_move_loop.cc
+++ b/ui/views/widget/desktop_aura/x11_whole_screen_move_loop.cc
@@ -31,7 +31,7 @@ X11WholeScreenMoveLoop::X11WholeScreenMoveLoop(
X11WholeScreenMoveLoop::~X11WholeScreenMoveLoop() {}
////////////////////////////////////////////////////////////////////////////////
-// DesktopWindowTreeHostLinux, MessageLoop::Dispatcher implementation:
+// DesktopRootWindowHostLinux, MessageLoop::Dispatcher implementation:
bool X11WholeScreenMoveLoop::Dispatch(const base::NativeEvent& event) {
XEvent* xev = event;
@@ -57,7 +57,7 @@ bool X11WholeScreenMoveLoop::Dispatch(const base::NativeEvent& event) {
}
////////////////////////////////////////////////////////////////////////////////
-// DesktopWindowTreeHostLinux, aura::client::WindowMoveClient implementation:
+// DesktopRootWindowHostLinux, aura::client::WindowMoveClient implementation:
bool X11WholeScreenMoveLoop::RunMoveLoop(aura::Window* source,
gfx::NativeCursor cursor) {
diff --git a/ui/views/widget/native_widget_aura.cc b/ui/views/widget/native_widget_aura.cc
index a1c79d7..ba6954d 100644
--- a/ui/views/widget/native_widget_aura.cc
+++ b/ui/views/widget/native_widget_aura.cc
@@ -674,7 +674,7 @@ void NativeWidgetAura::SetVisibilityChangedAnimationsEnabled(bool value) {
ui::NativeTheme* NativeWidgetAura::GetNativeTheme() const {
#if !defined(OS_CHROMEOS)
- return DesktopWindowTreeHost::GetNativeTheme(window_);
+ return DesktopRootWindowHost::GetNativeTheme(window_);
#else
return ui::NativeThemeAura::instance();
#endif
@@ -990,7 +990,7 @@ void CloseWindow(aura::Window* window) {
#if defined(OS_WIN)
BOOL CALLBACK WindowCallbackProc(HWND hwnd, LPARAM lParam) {
aura::Window* root_window =
- DesktopWindowTreeHostWin::GetContentWindowForHWND(hwnd);
+ DesktopRootWindowHostWin::GetContentWindowForHWND(hwnd);
CloseWindow(root_window);
return TRUE;
}
@@ -1005,9 +1005,9 @@ void Widget::CloseAllSecondaryWidgets() {
#if defined(USE_X11) && !defined(OS_CHROMEOS)
std::vector<aura::Window*> open_windows =
- DesktopWindowTreeHostX11::GetAllOpenWindows();
+ DesktopRootWindowHostX11::GetAllOpenWindows();
std::for_each(open_windows.begin(), open_windows.end(), CloseWindow);
- DesktopWindowTreeHostX11::CleanUpWindowList();
+ DesktopRootWindowHostX11::CleanUpWindowList();
#endif
}
diff --git a/ui/views/widget/native_widget_aura_unittest.cc b/ui/views/widget/native_widget_aura_unittest.cc
index 83474d7..f0f34c7 100644
--- a/ui/views/widget/native_widget_aura_unittest.cc
+++ b/ui/views/widget/native_widget_aura_unittest.cc
@@ -258,7 +258,7 @@ TEST_F(NativeWidgetAuraTest, DontCaptureOnGesture) {
ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(41, 51), 1,
base::TimeDelta());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
// Both views should get the press.
EXPECT_TRUE(view->got_gesture_event());
EXPECT_TRUE(child->got_gesture_event());
@@ -271,7 +271,7 @@ TEST_F(NativeWidgetAuraTest, DontCaptureOnGesture) {
// the press.
ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(250, 251), 1,
base::TimeDelta());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
EXPECT_TRUE(view->got_gesture_event());
EXPECT_FALSE(child->got_gesture_event());
view->clear_got_gesture_event();
@@ -294,7 +294,7 @@ TEST_F(NativeWidgetAuraTest, ReleaseCaptureOnTouchRelease) {
ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(41, 51), 1,
base::TimeDelta());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
EXPECT_TRUE(view->got_gesture_event());
view->clear_got_gesture_event();
// Set the capture.
@@ -304,7 +304,7 @@ TEST_F(NativeWidgetAuraTest, ReleaseCaptureOnTouchRelease) {
// Generate a release, this should trigger releasing capture.
ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(41, 51), 1,
base::TimeDelta());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
EXPECT_TRUE(view->got_gesture_event());
view->clear_got_gesture_event();
EXPECT_FALSE(widget->HasCapture());
diff --git a/ui/views/widget/widget.h b/ui/views/widget/widget.h
index 57c79cb..69aa998 100644
--- a/ui/views/widget/widget.h
+++ b/ui/views/widget/widget.h
@@ -52,7 +52,7 @@ class ThemeProvider;
namespace views {
-class DesktopWindowTreeHost;
+class DesktopRootWindowHost;
class InputMethod;
class NativeWidget;
class NonClientFrameView;
@@ -207,11 +207,11 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
// When set, this value is used as the Widget's NativeWidget implementation.
// The Widget will not construct a default one. Default is NULL.
NativeWidget* native_widget;
- // Aura-only. Provides a DesktopWindowTreeHost implementation to use instead
+ // Aura-only. Provides a DesktopRootWindowHost implementation to use instead
// of the default one.
// TODO(beng): Figure out if there's a better way to expose this, e.g. get
// rid of NW subclasses and do this all via message handling.
- DesktopWindowTreeHost* desktop_root_window_host;
+ DesktopRootWindowHost* desktop_root_window_host;
// Whether this window is intended to be a toplevel window with no
// attachment to any other window. (This may be a transient window if
// |parent| is set.)
diff --git a/ui/views/widget/widget_interactive_uitest.cc b/ui/views/widget/widget_interactive_uitest.cc
index 12c4570..889ee6b 100644
--- a/ui/views/widget/widget_interactive_uitest.cc
+++ b/ui/views/widget/widget_interactive_uitest.cc
@@ -776,7 +776,7 @@ TEST_F(WidgetCaptureTest, MAYBE_MouseEventDispatchedToRightWindow) {
// |widget2| has capture, |widget1| should still get the event.
ui::MouseEvent mouse_event(ui::ET_MOUSE_EXITED, gfx::Point(), gfx::Point(),
ui::EF_NONE);
- widget1.GetNativeWindow()->GetDispatcher()->AsWindowTreeHostDelegate()->
+ widget1.GetNativeWindow()->GetDispatcher()->AsRootWindowHostDelegate()->
OnHostMouseEvent(&mouse_event);
EXPECT_TRUE(widget1.GetAndClearGotMouseEvent());
EXPECT_FALSE(widget2.GetAndClearGotMouseEvent());
diff --git a/ui/views/widget/widget_unittest.cc b/ui/views/widget/widget_unittest.cc
index ca5c649..67887b1 100644
--- a/ui/views/widget/widget_unittest.cc
+++ b/ui/views/widget/widget_unittest.cc
@@ -1309,8 +1309,8 @@ void GenerateMouseEvents(Widget* widget, ui::EventType last_event_type) {
const gfx::Rect screen_bounds(widget->GetWindowBoundsInScreen());
ui::MouseEvent move_event(ui::ET_MOUSE_MOVED, screen_bounds.CenterPoint(),
screen_bounds.CenterPoint(), 0);
- aura::WindowTreeHostDelegate* rwhd =
- widget->GetNativeWindow()->GetDispatcher()->AsWindowTreeHostDelegate();
+ aura::RootWindowHostDelegate* rwhd =
+ widget->GetNativeWindow()->GetDispatcher()->AsRootWindowHostDelegate();
rwhd->OnHostMouseEvent(&move_event);
if (last_event_type == ui::ET_MOUSE_ENTERED)
return;
@@ -2014,7 +2014,7 @@ TEST_F(WidgetTest, WindowMouseModalityTest) {
cursor_location_main,
ui::EF_NONE);
top_level_widget.GetNativeView()->GetDispatcher()->
- AsWindowTreeHostDelegate()->OnHostMouseEvent(&move_main);
+ AsRootWindowHostDelegate()->OnHostMouseEvent(&move_main);
EXPECT_EQ(1, widget_view->GetEventCount(ui::ET_MOUSE_ENTERED));
widget_view->ResetCounts();
@@ -2040,7 +2040,7 @@ TEST_F(WidgetTest, WindowMouseModalityTest) {
cursor_location_dialog,
ui::EF_NONE);
top_level_widget.GetNativeView()->GetDispatcher()->
- AsWindowTreeHostDelegate()->OnHostMouseEvent(&mouse_down_dialog);
+ AsRootWindowHostDelegate()->OnHostMouseEvent(&mouse_down_dialog);
EXPECT_EQ(1, dialog_widget_view->GetEventCount(ui::ET_MOUSE_PRESSED));
// Send a mouse move message to the main window. It should not be received by
@@ -2051,7 +2051,7 @@ TEST_F(WidgetTest, WindowMouseModalityTest) {
cursor_location_main2,
ui::EF_NONE);
top_level_widget.GetNativeView()->GetDispatcher()->
- AsWindowTreeHostDelegate()->OnHostMouseEvent(&mouse_down_main);
+ AsRootWindowHostDelegate()->OnHostMouseEvent(&mouse_down_main);
EXPECT_EQ(0, widget_view->GetEventCount(ui::ET_MOUSE_MOVED));
modal_dialog_widget->CloseNow();
diff --git a/ui/views/win/hwnd_message_handler.h b/ui/views/win/hwnd_message_handler.h
index c610223..d08fbd8 100644
--- a/ui/views/win/hwnd_message_handler.h
+++ b/ui/views/win/hwnd_message_handler.h
@@ -102,7 +102,7 @@ const int WM_NCUAHDRAWFRAME = 0xAF;
// An object that handles messages for a HWND that implements the views
// "Custom Frame" look. The purpose of this class is to isolate the windows-
// specific message handling from the code that wraps it. It is intended to be
-// used by both a views::NativeWidget and an aura::WindowTreeHost
+// used by both a views::NativeWidget and an aura::RootWindowHost
// implementation.
// TODO(beng): This object should eventually *become* the WindowImpl.
class VIEWS_EXPORT HWNDMessageHandler :
diff --git a/win8/viewer/metro_viewer_process_host.cc b/win8/viewer/metro_viewer_process_host.cc
index ec6112f..46968b9 100644
--- a/win8/viewer/metro_viewer_process_host.cc
+++ b/win8/viewer/metro_viewer_process_host.cc
@@ -101,7 +101,7 @@ bool MetroViewerProcessHost::OnMessageReceived(
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
return handled ? true :
- aura::RemoteWindowTreeHostWin::Instance()->OnMessageReceived(message);
+ aura::RemoteRootWindowHostWin::Instance()->OnMessageReceived(message);
}
void MetroViewerProcessHost::NotifyChannelConnected() {