summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-08 16:41:23 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-08 16:41:23 +0000
commit641dcfd54a64f53c356f10373d7ee70d3342cae8 (patch)
tree98a90fe540025e96a5e155567d3da1dfab34361a
parent6a617b58c1229bb0dce0727dc8a97f20df973baf (diff)
downloadchromium_src-641dcfd54a64f53c356f10373d7ee70d3342cae8.zip
chromium_src-641dcfd54a64f53c356f10373d7ee70d3342cae8.tar.gz
chromium_src-641dcfd54a64f53c356f10373d7ee70d3342cae8.tar.bz2
Rename RootWindowHost to WindowTreeHost
TBR=sky@chromium.org http://crbug.com/308843 Review URL: https://codereview.chromium.org/126513004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243578 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--apps/shell/shell_browser_main_parts.cc2
-rw-r--r--apps/shell/shell_browser_main_parts.h2
-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/sticky_keys/sticky_keys_controller.cc8
-rw-r--r--ash/sticky_keys/sticky_keys_unittest.cc14
-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/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/input_method/input_method_engine.cc2
-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/extensions/app_background_page_apitest.cc2
-rw-r--r--chrome/browser/metro_viewer/chrome_metro_viewer_process_host_aurawin.cc6
-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/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.cc16
-rw-r--r--content/browser/renderer_host/input/synthetic_gesture_target_aura.h4
-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/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--mojo/examples/aura_demo/aura_demo.cc4
-rw-r--r--mojo/examples/aura_demo/demo_context_factory.cc2
-rw-r--r--mojo/examples/aura_demo/demo_context_factory.h6
-rw-r--r--mojo/examples/aura_demo/root_window_host_mojo.cc66
-rw-r--r--mojo/examples/aura_demo/root_window_host_mojo.h10
-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.cc152
-rw-r--r--ui/aura/remote_root_window_host_win.h22
-rw-r--r--ui/aura/root_window.cc18
-rw-r--r--ui/aura/root_window.h28
-rw-r--r--ui/aura/root_window_host_mac.h10
-rw-r--r--ui/aura/root_window_host_mac.mm52
-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.cc84
-rw-r--r--ui/aura/root_window_host_x11.h14
-rw-r--r--ui/aura/root_window_host_x11_unittest.cc48
-rw-r--r--ui/aura/root_window_observer.h6
-rw-r--r--ui/aura/root_window_unittest.cc86
-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_targeter_unittest.cc2
-rw-r--r--ui/aura/window_tree_host.cc40
-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/base/ime/remote_input_method_win.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.cc316
-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.cc230
-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.cc8
-rw-r--r--ui/views/widget/desktop_aura/x11_window_event_filter.cc2
-rw-r--r--ui/views/widget/desktop_aura/x11_window_event_filter.h6
-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.cc12
-rw-r--r--ui/views/win/hwnd_message_handler.h2
-rw-r--r--win8/metro_driver/ime/text_service.cc4
-rw-r--r--win8/viewer/metro_viewer_process_host.cc2
135 files changed, 1270 insertions, 1270 deletions
diff --git a/apps/shell/shell_browser_main_parts.cc b/apps/shell/shell_browser_main_parts.cc
index 06fecad..cbe857f 100644
--- a/apps/shell/shell_browser_main_parts.cc
+++ b/apps/shell/shell_browser_main_parts.cc
@@ -123,7 +123,7 @@ void ShellBrowserMainParts::PostMainMessageLoopRun() {
LOG(WARNING) << "-----------------------------------";
}
-void ShellBrowserMainParts::OnRootWindowHostCloseRequested(
+void ShellBrowserMainParts::OnWindowTreeHostCloseRequested(
const aura::RootWindow* root) {
base::MessageLoop::current()->PostTask(FROM_HERE,
base::MessageLoop::QuitClosure());
diff --git a/apps/shell/shell_browser_main_parts.h b/apps/shell/shell_browser_main_parts.h
index a1fdba3..b6913b0 100644
--- a/apps/shell/shell_browser_main_parts.h
+++ b/apps/shell/shell_browser_main_parts.h
@@ -56,7 +56,7 @@ class ShellBrowserMainParts : public content::BrowserMainParts,
virtual void PostMainMessageLoopRun() OVERRIDE;
// aura::RootWindowObserver overrides:
- virtual void OnRootWindowHostCloseRequested(const aura::RootWindow* root)
+ virtual void OnWindowTreeHostCloseRequested(const aura::RootWindow* root)
OVERRIDE;
private:
diff --git a/ash/accelerators/accelerator_controller_unittest.cc b/ash/accelerators/accelerator_controller_unittest.cc
index 8569171..189db90 100644
--- a/ash/accelerators/accelerator_controller_unittest.cc
+++ b/ash/accelerators/accelerator_controller_unittest.cc
@@ -654,32 +654,32 @@ 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->AsRootWindowHostDelegate()->OnHostKeyEvent(
+ EXPECT_TRUE(dispatcher->AsWindowTreeHostDelegate()->OnHostKeyEvent(
&key_event1));
MSG msg2 = { NULL, WM_CHAR, L'A', 0 };
ui::TranslatedKeyEvent key_event2(msg2, true);
- EXPECT_FALSE(dispatcher->AsRootWindowHostDelegate()->OnHostKeyEvent(
+ EXPECT_FALSE(dispatcher->AsWindowTreeHostDelegate()->OnHostKeyEvent(
&key_event2));
MSG msg3 = { NULL, WM_KEYUP, ui::VKEY_A, 0 };
ui::TranslatedKeyEvent key_event3(msg3, false);
- EXPECT_FALSE(dispatcher->AsRootWindowHostDelegate()->OnHostKeyEvent(
+ EXPECT_FALSE(dispatcher->AsWindowTreeHostDelegate()->OnHostKeyEvent(
&key_event3));
#elif defined(USE_X11)
ui::ScopedXI2Event key_event;
key_event.InitKeyEvent(ui::ET_KEY_PRESSED, ui::VKEY_A, 0);
ui::TranslatedKeyEvent key_event1(key_event, false);
- EXPECT_TRUE(dispatcher->AsRootWindowHostDelegate()->OnHostKeyEvent(
+ EXPECT_TRUE(dispatcher->AsWindowTreeHostDelegate()->OnHostKeyEvent(
&key_event1));
ui::TranslatedKeyEvent key_event2(key_event, true);
- EXPECT_FALSE(dispatcher->AsRootWindowHostDelegate()->OnHostKeyEvent(
+ EXPECT_FALSE(dispatcher->AsWindowTreeHostDelegate()->OnHostKeyEvent(
&key_event2));
key_event.InitKeyEvent(ui::ET_KEY_RELEASED, ui::VKEY_A, 0);
ui::TranslatedKeyEvent key_event3(key_event, false);
- EXPECT_FALSE(dispatcher->AsRootWindowHostDelegate()->OnHostKeyEvent(
+ EXPECT_FALSE(dispatcher->AsWindowTreeHostDelegate()->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 8520dcf..6638b6d 100644
--- a/ash/autoclick/autoclick_controller.cc
+++ b/ash/autoclick/autoclick_controller.cc
@@ -199,8 +199,8 @@ void AutoclickControllerImpl::DoAutoclick() {
mouse_event_flags_ | ui::EF_LEFT_MOUSE_BUTTON,
ui::EF_LEFT_MOUSE_BUTTON);
- dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&press_event);
- dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&release_event);
+ dispatcher->AsWindowTreeHostDelegate()->OnHostMouseEvent(&press_event);
+ dispatcher->AsWindowTreeHostDelegate()->OnHostMouseEvent(&release_event);
}
// static.
diff --git a/ash/cancel_mode.cc b/ash/cancel_mode.cc
index df775d2..64c352e 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()->AsRootWindowHostDelegate()->OnHostCancelMode();
+ (*i)->dispatcher()->AsWindowTreeHostDelegate()->OnHostCancelMode();
}
}
diff --git a/ash/display/display_controller.cc b/ash/display/display_controller.cc
index d66af7d..e7bef65 100644
--- a/ash/display/display_controller.cc
+++ b/ash/display/display_controller.cc
@@ -687,7 +687,7 @@ void DisplayController::OnDisplayRemoved(const gfx::Display& display) {
base::MessageLoop::current()->DeleteSoon(FROM_HERE, controller);
}
-void DisplayController::OnRootWindowHostResized(const aura::RootWindow* root) {
+void DisplayController::OnWindowTreeHostResized(const aura::RootWindow* root) {
internal::DisplayManager* display_manager = GetDisplayManager();
gfx::Display display = GetDisplayNearestWindow(root->window());
if (display_manager->UpdateDisplayBounds(
@@ -772,7 +772,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()->
- CreateRootWindowHost(bounds_in_native);
+ CreateWindowTreeHost(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 75fe22c..dcc78ed 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 OnRootWindowHostResized(const aura::RootWindow* root) OVERRIDE;
+ virtual void OnWindowTreeHostResized(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 4ee73c0..d35f0fc0 100644
--- a/ash/display/display_info.cc
+++ b/ash/display/display_info.cc
@@ -46,7 +46,7 @@ DisplayInfo DisplayInfo::CreateFromSpecWithID(const std::string& spec,
static int64 synthesized_display_id = 2200000000LL;
#if defined(OS_WIN)
- gfx::Rect bounds_in_native(aura::RootWindowHost::GetNativeScreenSize());
+ gfx::Rect bounds_in_native(aura::WindowTreeHost::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 9a16898..7dcde64 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()->
- CreateRootWindowHost(bounds_in_native);
+ CreateWindowTreeHost(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::OnRootWindowHostResized(
+void MirrorWindowController::OnWindowTreeHostResized(
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 13460d7..86773f1 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 OnRootWindowHostResized(const aura::RootWindow* root) OVERRIDE;
+ virtual void OnWindowTreeHostResized(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 7b9f295..0c3058f 100644
--- a/ash/display/virtual_keyboard_window_controller.cc
+++ b/ash/display/virtual_keyboard_window_controller.cc
@@ -43,7 +43,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()->
- CreateRootWindowHost(bounds_in_native);
+ CreateWindowTreeHost(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 6b838c9..8ad4271 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, 0);
- Shell::GetPrimaryRootWindow()->GetDispatcher()->AsRootWindowHostDelegate()->
+ Shell::GetPrimaryRootWindow()->GetDispatcher()->AsWindowTreeHostDelegate()->
OnHostMouseEvent(&mouse_move);
}
diff --git a/ash/host/root_window_host_factory.cc b/ash/host/root_window_host_factory.cc
index 1f4cb3d..27bb614 100644
--- a/ash/host/root_window_host_factory.cc
+++ b/ash/host/root_window_host_factory.cc
@@ -8,14 +8,14 @@
namespace {
-class RootWindowHostFactoryImpl : public ash::RootWindowHostFactory {
+class WindowTreeHostFactoryImpl : public ash::WindowTreeHostFactory {
public:
- RootWindowHostFactoryImpl() {}
+ WindowTreeHostFactoryImpl() {}
- // Overridden from RootWindowHostFactory:
- virtual aura::RootWindowHost* CreateRootWindowHost(
+ // Overridden from WindowTreeHostFactory:
+ virtual aura::WindowTreeHost* CreateWindowTreeHost(
const gfx::Rect& initial_bounds) OVERRIDE {
- return aura::RootWindowHost::Create(initial_bounds);
+ return aura::WindowTreeHost::Create(initial_bounds);
}
};
@@ -24,8 +24,8 @@ class RootWindowHostFactoryImpl : public ash::RootWindowHostFactory {
namespace ash {
// static
-RootWindowHostFactory* RootWindowHostFactory::Create() {
- return new RootWindowHostFactoryImpl;
+WindowTreeHostFactory* WindowTreeHostFactory::Create() {
+ return new WindowTreeHostFactoryImpl;
}
} // namespace ash
diff --git a/ash/host/root_window_host_factory.h b/ash/host/root_window_host_factory.h
index d357d9b..d956628 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 RootWindowHost;
+class WindowTreeHost;
}
namespace ash {
-class ASH_EXPORT RootWindowHostFactory {
+class ASH_EXPORT WindowTreeHostFactory {
public:
- virtual ~RootWindowHostFactory() {}
+ virtual ~WindowTreeHostFactory() {}
- static RootWindowHostFactory* Create();
+ static WindowTreeHostFactory* Create();
- // Creates a new aura::RootWindowHost. The caller owns the returned value.
- virtual aura::RootWindowHost* CreateRootWindowHost(
+ // Creates a new aura::WindowTreeHost. The caller owns the returned value.
+ virtual aura::WindowTreeHost* CreateWindowTreeHost(
const gfx::Rect& initial_bounds) = 0;
protected:
- RootWindowHostFactory() {}
+ WindowTreeHostFactory() {}
};
} // namespace ash
diff --git a/ash/host/root_window_host_factory_win.cc b/ash/host/root_window_host_factory_win.cc
index 3255f64..a072a85 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 RootWindowHostFactoryImpl : public ash::RootWindowHostFactory {
+class WindowTreeHostFactoryImpl : public ash::WindowTreeHostFactory {
public:
- RootWindowHostFactoryImpl() {}
+ WindowTreeHostFactoryImpl() {}
- // Overridden from RootWindowHostFactory:
- virtual aura::RootWindowHost* CreateRootWindowHost(
+ // Overridden from WindowTreeHostFactory:
+ virtual aura::WindowTreeHost* CreateWindowTreeHost(
const gfx::Rect& initial_bounds) OVERRIDE {
if (base::win::GetVersion() >= base::win::VERSION_WIN8 &&
!CommandLine::ForCurrentProcess()->HasSwitch(
ash::switches::kForceAshToDesktop))
- return aura::RemoteRootWindowHostWin::Create(initial_bounds);
+ return aura::RemoteWindowTreeHostWin::Create(initial_bounds);
- return aura::RootWindowHost::Create(initial_bounds);
+ return aura::WindowTreeHost::Create(initial_bounds);
}
};
@@ -33,8 +33,8 @@ class RootWindowHostFactoryImpl : public ash::RootWindowHostFactory {
namespace ash {
// static
-RootWindowHostFactory* RootWindowHostFactory::Create() {
- return new RootWindowHostFactoryImpl;
+WindowTreeHostFactory* WindowTreeHostFactory::Create() {
+ return new WindowTreeHostFactoryImpl;
}
} // namespace ash
diff --git a/ash/shell.cc b/ash/shell.cc
index 42c1f77..0816320 100644
--- a/ash/shell.cc
+++ b/ash/shell.cc
@@ -781,7 +781,7 @@ void Shell::Init() {
focus_cycler_.reset(new internal::FocusCycler());
screen_position_controller_.reset(new internal::ScreenPositionController);
- root_window_host_factory_.reset(delegate_->CreateRootWindowHostFactory());
+ root_window_host_factory_.reset(delegate_->CreateWindowTreeHostFactory());
display_controller_->Start();
display_controller_->InitPrimaryDisplay();
diff --git a/ash/shell.h b/ash/shell.h
index 0b77ad8..e5dd42a 100644
--- a/ash/shell.h
+++ b/ash/shell.h
@@ -92,7 +92,7 @@ class NestedDispatcherController;
class NewWindowDelegate;
class PartialMagnificationController;
class PowerButtonController;
-class RootWindowHostFactory;
+class WindowTreeHostFactory;
class ScreenAsh;
class SessionStateDelegate;
class Shelf;
@@ -499,7 +499,7 @@ class ASH_EXPORT Shell
return resolution_notification_controller_.get();
}
- RootWindowHostFactory* root_window_host_factory() {
+ WindowTreeHostFactory* root_window_host_factory() {
return root_window_host_factory_.get();
}
@@ -643,7 +643,7 @@ class ASH_EXPORT Shell
scoped_ptr<internal::EventClientImpl> event_client_;
scoped_ptr<internal::EventTransformationHandler>
event_transformation_handler_;
- scoped_ptr<RootWindowHostFactory> root_window_host_factory_;
+ scoped_ptr<WindowTreeHostFactory> 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 6c95839..ab41a4c 100644
--- a/ash/shell/shell_delegate_impl.cc
+++ b/ash/shell/shell_delegate_impl.cc
@@ -162,8 +162,8 @@ ui::MenuModel* ShellDelegateImpl::CreateContextMenu(aura::Window* root) {
return new ContextMenu(root);
}
-RootWindowHostFactory* ShellDelegateImpl::CreateRootWindowHostFactory() {
- return RootWindowHostFactory::Create();
+WindowTreeHostFactory* ShellDelegateImpl::CreateWindowTreeHostFactory() {
+ return WindowTreeHostFactory::Create();
}
base::string16 ShellDelegateImpl::GetProductName() const {
diff --git a/ash/shell/shell_delegate_impl.h b/ash/shell/shell_delegate_impl.h
index 473c42c..7a1e98e 100644
--- a/ash/shell/shell_delegate_impl.h
+++ b/ash/shell/shell_delegate_impl.h
@@ -56,7 +56,7 @@ class ShellDelegateImpl : public ash::ShellDelegate {
virtual aura::client::UserActionClient* CreateUserActionClient() OVERRIDE;
virtual ui::MenuModel* CreateContextMenu(
aura::Window* root_window) OVERRIDE;
- virtual RootWindowHostFactory* CreateRootWindowHostFactory() OVERRIDE;
+ virtual WindowTreeHostFactory* CreateWindowTreeHostFactory() OVERRIDE;
virtual base::string16 GetProductName() const OVERRIDE;
private:
diff --git a/ash/shell_delegate.h b/ash/shell_delegate.h
index 5fc991e..fecb655 100644
--- a/ash/shell_delegate.h
+++ b/ash/shell_delegate.h
@@ -46,7 +46,7 @@ class AccessibilityDelegate;
class CapsLockDelegate;
class MediaDelegate;
class NewWindowDelegate;
-class RootWindowHostFactory;
+class WindowTreeHostFactory;
class SessionStateDelegate;
class ShelfDelegate;
class ShelfModel;
@@ -130,7 +130,7 @@ class ASH_EXPORT ShellDelegate {
// Creates a root window host factory. Shell takes ownership of the returned
// value.
- virtual RootWindowHostFactory* CreateRootWindowHostFactory() = 0;
+ virtual WindowTreeHostFactory* CreateWindowTreeHostFactory() = 0;
// Get the product name.
virtual base::string16 GetProductName() const = 0;
diff --git a/ash/sticky_keys/sticky_keys_controller.cc b/ash/sticky_keys/sticky_keys_controller.cc
index 5d9b93f..8640e49 100644
--- a/ash/sticky_keys/sticky_keys_controller.cc
+++ b/ash/sticky_keys/sticky_keys_controller.cc
@@ -58,7 +58,7 @@ StickyKeysHandlerDelegateImpl::~StickyKeysHandlerDelegateImpl() {
void StickyKeysHandlerDelegateImpl::DispatchKeyEvent(ui::KeyEvent* event,
aura::Window* target) {
DCHECK(target);
- target->GetDispatcher()->AsRootWindowHostDelegate()->OnHostKeyEvent(event);
+ target->GetDispatcher()->AsWindowTreeHostDelegate()->OnHostKeyEvent(event);
}
void StickyKeysHandlerDelegateImpl::DispatchMouseEvent(ui::MouseEvent* event,
@@ -67,11 +67,11 @@ void StickyKeysHandlerDelegateImpl::DispatchMouseEvent(ui::MouseEvent* event,
// We need to send a new, untransformed mouse event to the host.
if (event->IsMouseWheelEvent()) {
ui::MouseWheelEvent new_event(*static_cast<ui::MouseWheelEvent*>(event));
- target->GetDispatcher()->AsRootWindowHostDelegate()
+ target->GetDispatcher()->AsWindowTreeHostDelegate()
->OnHostMouseEvent(&new_event);
} else {
ui::MouseEvent new_event(*event, target, target->GetRootWindow());
- target->GetDispatcher()->AsRootWindowHostDelegate()
+ target->GetDispatcher()->AsWindowTreeHostDelegate()
->OnHostMouseEvent(&new_event);
}
}
@@ -80,7 +80,7 @@ void StickyKeysHandlerDelegateImpl::DispatchScrollEvent(
ui::ScrollEvent* event,
aura::Window* target) {
DCHECK(target);
- target->GetDispatcher()->AsRootWindowHostDelegate()
+ target->GetDispatcher()->AsWindowTreeHostDelegate()
->OnHostScrollEvent(event);
}
diff --git a/ash/sticky_keys/sticky_keys_unittest.cc b/ash/sticky_keys/sticky_keys_unittest.cc
index 6016da9..9474247 100644
--- a/ash/sticky_keys/sticky_keys_unittest.cc
+++ b/ash/sticky_keys/sticky_keys_unittest.cc
@@ -264,7 +264,7 @@ class StickyKeysTest : public test::AshTestBase,
handler->HandleKeyEvent(ev.get());
}
- void SendActivateStickyKeyPattern(aura::RootWindowHostDelegate* delegate,
+ void SendActivateStickyKeyPattern(aura::WindowTreeHostDelegate* delegate,
ui::KeyboardCode key_code) {
scoped_ptr<ui::KeyEvent> ev;
ev.reset(GenerateKey(true, key_code));
@@ -792,8 +792,8 @@ TEST_F(StickyKeysTest, KeyEventDispatchImpl) {
// Test the actual key event dispatch implementation.
EventBuffer buffer;
ScopedVector<ui::Event> events;
- aura::RootWindowHostDelegate* delegate = Shell::GetPrimaryRootWindow()
- ->GetDispatcher()->AsRootWindowHostDelegate();
+ aura::WindowTreeHostDelegate* delegate = Shell::GetPrimaryRootWindow()
+ ->GetDispatcher()->AsWindowTreeHostDelegate();
Shell::GetInstance()->AddPreTargetHandler(&buffer);
Shell::GetInstance()->sticky_keys_controller()->Enable(true);
@@ -831,8 +831,8 @@ TEST_F(StickyKeysTest, MouseEventDispatchImpl) {
// Test the actual sticky mouse event dispatch implementation.
EventBuffer buffer;
ScopedVector<ui::Event> events;
- aura::RootWindowHostDelegate* delegate = Shell::GetPrimaryRootWindow()
- ->GetDispatcher()->AsRootWindowHostDelegate();
+ aura::WindowTreeHostDelegate* delegate = Shell::GetPrimaryRootWindow()
+ ->GetDispatcher()->AsWindowTreeHostDelegate();
Shell::GetInstance()->AddPreTargetHandler(&buffer);
Shell::GetInstance()->sticky_keys_controller()->Enable(true);
@@ -867,8 +867,8 @@ TEST_F(StickyKeysTest, MouseWheelEventDispatchImpl) {
// Test the actual mouse wheel event dispatch implementation.
EventBuffer buffer;
ScopedVector<ui::Event> events;
- aura::RootWindowHostDelegate* delegate = Shell::GetPrimaryRootWindow()
- ->GetDispatcher()->AsRootWindowHostDelegate();
+ aura::WindowTreeHostDelegate* delegate = Shell::GetPrimaryRootWindow()
+ ->GetDispatcher()->AsWindowTreeHostDelegate();
Shell::GetInstance()->AddPreTargetHandler(&buffer);
Shell::GetInstance()->sticky_keys_controller()->Enable(true);
diff --git a/ash/test/ash_test_base.cc b/ash/test/ash_test_base.cc
index 2326900..38dc5f4 100644
--- a/ash/test/ash_test_base.cc
+++ b/ash/test/ash_test_base.cc
@@ -140,8 +140,8 @@ void AshTestBase::SetUp() {
new TestMetroViewerProcessHost(ipc_thread_->message_loop_proxy()));
CHECK(metro_viewer_host_->LaunchViewerAndWaitForConnection(
win8::test::kDefaultTestAppUserModelId));
- aura::RemoteRootWindowHostWin* root_window_host =
- aura::RemoteRootWindowHostWin::Instance();
+ aura::RemoteWindowTreeHostWin* root_window_host =
+ aura::RemoteWindowTreeHostWin::Instance();
CHECK(root_window_host != NULL);
}
ash::WindowPositioner::SetMaximizeFirstWindow(true);
diff --git a/ash/test/test_metro_viewer_process_host.cc b/ash/test/test_metro_viewer_process_host.cc
index 4af0c58..9dc3406 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::RemoteRootWindowHostWin::Instance()->Disconnected();
+ aura::RemoteWindowTreeHostWin::Instance()->Disconnected();
}
void TestMetroViewerProcessHost::OnSetTargetSurface(
gfx::NativeViewId target_surface) {
DLOG(INFO) << __FUNCTION__ << ", target_surface = " << target_surface;
HWND hwnd = reinterpret_cast<HWND>(target_surface);
- aura::RemoteRootWindowHostWin::Instance()->Connected(this, hwnd);
+ aura::RemoteWindowTreeHostWin::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 e0d6ac8..c89487a 100644
--- a/ash/test/test_shell_delegate.cc
+++ b/ash/test/test_shell_delegate.cc
@@ -143,8 +143,8 @@ ui::MenuModel* TestShellDelegate::CreateContextMenu(aura::Window* root) {
return NULL;
}
-RootWindowHostFactory* TestShellDelegate::CreateRootWindowHostFactory() {
- return RootWindowHostFactory::Create();
+WindowTreeHostFactory* TestShellDelegate::CreateWindowTreeHostFactory() {
+ return WindowTreeHostFactory::Create();
}
base::string16 TestShellDelegate::GetProductName() const {
diff --git a/ash/test/test_shell_delegate.h b/ash/test/test_shell_delegate.h
index 489b976..11445ee 100644
--- a/ash/test/test_shell_delegate.h
+++ b/ash/test/test_shell_delegate.h
@@ -51,7 +51,7 @@ class TestShellDelegate : public ShellDelegate {
virtual MediaDelegate* CreateMediaDelegate() OVERRIDE;
virtual aura::client::UserActionClient* CreateUserActionClient() OVERRIDE;
virtual ui::MenuModel* CreateContextMenu(aura::Window* root) OVERRIDE;
- virtual RootWindowHostFactory* CreateRootWindowHostFactory() OVERRIDE;
+ virtual WindowTreeHostFactory* CreateWindowTreeHostFactory() 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 c0fd2a0..57bb9e5 100644
--- a/ash/wm/caption_buttons/frame_maximize_button_unittest.cc
+++ b/ash/wm/caption_buttons/frame_maximize_button_unittest.cc
@@ -558,7 +558,7 @@ TEST_F(FrameMaximizeButtonTest, MaximizeTap) {
button_pos,
kTouchId,
ui::EventTimeForNow());
- dispatcher->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
button_pos.Offset(9, 8);
ui::TouchEvent release(
@@ -566,7 +566,7 @@ TEST_F(FrameMaximizeButtonTest, MaximizeTap) {
button_pos,
kTouchId,
press.time_stamp() + base::TimeDelta::FromMilliseconds(50));
- dispatcher->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher->AsWindowTreeHostDelegate()->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 cffbb6b..be34131 100644
--- a/ash/wm/lock_state_controller.cc
+++ b/ash/wm/lock_state_controller.cc
@@ -289,7 +289,7 @@ void LockStateController::SetLockScreenDisplayedCallback(
lock_screen_displayed_callback_ = callback;
}
-void LockStateController::OnRootWindowHostCloseRequested(
+void LockStateController::OnWindowTreeHostCloseRequested(
const aura::RootWindow*) {
Shell::GetInstance()->delegate()->Exit();
}
diff --git a/ash/wm/lock_state_controller.h b/ash/wm/lock_state_controller.h
index c2e7a6a..bcfd64f 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 OnRootWindowHostCloseRequested(
+ virtual void OnWindowTreeHostCloseRequested(
const aura::RootWindow* root) OVERRIDE;
// ShellObserver overrides:
diff --git a/ash/wm/system_gesture_event_filter_unittest.cc b/ash/wm/system_gesture_event_filter_unittest.cc
index 8335b22..72f5f90 100644
--- a/ash/wm/system_gesture_event_filter_unittest.cc
+++ b/ash/wm/system_gesture_event_filter_unittest.cc
@@ -256,7 +256,7 @@ TEST_P(SystemGestureEventFilterTest, LongPressAffordanceStateOnCaptureLoss) {
gfx::Point(10, 10),
kTouchId,
ui::EventTimeForNow());
- root_window->GetDispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(
+ root_window->GetDispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(
&press);
EXPECT_TRUE(window1->HasCapture());
diff --git a/ash/wm/window_manager_unittest.cc b/ash/wm/window_manager_unittest.cc
index a30715f..19a247e 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->AsRootWindowHostDelegate()->OnHostKeyEvent(&keyev);
+ dispatcher->AsWindowTreeHostDelegate()->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->AsRootWindowHostDelegate()->OnHostTouchEvent(&touchev);
+ dispatcher->AsWindowTreeHostDelegate()->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->AsRootWindowHostDelegate()->OnHostKeyEvent(&keyev);
+ dispatcher->AsWindowTreeHostDelegate()->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->AsRootWindowHostDelegate()->OnHostKeyEvent(&keyev));
+ EXPECT_FALSE(dispatcher->AsWindowTreeHostDelegate()->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->AsRootWindowHostDelegate()->OnHostKeyEvent(&keyev));
+ EXPECT_FALSE(dispatcher->AsWindowTreeHostDelegate()->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->AsRootWindowHostDelegate()->OnHostTouchEvent(&touchev1);
+ dispatcher->AsWindowTreeHostDelegate()->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->AsRootWindowHostDelegate()->OnHostTouchEvent(&touchev2);
+ dispatcher->AsWindowTreeHostDelegate()->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, 0, 0);
- dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&move1);
+ dispatcher->AsWindowTreeHostDelegate()->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, 0, 0);
- dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&move2);
+ dispatcher->AsWindowTreeHostDelegate()->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, 0, 0);
- dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&move1);
+ dispatcher->AsWindowTreeHostDelegate()->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, 0, 0);
- dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&move2);
+ dispatcher->AsWindowTreeHostDelegate()->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, 0, 0);
- dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&move1);
+ dispatcher->AsWindowTreeHostDelegate()->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, 0, 0);
- dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&move2);
+ dispatcher->AsWindowTreeHostDelegate()->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, 0, 0);
- dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&move1);
+ dispatcher->AsWindowTreeHostDelegate()->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, 0, 0);
- dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&move2);
+ dispatcher->AsWindowTreeHostDelegate()->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, 0, 0);
- dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&move1);
+ dispatcher->AsWindowTreeHostDelegate()->OnHostMouseEvent(&move1);
EXPECT_EQ(ui::kCursorNull, dispatcher->last_cursor().native_type());
}
}
@@ -609,14 +609,14 @@ TEST_F(WindowManagerTest, MAYBE_TransformActivate) {
ui::EF_LEFT_MOUSE_BUTTON,
ui::EF_LEFT_MOUSE_BUTTON);
aura::WindowEventDispatcher* dispatcher = root_window->GetDispatcher();
- dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&mouseev1);
+ dispatcher->AsWindowTreeHostDelegate()->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,
ui::EF_LEFT_MOUSE_BUTTON);
- dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&mouseup);
+ dispatcher->AsWindowTreeHostDelegate()->OnHostMouseEvent(&mouseup);
gfx::Point hit_point(5, 15);
transform.TransformPoint(&hit_point);
@@ -625,7 +625,7 @@ TEST_F(WindowManagerTest, MAYBE_TransformActivate) {
hit_point,
ui::EF_LEFT_MOUSE_BUTTON,
ui::EF_LEFT_MOUSE_BUTTON);
- dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&mouseev2);
+ dispatcher->AsWindowTreeHostDelegate()->OnHostMouseEvent(&mouseev2);
EXPECT_TRUE(wm::IsActiveWindow(w1.get()));
EXPECT_EQ(w1.get(),
aura::client::GetFocusClient(w1.get())->GetFocusedWindow());
@@ -658,10 +658,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->AsRootWindowHostDelegate()->OnHostKeyEvent(&key_event);
+ dispatcher->AsWindowTreeHostDelegate()->OnHostKeyEvent(&key_event);
ui::MouseEvent mouse_pressed(
ui::ET_MOUSE_PRESSED, gfx::Point(0, 0), gfx::Point(0, 0), 0, 0);
- dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&mouse_pressed);
+ dispatcher->AsWindowTreeHostDelegate()->OnHostMouseEvent(&mouse_pressed);
// Both filters should get the events.
EXPECT_EQ(1, f1->num_key_events());
@@ -677,10 +677,10 @@ TEST_F(WindowManagerTest, AdditionalFilters) {
f1->set_mouse_event_handling_result(ui::ER_CONSUMED);
// Dispatches events.
- dispatcher->AsRootWindowHostDelegate()->OnHostKeyEvent(&key_event);
+ dispatcher->AsWindowTreeHostDelegate()->OnHostKeyEvent(&key_event);
ui::MouseEvent mouse_released(
ui::ET_MOUSE_RELEASED, gfx::Point(0, 0), gfx::Point(0, 0), 0, 0);
- dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&mouse_released);
+ dispatcher->AsWindowTreeHostDelegate()->OnHostMouseEvent(&mouse_released);
// f1 should still get the events but f2 no longer gets them.
EXPECT_EQ(1, f1->num_key_events());
@@ -695,8 +695,8 @@ TEST_F(WindowManagerTest, AdditionalFilters) {
env_filter->RemoveHandler(f1.get());
// Dispatches events.
- dispatcher->AsRootWindowHostDelegate()->OnHostKeyEvent(&key_event);
- dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&mouse_pressed);
+ dispatcher->AsWindowTreeHostDelegate()->OnHostKeyEvent(&key_event);
+ dispatcher->AsWindowTreeHostDelegate()->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 ffaf210..dcb1e18 100644
--- a/ash/wm/workspace/workspace_event_handler_unittest.cc
+++ b/ash/wm/workspace/workspace_event_handler_unittest.cc
@@ -274,12 +274,12 @@ TEST_F(WorkspaceEventHandlerTest, DoubleClickCaptionTogglesMaximize) {
ui::EF_MIDDLE_MOUSE_BUTTON | ui::EF_IS_DOUBLE_CLICK,
ui::EF_MIDDLE_MOUSE_BUTTON);
aura::WindowEventDispatcher* dispatcher = root->GetDispatcher();
- dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&press);
+ dispatcher->AsWindowTreeHostDelegate()->OnHostMouseEvent(&press);
ui::MouseEvent release(ui::ET_MOUSE_RELEASED, generator.current_location(),
generator.current_location(),
ui::EF_IS_DOUBLE_CLICK,
ui::EF_MIDDLE_MOUSE_BUTTON);
- dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&release);
+ dispatcher->AsWindowTreeHostDelegate()->OnHostMouseEvent(&release);
EXPECT_FALSE(window_state->IsMaximized());
EXPECT_EQ("1,2 30x40", window->bounds().ToString());
diff --git a/chrome/browser/chromeos/input_method/input_method_engine.cc b/chrome/browser/chromeos/input_method/input_method_engine.cc
index 9751fa2..6fd312d 100644
--- a/chrome/browser/chromeos/input_method/input_method_engine.cc
+++ b/chrome/browser/chromeos/input_method/input_method_engine.cc
@@ -226,7 +226,7 @@ bool InputMethodEngine::SendKeyEvents(
flags |= event.caps_lock ? ui::EF_CAPS_LOCK_DOWN : ui::EF_NONE;
ui::KeyEvent ui_event(type, key_code, code, flags, false /* is_char */);
- dispatcher->AsRootWindowHostDelegate()->OnHostKeyEvent(&ui_event);
+ dispatcher->AsWindowTreeHostDelegate()->OnHostKeyEvent(&ui_event);
}
return true;
}
diff --git a/chrome/browser/chromeos/system_key_event_listener.cc b/chrome/browser/chromeos/system_key_event_listener.cc
index d148977..80a2324 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::RootWindowHost.
+ // TODO(yusukes): Move this part to aura::WindowTreeHost.
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 84fc067..0bee956 100644
--- a/chrome/browser/extensions/api/bookmarks/bookmarks_api.cc
+++ b/chrome/browser/extensions/api/bookmarks/bookmarks_api.cc
@@ -949,7 +949,7 @@ void BookmarksIOFunction::ShowSelectFileDialog(
#if defined(OS_WIN) && defined(USE_AURA)
if (!owning_window &&
chrome::GetActiveDesktop() == chrome::HOST_DESKTOP_TYPE_ASH)
- owning_window = aura::RemoteRootWindowHostWin::Instance()->GetAshWindow();
+ owning_window = aura::RemoteWindowTreeHostWin::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/extensions/app_background_page_apitest.cc b/chrome/browser/extensions/app_background_page_apitest.cc
index c221f4f..824c46a 100644
--- a/chrome/browser/extensions/app_background_page_apitest.cc
+++ b/chrome/browser/extensions/app_background_page_apitest.cc
@@ -612,7 +612,7 @@ IN_PROC_BROWSER_TEST_F(AppBackgroundPageNaClTest, BackgroundKeepaliveActive) {
// Verify that nacl modules that go idle will not send keepalive impulses.
// Disabled on windows due to Win XP failures:
-// DesktopRootWindowHostWin::HandleCreate not implemented. crbug.com/331954
+// DesktopWindowTreeHostWin::HandleCreate not implemented. crbug.com/331954
#if defined(OS_WIN)
#define MAYBE_BackgroundKeepaliveIdle DISABLED_BackgroundKeepaliveIdle
#else
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 4eeb913..9971351 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
@@ -81,7 +81,7 @@ void ChromeMetroViewerProcessHost::OnChannelError() {
// connected.
::SetEnvironmentVariableA(env_vars::kMetroConnected, NULL);
- aura::RemoteRootWindowHostWin::Instance()->Disconnected();
+ aura::RemoteWindowTreeHostWin::Instance()->Disconnected();
g_browser_process->ReleaseModule();
// If browser is trying to quit, we shouldn't reenter the process.
@@ -123,7 +123,7 @@ void ChromeMetroViewerProcessHost::OnSetTargetSurface(
HWND hwnd = reinterpret_cast<HWND>(target_surface);
// Tell our root window host that the viewer has connected.
- aura::RemoteRootWindowHostWin::Instance()->Connected(this, hwnd);
+ aura::RemoteWindowTreeHostWin::Instance()->Connected(this, hwnd);
// On Windows 8 ASH we default to SHOW_STATE_MAXIMIZED for the browser
// window. This is to ensure that we honor metro app conventions by default.
@@ -154,6 +154,6 @@ void ChromeMetroViewerProcessHost::OnWindowSizeChanged(uint32 width,
base::StringPrintf("%dx%d", width, height)));
ash::Shell::GetInstance()->display_manager()->OnNativeDisplaysChanged(
info_list);
- aura::RemoteRootWindowHostWin::Instance()->HandleWindowSizeChanged(width,
+ aura::RemoteWindowTreeHostWin::Instance()->HandleWindowSizeChanged(width,
height);
}
diff --git a/chrome/browser/plugins/plugin_infobar_delegates.cc b/chrome/browser/plugins/plugin_infobar_delegates.cc
index 88bcd6d..e4933fa 100644
--- a/chrome/browser/plugins/plugin_infobar_delegates.cc
+++ b/chrome/browser/plugins/plugin_infobar_delegates.cc
@@ -497,7 +497,7 @@ void LaunchDesktopInstanceHelper(const base::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::RemoteRootWindowHostWin::Instance()->HandleOpenURLOnDesktop(
+ aura::RemoteWindowTreeHostWin::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 dc76edc..a3d8878 100644
--- a/chrome/browser/ui/ash/chrome_shell_delegate.cc
+++ b/chrome/browser/ui/ash/chrome_shell_delegate.cc
@@ -136,8 +136,8 @@ ui::MenuModel* ChromeShellDelegate::CreateContextMenu(aura::Window* root) {
return new LauncherContextMenu(shelf_delegate_, root);
}
-ash::RootWindowHostFactory* ChromeShellDelegate::CreateRootWindowHostFactory() {
- return ash::RootWindowHostFactory::Create();
+ash::WindowTreeHostFactory* ChromeShellDelegate::CreateWindowTreeHostFactory() {
+ return ash::WindowTreeHostFactory::Create();
}
base::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 ad360e0..72edd56 100644
--- a/chrome/browser/ui/ash/chrome_shell_delegate.h
+++ b/chrome/browser/ui/ash/chrome_shell_delegate.h
@@ -58,7 +58,7 @@ class ChromeShellDelegate : public ash::ShellDelegate,
virtual ash::MediaDelegate* CreateMediaDelegate() OVERRIDE;
virtual aura::client::UserActionClient* CreateUserActionClient() OVERRIDE;
virtual ui::MenuModel* CreateContextMenu(aura::Window* root) OVERRIDE;
- virtual ash::RootWindowHostFactory* CreateRootWindowHostFactory() OVERRIDE;
+ virtual ash::WindowTreeHostFactory* CreateWindowTreeHostFactory() OVERRIDE;
virtual base::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 21dd80d..393ffaa 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::RemoteRootWindowHostWin::Instance()->HandleOpenURLOnDesktop(
+ aura::RemoteWindowTreeHostWin::Instance()->HandleOpenURLOnDesktop(
exe_path, base::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 736d848..32ac371 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 DesktopRootWindowHost implementation can be mapped
+ // Only windows hosted by a DesktopWindowTreeHost 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::DesktopRootWindowHostWin::GetContentWindowForHWND(
+ return views::DesktopWindowTreeHostWin::GetContentWindowForHWND(
root_window->host()->GetAcceleratedWidget()) != NULL;
#elif defined(USE_X11)
- return views::DesktopRootWindowHostX11::GetContentWindowForXID(
+ return views::DesktopWindowTreeHostX11::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 1ae149b3..9272016 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
-// RootWindowHost activations.
+// WindowTreeHost 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
- // RootWindowHost. This desktop type may no longer exist (e.g., the Ash
+ // WindowTreeHost. 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 DesktopRootWindowHost.
+ // Returns true if |root_window| is hosted by a DesktopWindowTreeHost.
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 47dce8c..298e72b 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::DesktopRootWindowHostX11::GetContentWindowForXID(xid);
+ return views::DesktopWindowTreeHostX11::GetContentWindowForXID(xid);
}
#else
// static
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 70cbcf2..0d50a9b 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 DesktopRootWindowHost;
+class DesktopWindowTreeHost;
namespace internal {
class NativeWidgetDelegate;
}
}
// Interface to a platform specific browser frame implementation. The object
-// implementing this interface will also implement views::DesktopRootWindowHost.
-class BrowserDesktopRootWindowHost {
+// implementing this interface will also implement views::DesktopWindowTreeHost.
+class BrowserDesktopWindowTreeHost {
public:
// BDRWH is owned by the RootWindow.
- static BrowserDesktopRootWindowHost* CreateBrowserDesktopRootWindowHost(
+ static BrowserDesktopWindowTreeHost* CreateBrowserDesktopWindowTreeHost(
views::internal::NativeWidgetDelegate* native_widget_delegate,
views::DesktopNativeWidgetAura* desktop_native_widget_aura,
BrowserView* browser_view,
BrowserFrame* browser_frame);
- virtual views::DesktopRootWindowHost* AsDesktopRootWindowHost() = 0;
+ virtual views::DesktopWindowTreeHost* AsDesktopWindowTreeHost() = 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 951106e..43375ae 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 BrowserDesktopRootWindowHostWin so that it uses the windows
+// necessary for BrowserDesktopWindowTreeHostWin 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
////////////////////////////////////////////////////////////////////////////////
-// BrowserDesktopRootWindowHostWin, public:
+// BrowserDesktopWindowTreeHostWin, public:
-BrowserDesktopRootWindowHostWin::BrowserDesktopRootWindowHostWin(
+BrowserDesktopWindowTreeHostWin::BrowserDesktopWindowTreeHostWin(
views::internal::NativeWidgetDelegate* native_widget_delegate,
views::DesktopNativeWidgetAura* desktop_native_widget_aura,
BrowserView* browser_view,
BrowserFrame* browser_frame)
- : DesktopRootWindowHostWin(native_widget_delegate,
+ : DesktopWindowTreeHostWin(native_widget_delegate,
desktop_native_widget_aura),
browser_view_(browser_view),
browser_frame_(browser_frame),
@@ -90,10 +90,10 @@ BrowserDesktopRootWindowHostWin::BrowserDesktopRootWindowHostWin(
browser_frame->SetThemeProvider(theme_provider.Pass());
}
-BrowserDesktopRootWindowHostWin::~BrowserDesktopRootWindowHostWin() {
+BrowserDesktopWindowTreeHostWin::~BrowserDesktopWindowTreeHostWin() {
}
-views::NativeMenuWin* BrowserDesktopRootWindowHostWin::GetSystemMenu() {
+views::NativeMenuWin* BrowserDesktopWindowTreeHostWin::GetSystemMenu() {
if (!system_menu_.get()) {
SystemMenuInsertionDelegateWin insertion_delegate;
system_menu_.reset(
@@ -105,25 +105,25 @@ views::NativeMenuWin* BrowserDesktopRootWindowHostWin::GetSystemMenu() {
}
////////////////////////////////////////////////////////////////////////////////
-// BrowserDesktopRootWindowHostWin, BrowserDesktopRootWindowHost implementation:
+// BrowserDesktopWindowTreeHostWin, BrowserDesktopWindowTreeHost implementation:
-views::DesktopRootWindowHost*
- BrowserDesktopRootWindowHostWin::AsDesktopRootWindowHost() {
+views::DesktopWindowTreeHost*
+ BrowserDesktopWindowTreeHostWin::AsDesktopWindowTreeHost() {
return this;
}
-int BrowserDesktopRootWindowHostWin::GetMinimizeButtonOffset() const {
+int BrowserDesktopWindowTreeHostWin::GetMinimizeButtonOffset() const {
return minimize_button_metrics_.GetMinimizeButtonOffsetX();
}
-bool BrowserDesktopRootWindowHostWin::UsesNativeSystemMenu() const {
+bool BrowserDesktopWindowTreeHostWin::UsesNativeSystemMenu() const {
return true;
}
////////////////////////////////////////////////////////////////////////////////
-// BrowserDesktopRootWindowHostWin, views::DesktopRootWindowHostWin overrides:
+// BrowserDesktopWindowTreeHostWin, views::DesktopWindowTreeHostWin overrides:
-int BrowserDesktopRootWindowHostWin::GetInitialShowState() const {
+int BrowserDesktopWindowTreeHostWin::GetInitialShowState() const {
STARTUPINFO si = {0};
si.cb = sizeof(si);
si.dwFlags = STARTF_USESHOWWINDOW;
@@ -131,7 +131,7 @@ int BrowserDesktopRootWindowHostWin::GetInitialShowState() const {
return si.wShowWindow;
}
-bool BrowserDesktopRootWindowHostWin::GetClientAreaInsets(
+bool BrowserDesktopWindowTreeHostWin::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 BrowserDesktopRootWindowHostWin::GetClientAreaInsets(
return true;
}
-void BrowserDesktopRootWindowHostWin::HandleCreate() {
- DesktopRootWindowHostWin::HandleCreate();
+void BrowserDesktopWindowTreeHostWin::HandleCreate() {
+ DesktopWindowTreeHostWin::HandleCreate();
browser_window_property_manager_ =
BrowserWindowPropertyManager::CreateBrowserWindowPropertyManager(
browser_view_);
@@ -160,7 +160,7 @@ void BrowserDesktopRootWindowHostWin::HandleCreate() {
browser_window_property_manager_->UpdateWindowProperties(GetHWND());
}
-void BrowserDesktopRootWindowHostWin::HandleFrameChanged() {
+void BrowserDesktopWindowTreeHostWin::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 BrowserDesktopRootWindowHostWin::HandleFrameChanged() {
// We need to update the glass region on or off before the base class adjusts
// the window region.
UpdateDWMFrame();
- DesktopRootWindowHostWin::HandleFrameChanged();
+ DesktopWindowTreeHostWin::HandleFrameChanged();
}
-bool BrowserDesktopRootWindowHostWin::PreHandleMSG(UINT message,
+bool BrowserDesktopWindowTreeHostWin::PreHandleMSG(UINT message,
WPARAM w_param,
LPARAM l_param,
LRESULT* result) {
@@ -187,11 +187,11 @@ bool BrowserDesktopRootWindowHostWin::PreHandleMSG(UINT message,
GetSystemMenu()->UpdateStates();
return true;
}
- return DesktopRootWindowHostWin::PreHandleMSG(
+ return DesktopWindowTreeHostWin::PreHandleMSG(
message, w_param, l_param, result);
}
-void BrowserDesktopRootWindowHostWin::PostHandleMSG(UINT message,
+void BrowserDesktopWindowTreeHostWin::PostHandleMSG(UINT message,
WPARAM w_param,
LPARAM l_param) {
switch (message) {
@@ -220,7 +220,7 @@ void BrowserDesktopRootWindowHostWin::PostHandleMSG(UINT message,
break;
}
case WM_ERASEBKGND:
- if (!did_gdi_clear_ && DesktopRootWindowHostWin::ShouldUseNativeFrame()) {
+ if (!did_gdi_clear_ && DesktopWindowTreeHostWin::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 BrowserDesktopRootWindowHostWin::PostHandleMSG(UINT message,
}
-bool BrowserDesktopRootWindowHostWin::IsUsingCustomFrame() const {
+bool BrowserDesktopWindowTreeHostWin::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() &&
- !DesktopRootWindowHostWin::IsUsingCustomFrame()) {
+ !DesktopWindowTreeHostWin::IsUsingCustomFrame()) {
return false;
}
@@ -253,8 +253,8 @@ bool BrowserDesktopRootWindowHostWin::IsUsingCustomFrame() const {
return !GetWidget()->GetThemeProvider()->ShouldUseNativeFrame();
}
-bool BrowserDesktopRootWindowHostWin::ShouldUseNativeFrame() {
- if (!views::DesktopRootWindowHostWin::ShouldUseNativeFrame())
+bool BrowserDesktopWindowTreeHostWin::ShouldUseNativeFrame() {
+ if (!views::DesktopWindowTreeHostWin::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 BrowserDesktopRootWindowHostWin::ShouldUseNativeFrame() {
GetWidget()->GetThemeProvider());
}
-void BrowserDesktopRootWindowHostWin::FrameTypeChanged() {
- views::DesktopRootWindowHostWin::FrameTypeChanged();
+void BrowserDesktopWindowTreeHostWin::FrameTypeChanged() {
+ views::DesktopWindowTreeHostWin::FrameTypeChanged();
did_gdi_clear_ = false;
}
////////////////////////////////////////////////////////////////////////////////
-// BrowserDesktopRootWindowHostWin, private:
+// BrowserDesktopWindowTreeHostWin, private:
-void BrowserDesktopRootWindowHostWin::UpdateDWMFrame() {
+void BrowserDesktopWindowTreeHostWin::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 BrowserDesktopRootWindowHostWin::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() ||
- !DesktopRootWindowHostWin::ShouldUseNativeFrame())
+ !DesktopWindowTreeHostWin::ShouldUseNativeFrame())
return;
MARGINS margins = GetDWMFrameMargins();
@@ -290,7 +290,7 @@ void BrowserDesktopRootWindowHostWin::UpdateDWMFrame() {
DwmExtendFrameIntoClientArea(GetHWND(), &margins);
}
-MARGINS BrowserDesktopRootWindowHostWin::GetDWMFrameMargins() const {
+MARGINS BrowserDesktopWindowTreeHostWin::GetDWMFrameMargins() const {
MARGINS margins = { 0 };
// If the opaque frame is visible, we use the default (zero) margins.
@@ -318,16 +318,16 @@ MARGINS BrowserDesktopRootWindowHostWin::GetDWMFrameMargins() const {
}
////////////////////////////////////////////////////////////////////////////////
-// BrowserDesktopRootWindowHost, public:
+// BrowserDesktopWindowTreeHost, public:
// static
-BrowserDesktopRootWindowHost*
- BrowserDesktopRootWindowHost::CreateBrowserDesktopRootWindowHost(
+BrowserDesktopWindowTreeHost*
+ BrowserDesktopWindowTreeHost::CreateBrowserDesktopWindowTreeHost(
views::internal::NativeWidgetDelegate* native_widget_delegate,
views::DesktopNativeWidgetAura* desktop_native_widget_aura,
BrowserView* browser_view,
BrowserFrame* browser_frame) {
- return new BrowserDesktopRootWindowHostWin(native_widget_delegate,
+ return new BrowserDesktopWindowTreeHostWin(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 32df404..27ab855 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 BrowserDesktopRootWindowHostWin : public BrowserDesktopRootWindowHost,
- public views::DesktopRootWindowHostWin {
+class BrowserDesktopWindowTreeHostWin : public BrowserDesktopWindowTreeHost,
+ public views::DesktopWindowTreeHostWin {
public:
- BrowserDesktopRootWindowHostWin(
+ BrowserDesktopWindowTreeHostWin(
views::internal::NativeWidgetDelegate* native_widget_delegate,
views::DesktopNativeWidgetAura* desktop_native_widget_aura,
BrowserView* browser_view,
BrowserFrame* browser_frame);
- virtual ~BrowserDesktopRootWindowHostWin();
+ virtual ~BrowserDesktopWindowTreeHostWin();
private:
views::NativeMenuWin* GetSystemMenu();
- // Overridden from BrowserDesktopRootWindowHost:
- virtual DesktopRootWindowHost* AsDesktopRootWindowHost() OVERRIDE;
+ // Overridden from BrowserDesktopWindowTreeHost:
+ virtual DesktopWindowTreeHost* AsDesktopWindowTreeHost() OVERRIDE;
virtual int GetMinimizeButtonOffset() const OVERRIDE;
virtual bool UsesNativeSystemMenu() const OVERRIDE;
- // Overridden from DesktopRootWindowHostWin:
+ // Overridden from DesktopWindowTreeHostWin:
virtual int GetInitialShowState() const OVERRIDE;
virtual bool GetClientAreaInsets(gfx::Insets* insets) const OVERRIDE;
virtual void HandleCreate() OVERRIDE;
@@ -72,7 +72,7 @@ class BrowserDesktopRootWindowHostWin : public BrowserDesktopRootWindowHost,
// Necessary to avoid corruption on NC paint in Aero mode.
bool did_gdi_clear_;
- DISALLOW_COPY_AND_ASSIGN(BrowserDesktopRootWindowHostWin);
+ DISALLOW_COPY_AND_ASSIGN(BrowserDesktopWindowTreeHostWin);
};
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 c5e52ce..2ff9be1 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"
////////////////////////////////////////////////////////////////////////////////
-// BrowserDesktopRootWindowHostX11, public:
+// BrowserDesktopWindowTreeHostX11, public:
-BrowserDesktopRootWindowHostX11::BrowserDesktopRootWindowHostX11(
+BrowserDesktopWindowTreeHostX11::BrowserDesktopWindowTreeHostX11(
views::internal::NativeWidgetDelegate* native_widget_delegate,
views::DesktopNativeWidgetAura* desktop_native_widget_aura,
BrowserView* browser_view)
- : DesktopRootWindowHostX11(native_widget_delegate,
+ : DesktopWindowTreeHostX11(native_widget_delegate,
desktop_native_widget_aura),
browser_view_(browser_view) {
}
-BrowserDesktopRootWindowHostX11::~BrowserDesktopRootWindowHostX11() {
+BrowserDesktopWindowTreeHostX11::~BrowserDesktopWindowTreeHostX11() {
}
////////////////////////////////////////////////////////////////////////////////
-// BrowserDesktopRootWindowHostX11,
-// BrowserDesktopRootWindowHost implementation:
+// BrowserDesktopWindowTreeHostX11,
+// BrowserDesktopWindowTreeHost implementation:
-views::DesktopRootWindowHost*
- BrowserDesktopRootWindowHostX11::AsDesktopRootWindowHost() {
+views::DesktopWindowTreeHost*
+ BrowserDesktopWindowTreeHostX11::AsDesktopWindowTreeHost() {
return this;
}
-int BrowserDesktopRootWindowHostX11::GetMinimizeButtonOffset() const {
+int BrowserDesktopWindowTreeHostX11::GetMinimizeButtonOffset() const {
return 0;
}
-bool BrowserDesktopRootWindowHostX11::UsesNativeSystemMenu() const {
+bool BrowserDesktopWindowTreeHostX11::UsesNativeSystemMenu() const {
return false;
}
////////////////////////////////////////////////////////////////////////////////
-// BrowserDesktopRootWindowHostX11,
-// views::DesktopRootWindowHostX11 implementation:
+// BrowserDesktopWindowTreeHostX11,
+// views::DesktopWindowTreeHostX11 implementation:
-void BrowserDesktopRootWindowHostX11::Init(
+void BrowserDesktopWindowTreeHostX11::Init(
aura::Window* content_window,
const views::Widget::InitParams& params,
aura::RootWindow::CreateParams* rw_create_params) {
- views::DesktopRootWindowHostX11::Init(content_window, params,
+ views::DesktopWindowTreeHostX11::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 BrowserDesktopRootWindowHostX11::Init(
global_menu_bar_x11_.reset(new GlobalMenuBarX11(browser_view_, this));
}
-void BrowserDesktopRootWindowHostX11::CloseNow() {
+void BrowserDesktopWindowTreeHostX11::CloseNow() {
global_menu_bar_x11_.reset();
- DesktopRootWindowHostX11::CloseNow();
+ DesktopWindowTreeHostX11::CloseNow();
}
////////////////////////////////////////////////////////////////////////////////
-// BrowserDesktopRootWindowHost, public:
+// BrowserDesktopWindowTreeHost, public:
// static
-BrowserDesktopRootWindowHost*
- BrowserDesktopRootWindowHost::CreateBrowserDesktopRootWindowHost(
+BrowserDesktopWindowTreeHost*
+ BrowserDesktopWindowTreeHost::CreateBrowserDesktopWindowTreeHost(
views::internal::NativeWidgetDelegate* native_widget_delegate,
views::DesktopNativeWidgetAura* desktop_native_widget_aura,
BrowserView* browser_view,
BrowserFrame* browser_frame) {
- return new BrowserDesktopRootWindowHostX11(native_widget_delegate,
+ return new BrowserDesktopWindowTreeHostX11(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 b7355c8..2548797 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 BrowserDesktopRootWindowHostX11
- : public BrowserDesktopRootWindowHost,
- public views::DesktopRootWindowHostX11 {
+class BrowserDesktopWindowTreeHostX11
+ : public BrowserDesktopWindowTreeHost,
+ public views::DesktopWindowTreeHostX11 {
public:
- BrowserDesktopRootWindowHostX11(
+ BrowserDesktopWindowTreeHostX11(
views::internal::NativeWidgetDelegate* native_widget_delegate,
views::DesktopNativeWidgetAura* desktop_native_widget_aura,
BrowserView* browser_view);
- virtual ~BrowserDesktopRootWindowHostX11();
+ virtual ~BrowserDesktopWindowTreeHostX11();
private:
- // Overridden from BrowserDesktopRootWindowHost:
- virtual DesktopRootWindowHost* AsDesktopRootWindowHost() OVERRIDE;
+ // Overridden from BrowserDesktopWindowTreeHost:
+ virtual DesktopWindowTreeHost* AsDesktopWindowTreeHost() OVERRIDE;
virtual int GetMinimizeButtonOffset() const OVERRIDE;
virtual bool UsesNativeSystemMenu() const OVERRIDE;
- // Overridden from views::DesktopRootWindowHostX11:
+ // Overridden from views::DesktopWindowTreeHostX11:
virtual void Init(
aura::Window* content_window,
const views::Widget::InitParams& params,
@@ -46,7 +46,7 @@ class BrowserDesktopRootWindowHostX11
// xids to the same menu bar.
scoped_ptr<GlobalMenuBarX11> global_menu_bar_x11_;
- DISALLOW_COPY_AND_ASSIGN(BrowserDesktopRootWindowHostX11);
+ DISALLOW_COPY_AND_ASSIGN(BrowserDesktopWindowTreeHostX11);
};
#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 cc3b619..11349343 100644
--- a/chrome/browser/ui/views/frame/browser_frame_ashwin.cc
+++ b/chrome/browser/ui/views/frame/browser_frame_ashwin.cc
@@ -30,7 +30,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::RemoteRootWindowHostWin::Instance()->IsForegroundWindow() &&
+ if (!aura::RemoteWindowTreeHostWin::Instance()->IsForegroundWindow() &&
!browser_shutdown::IsTryingToQuit()) {
// PostTask because ActivateMetroChrome can not be called nested in another
// ::SendMessage().
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 f5284b2..8b5bb71 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_ =
- BrowserDesktopRootWindowHost::CreateBrowserDesktopRootWindowHost(
+ BrowserDesktopWindowTreeHost::CreateBrowserDesktopWindowTreeHost(
browser_frame_,
this,
browser_view_,
browser_frame_);
views::Widget::InitParams modified_params = params;
modified_params.desktop_root_window_host =
- browser_desktop_root_window_host_->AsDesktopRootWindowHost();
+ browser_desktop_root_window_host_->AsDesktopWindowTreeHost();
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 b43f588..0ad3f25 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 BrowserDesktopRootWindowHost;
+class BrowserDesktopWindowTreeHost;
class BrowserFrame;
class BrowserView;
@@ -61,7 +61,7 @@ class DesktopBrowserFrameAura : public views::DesktopNativeWidgetAura,
BrowserFrame* browser_frame_;
// Owned by the RootWindow.
- BrowserDesktopRootWindowHost* browser_desktop_root_window_host_;
+ BrowserDesktopWindowTreeHost* 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 c32b383..403a641 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,
- BrowserDesktopRootWindowHostX11* host)
+ BrowserDesktopWindowTreeHostX11* 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 269153e..f788881 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 BrowserDesktopRootWindowHostX11;
+class BrowserDesktopWindowTreeHostX11;
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::DesktopRootWindowHostObserverX11 {
+ public views::DesktopWindowTreeHostObserverX11 {
public:
GlobalMenuBarX11(BrowserView* browser_view,
- BrowserDesktopRootWindowHostX11* host);
+ BrowserDesktopWindowTreeHostX11* 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::DesktopRootWindowHostObserverX11:
+ // Overridden from views::DesktopWindowTreeHostObserverX11:
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_;
- BrowserDesktopRootWindowHostX11* host_;
+ BrowserDesktopWindowTreeHostX11* 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 94e2775..6fb6d353 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 BrowserDesktopRootWindowHostWin and BrowserFrameWin.
+// code is shared between BrowserDesktopWindowTreeHostWin 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 e52aa11..b999221 100644
--- a/chrome/browser/ui/views/omnibox/omnibox_view_views_browsertest.cc
+++ b/chrome/browser/ui/views/omnibox/omnibox_view_views_browsertest.cc
@@ -66,9 +66,9 @@ class OmniboxViewViewsTest : public InProcessBrowserTest {
#if defined(USE_AURA)
// Tap the center of the browser window.
void TapBrowserWindowCenter() {
- aura::RootWindowHostDelegate* rwhd =
+ aura::WindowTreeHostDelegate* rwhd =
browser()->window()->GetNativeWindow()->GetRootWindow()->
- GetDispatcher()->AsRootWindowHostDelegate();
+ GetDispatcher()->AsWindowTreeHostDelegate();
gfx::Point center = BrowserView::GetBrowserViewForBrowser(
browser())->GetBoundsInScreen().CenterPoint();
@@ -84,9 +84,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::RootWindowHostDelegate* rwhd =
+ aura::WindowTreeHostDelegate* rwhd =
browser()->window()->GetNativeWindow()->GetRootWindow()->
- GetDispatcher()->AsRootWindowHostDelegate();
+ GetDispatcher()->AsWindowTreeHostDelegate();
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 5d00100..5fa97e7 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::DesktopRootWindowHostWin::GetContentWindowForHWND(
+ return views::DesktopWindowTreeHostWin::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::DesktopRootWindowHostWin::GetContentWindowForHWND(hwnd));
+ views::DesktopWindowTreeHostWin::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::DesktopRootWindowHostWin::GetContentWindowForHWND(hwnd));
+ views::DesktopWindowTreeHostWin::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 aaecafb..015e18b 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
-// DesktopRootWindowHostWin.
+// DesktopWindowTreeHostWin.
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 d03610a..b234666 100644
--- a/content/browser/renderer_host/input/synthetic_gesture_target_aura.cc
+++ b/content/browser/renderer_host/input/synthetic_gesture_target_aura.cc
@@ -48,8 +48,8 @@ void SyntheticGestureTargetAura::DispatchWebTouchEventToPlatform(
touch_with_latency, &events, SCREEN_COORDINATES);
DCHECK(conversion_success);
- aura::RootWindowHostDelegate* root_window_host_delegate =
- GetRootWindowHostDelegate();
+ aura::WindowTreeHostDelegate* root_window_host_delegate =
+ GetWindowTreeHostDelegate();
for (ScopedVector<ui::TouchEvent>::iterator iter = events.begin(),
end = events.end(); iter != end; ++iter) {
root_window_host_delegate->OnHostTouchEvent(*iter);
@@ -70,7 +70,7 @@ void SyntheticGestureTargetAura::DispatchWebMouseWheelEventToPlatform(
ui::MouseWheelEvent wheel_event(
mouse_event, web_wheel.deltaX, web_wheel.deltaY);
- GetRootWindowHostDelegate()->OnHostMouseEvent(&wheel_event);
+ GetWindowTreeHostDelegate()->OnHostMouseEvent(&wheel_event);
}
namespace {
@@ -137,7 +137,7 @@ void SyntheticGestureTargetAura::DispatchWebMouseEventToPlatform(
int flags = WebMouseEventButtonToFlags(web_mouse.button);
ui::MouseEvent mouse_event(event_type, location, location, flags, flags);
- GetRootWindowHostDelegate()->OnHostMouseEvent(&mouse_event);
+ GetWindowTreeHostDelegate()->OnHostMouseEvent(&mouse_event);
}
SyntheticGestureParams::GestureSourceType
@@ -163,11 +163,11 @@ aura::Window* SyntheticGestureTargetAura::GetWindow() const {
return window;
}
-aura::RootWindowHostDelegate*
-SyntheticGestureTargetAura::GetRootWindowHostDelegate() const {
+aura::WindowTreeHostDelegate*
+SyntheticGestureTargetAura::GetWindowTreeHostDelegate() const {
aura::Window* root_window = GetWindow()->GetRootWindow();
- aura::RootWindowHostDelegate* root_window_host_delegate =
- root_window->GetDispatcher()->AsRootWindowHostDelegate();
+ aura::WindowTreeHostDelegate* root_window_host_delegate =
+ root_window->GetDispatcher()->AsWindowTreeHostDelegate();
DCHECK(root_window_host_delegate);
return root_window_host_delegate;
}
diff --git a/content/browser/renderer_host/input/synthetic_gesture_target_aura.h b/content/browser/renderer_host/input/synthetic_gesture_target_aura.h
index 5a4d6d2..43e1fc2 100644
--- a/content/browser/renderer_host/input/synthetic_gesture_target_aura.h
+++ b/content/browser/renderer_host/input/synthetic_gesture_target_aura.h
@@ -10,7 +10,7 @@
#include "content/common/input/synthetic_gesture_params.h"
namespace aura {
-class RootWindowHostDelegate;
+class WindowTreeHostDelegate;
class Window;
namespace client {
@@ -49,7 +49,7 @@ class SyntheticGestureTargetAura : public SyntheticGestureTargetBase {
private:
aura::Window* GetWindow() const;
- aura::RootWindowHostDelegate* GetRootWindowHostDelegate() const;
+ aura::WindowTreeHostDelegate* GetWindowTreeHostDelegate() const;
aura::client::ScreenPositionClient* GetScreenPositionClient() const;
DISALLOW_COPY_AND_ASSIGN(SyntheticGestureTargetAura);
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 2f018c1..a8eb716 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -3076,10 +3076,10 @@ void RenderWidgetHostViewAura::OnWindowFocused(aura::Window* gained_focus,
////////////////////////////////////////////////////////////////////////////////
// RenderWidgetHostViewAura, aura::RootWindowObserver implementation:
-void RenderWidgetHostViewAura::OnRootWindowHostMoved(
+void RenderWidgetHostViewAura::OnWindowTreeHostMoved(
const aura::RootWindow* root,
const gfx::Point& new_origin) {
- TRACE_EVENT1("ui", "RenderWidgetHostViewAura::OnRootWindowHostMoved",
+ TRACE_EVENT1("ui", "RenderWidgetHostViewAura::OnWindowTreeHostMoved",
"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 320bf66..04a4bd1 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.h
+++ b/content/browser/renderer_host/render_widget_host_view_aura.h
@@ -335,7 +335,7 @@ class CONTENT_EXPORT RenderWidgetHostViewAura
aura::Window* lost_focus) OVERRIDE;
// Overridden from aura::RootWindowObserver:
- virtual void OnRootWindowHostMoved(const aura::RootWindow* root,
+ virtual void OnWindowTreeHostMoved(const aura::RootWindow* root,
const gfx::Point& new_origin) OVERRIDE;
// SoftwareFrameManagerClient implementation:
diff --git a/content/browser/web_contents/aura/window_slider_unittest.cc b/content/browser/web_contents/aura/window_slider_unittest.cc
index a389c53..7c808ba 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::RootWindowHostDelegate* delegate =
- dispatcher->AsRootWindowHostDelegate();
+ aura::WindowTreeHostDelegate* delegate =
+ dispatcher->AsWindowTreeHostDelegate();
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 e4ef8c0..7192d84 100644
--- a/content/browser/web_contents/web_contents_view_aura.cc
+++ b/content/browser/web_contents/web_contents_view_aura.cc
@@ -822,10 +822,10 @@ class WebContentsViewAura::WindowObserver
}
// Overridden RootWindowObserver:
- virtual void OnRootWindowHostMoved(const aura::RootWindow* root,
+ virtual void OnWindowTreeHostMoved(const aura::RootWindow* root,
const gfx::Point& new_origin) OVERRIDE {
TRACE_EVENT1("ui",
- "WebContentsViewAura::WindowObserver::OnRootWindowHostMoved",
+ "WebContentsViewAura::WindowObserver::OnWindowTreeHostMoved",
"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 eb3bdae..4e49a46 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->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher->AsWindowTreeHostDelegate()->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->AsRootWindowHostDelegate()->OnHostTouchEvent(&move1);
+ dispatcher->AsWindowTreeHostDelegate()->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->AsRootWindowHostDelegate()->OnHostTouchEvent(&inc);
+ dispatcher->AsWindowTreeHostDelegate()->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->AsRootWindowHostDelegate()->OnHostTouchEvent(&inc);
+ dispatcher->AsWindowTreeHostDelegate()->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->AsRootWindowHostDelegate()->OnHostTouchEvent(&inc);
+ dispatcher->AsWindowTreeHostDelegate()->OnHostTouchEvent(&inc);
EXPECT_EQ(1, GetCurrentIndex());
}
diff --git a/content/shell/browser/shell_aura.cc b/content/shell/browser/shell_aura.cc
index ccaffb7..0b72f9c 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_->AsRootWindowHostDelegate()->OnHostKeyEvent(
+ return root_->AsWindowTreeHostDelegate()->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_->AsRootWindowHostDelegate()->OnHostKeyEvent(
+ return root_->AsWindowTreeHostDelegate()->OnHostKeyEvent(
&aura_event);
}
diff --git a/mojo/examples/aura_demo/aura_demo.cc b/mojo/examples/aura_demo/aura_demo.cc
index 2ac77cd..24f0a75 100644
--- a/mojo/examples/aura_demo/aura_demo.cc
+++ b/mojo/examples/aura_demo/aura_demo.cc
@@ -125,7 +125,7 @@ class AuraDemo : public ShellClient {
mojo::ScopedMessagePipeHandle client_handle, native_viewport_handle;
CreateMessagePipe(&client_handle, &native_viewport_handle);
- root_window_host_.reset(new RootWindowHostMojo(
+ root_window_host_.reset(new WindowTreeHostMojo(
native_viewport_handle.Pass(),
base::Bind(&AuraDemo::HostContextCreated, base::Unretained(this))));
mojo::AllocationScope scope;
@@ -183,7 +183,7 @@ class AuraDemo : public ShellClient {
aura::Window* window21_;
mojo::RemotePtr<Shell> shell_;
- scoped_ptr<RootWindowHostMojo> root_window_host_;
+ scoped_ptr<WindowTreeHostMojo> root_window_host_;
scoped_ptr<aura::RootWindow> root_window_;
};
diff --git a/mojo/examples/aura_demo/demo_context_factory.cc b/mojo/examples/aura_demo/demo_context_factory.cc
index 895d863..74956aa 100644
--- a/mojo/examples/aura_demo/demo_context_factory.cc
+++ b/mojo/examples/aura_demo/demo_context_factory.cc
@@ -61,7 +61,7 @@ class MojoContextProvider : public cc::ContextProvider {
} // namespace
-DemoContextFactory::DemoContextFactory(RootWindowHostMojo* rwhm) : rwhm_(rwhm) {
+DemoContextFactory::DemoContextFactory(WindowTreeHostMojo* rwhm) : rwhm_(rwhm) {
}
DemoContextFactory::~DemoContextFactory() {
diff --git a/mojo/examples/aura_demo/demo_context_factory.h b/mojo/examples/aura_demo/demo_context_factory.h
index f9fdac9..062db42 100644
--- a/mojo/examples/aura_demo/demo_context_factory.h
+++ b/mojo/examples/aura_demo/demo_context_factory.h
@@ -16,12 +16,12 @@ class ContextProviderInProcess;
namespace mojo {
namespace examples {
-class RootWindowHostMojo;
+class WindowTreeHostMojo;
// The default factory that creates in-process contexts.
class DemoContextFactory : public ui::ContextFactory {
public:
- explicit DemoContextFactory(RootWindowHostMojo* rwhm);
+ explicit DemoContextFactory(WindowTreeHostMojo* rwhm);
virtual ~DemoContextFactory();
// ContextFactory implementation
@@ -48,7 +48,7 @@ class DemoContextFactory : public ui::ContextFactory {
scoped_refptr<webkit::gpu::ContextProviderInProcess>
shared_main_thread_contexts_;
- RootWindowHostMojo* rwhm_;
+ WindowTreeHostMojo* rwhm_;
DISALLOW_COPY_AND_ASSIGN(DemoContextFactory);
};
diff --git a/mojo/examples/aura_demo/root_window_host_mojo.cc b/mojo/examples/aura_demo/root_window_host_mojo.cc
index 95d1ff0..98d96f7 100644
--- a/mojo/examples/aura_demo/root_window_host_mojo.cc
+++ b/mojo/examples/aura_demo/root_window_host_mojo.cc
@@ -18,12 +18,12 @@ namespace mojo {
namespace examples {
// static
-ui::ContextFactory* RootWindowHostMojo::context_factory_ = NULL;
+ui::ContextFactory* WindowTreeHostMojo::context_factory_ = NULL;
////////////////////////////////////////////////////////////////////////////////
-// RootWindowHostMojo, public:
+// WindowTreeHostMojo, public:
-RootWindowHostMojo::RootWindowHostMojo(
+WindowTreeHostMojo::WindowTreeHostMojo(
ScopedMessagePipeHandle viewport_handle,
const base::Callback<void()>& compositor_created_callback)
: native_viewport_(viewport_handle.Pass(), this),
@@ -45,117 +45,117 @@ RootWindowHostMojo::RootWindowHostMojo(
gles2_client_.reset(new GLES2ClientImpl(
gles2_handle.Pass(),
- base::Bind(&RootWindowHostMojo::DidCreateContext,
+ base::Bind(&WindowTreeHostMojo::DidCreateContext,
base::Unretained(this))));
native_viewport_->CreateGLES2Context(gles2_client_handle.Pass());
}
-RootWindowHostMojo::~RootWindowHostMojo() {}
+WindowTreeHostMojo::~WindowTreeHostMojo() {}
////////////////////////////////////////////////////////////////////////////////
-// RootWindowHostMojo, aura::RootWindowHost implementation:
+// WindowTreeHostMojo, aura::WindowTreeHost implementation:
-aura::RootWindow* RootWindowHostMojo::GetRootWindow() {
+aura::RootWindow* WindowTreeHostMojo::GetRootWindow() {
return delegate_->AsRootWindow();
}
-gfx::AcceleratedWidget RootWindowHostMojo::GetAcceleratedWidget() {
+gfx::AcceleratedWidget WindowTreeHostMojo::GetAcceleratedWidget() {
NOTIMPLEMENTED();
return gfx::kNullAcceleratedWidget;
}
-void RootWindowHostMojo::Show() {
+void WindowTreeHostMojo::Show() {
NOTIMPLEMENTED();
}
-void RootWindowHostMojo::Hide() {
+void WindowTreeHostMojo::Hide() {
NOTIMPLEMENTED();
}
-void RootWindowHostMojo::ToggleFullScreen() {
+void WindowTreeHostMojo::ToggleFullScreen() {
NOTIMPLEMENTED();
}
-gfx::Rect RootWindowHostMojo::GetBounds() const {
+gfx::Rect WindowTreeHostMojo::GetBounds() const {
NOTIMPLEMENTED();
return gfx::Rect(500, 500);
}
-void RootWindowHostMojo::SetBounds(const gfx::Rect& bounds) {
+void WindowTreeHostMojo::SetBounds(const gfx::Rect& bounds) {
NOTIMPLEMENTED();
}
-gfx::Insets RootWindowHostMojo::GetInsets() const {
+gfx::Insets WindowTreeHostMojo::GetInsets() const {
NOTIMPLEMENTED();
return gfx::Insets();
}
-void RootWindowHostMojo::SetInsets(const gfx::Insets& insets) {
+void WindowTreeHostMojo::SetInsets(const gfx::Insets& insets) {
NOTIMPLEMENTED();
}
-gfx::Point RootWindowHostMojo::GetLocationOnNativeScreen() const {
+gfx::Point WindowTreeHostMojo::GetLocationOnNativeScreen() const {
return gfx::Point(0, 0);
}
-void RootWindowHostMojo::SetCapture() {
+void WindowTreeHostMojo::SetCapture() {
NOTIMPLEMENTED();
}
-void RootWindowHostMojo::ReleaseCapture() {
+void WindowTreeHostMojo::ReleaseCapture() {
NOTIMPLEMENTED();
}
-void RootWindowHostMojo::SetCursor(gfx::NativeCursor cursor) {
+void WindowTreeHostMojo::SetCursor(gfx::NativeCursor cursor) {
NOTIMPLEMENTED();
}
-bool RootWindowHostMojo::QueryMouseLocation(gfx::Point* location_return) {
+bool WindowTreeHostMojo::QueryMouseLocation(gfx::Point* location_return) {
NOTIMPLEMENTED();
return false;
}
-bool RootWindowHostMojo::ConfineCursorToRootWindow() {
+bool WindowTreeHostMojo::ConfineCursorToRootWindow() {
NOTIMPLEMENTED();
return false;
}
-void RootWindowHostMojo::UnConfineCursor() {
+void WindowTreeHostMojo::UnConfineCursor() {
NOTIMPLEMENTED();
}
-void RootWindowHostMojo::OnCursorVisibilityChanged(bool show) {
+void WindowTreeHostMojo::OnCursorVisibilityChanged(bool show) {
NOTIMPLEMENTED();
}
-void RootWindowHostMojo::MoveCursorTo(const gfx::Point& location) {
+void WindowTreeHostMojo::MoveCursorTo(const gfx::Point& location) {
NOTIMPLEMENTED();
}
-void RootWindowHostMojo::PostNativeEvent(
+void WindowTreeHostMojo::PostNativeEvent(
const base::NativeEvent& native_event) {
NOTIMPLEMENTED();
}
-void RootWindowHostMojo::OnDeviceScaleFactorChanged(float device_scale_factor) {
+void WindowTreeHostMojo::OnDeviceScaleFactorChanged(float device_scale_factor) {
NOTIMPLEMENTED();
}
-void RootWindowHostMojo::PrepareForShutdown() {
+void WindowTreeHostMojo::PrepareForShutdown() {
NOTIMPLEMENTED();
}
////////////////////////////////////////////////////////////////////////////////
-// RootWindowHostMojo, NativeViewportClient implementation:
+// WindowTreeHostMojo, NativeViewportClient implementation:
-void RootWindowHostMojo::OnCreated() {
+void WindowTreeHostMojo::OnCreated() {
}
-void RootWindowHostMojo::OnDestroyed() {
+void WindowTreeHostMojo::OnDestroyed() {
base::MessageLoop::current()->Quit();
}
-void RootWindowHostMojo::OnEvent(const Event& event) {
+void WindowTreeHostMojo::OnEvent(const Event& event) {
if (!event.location().is_null())
native_viewport_->AckEvent(event);
@@ -163,9 +163,9 @@ void RootWindowHostMojo::OnEvent(const Event& event) {
};
////////////////////////////////////////////////////////////////////////////////
-// RootWindowHostMojo, private:
+// WindowTreeHostMojo, private:
-void RootWindowHostMojo::DidCreateContext(gfx::Size viewport_size) {
+void WindowTreeHostMojo::DidCreateContext(gfx::Size viewport_size) {
CreateCompositor(GetAcceleratedWidget());
compositor_created_callback_.Run();
NotifyHostResized(viewport_size);
diff --git a/mojo/examples/aura_demo/root_window_host_mojo.h b/mojo/examples/aura_demo/root_window_host_mojo.h
index 3391ce3..3e35988 100644
--- a/mojo/examples/aura_demo/root_window_host_mojo.h
+++ b/mojo/examples/aura_demo/root_window_host_mojo.h
@@ -19,17 +19,17 @@ namespace examples {
class GLES2ClientImpl;
-class RootWindowHostMojo : public aura::RootWindowHost,
+class WindowTreeHostMojo : public aura::WindowTreeHost,
public NativeViewportClient {
public:
- RootWindowHostMojo(ScopedMessagePipeHandle viewport_handle,
+ WindowTreeHostMojo(ScopedMessagePipeHandle viewport_handle,
const base::Callback<void()>& compositor_created_callback);
- virtual ~RootWindowHostMojo();
+ virtual ~WindowTreeHostMojo();
GLES2ClientImpl* gles2_client() { return gles2_client_.get(); }
private:
- // RootWindowHost:
+ // WindowTreeHost:
virtual aura::RootWindow* GetRootWindow() OVERRIDE;
virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE;
virtual void Show() OVERRIDE;
@@ -65,7 +65,7 @@ class RootWindowHostMojo : public aura::RootWindowHost,
RemotePtr<NativeViewport> native_viewport_;
base::Callback<void()> compositor_created_callback_;
- DISALLOW_COPY_AND_ASSIGN(RootWindowHostMojo);
+ DISALLOW_COPY_AND_ASSIGN(WindowTreeHostMojo);
};
} // namespace examples
diff --git a/ui/aura/env.h b/ui/aura/env.h
index 6e64363..00e5ce21 100644
--- a/ui/aura/env.h
+++ b/ui/aura/env.h
@@ -74,7 +74,7 @@ class AURA_EXPORT Env : public ui::EventTarget {
private:
friend class test::EnvTestHelper;
friend class Window;
- friend class RootWindowHost;
+ friend class WindowTreeHost;
void Init();
diff --git a/ui/aura/gestures/gesture_recognizer_unittest.cc b/ui/aura/gestures/gesture_recognizer_unittest.cc
index d6f28bb..1ed8b30 100644
--- a/ui/aura/gestures/gesture_recognizer_unittest.cc
+++ b/ui/aura/gestures/gesture_recognizer_unittest.cc
@@ -589,7 +589,7 @@ class TimedEvents {
ui::TouchEvent move(ui::ET_TOUCH_MOVED, gfx::Point(x, y),
touch_id,
base::TimeDelta::FromMilliseconds(simulated_now_));
- root_window->AsRootWindowHostDelegate()->OnHostTouchEvent(&move);
+ root_window->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move);
simulated_now_ += time_step;
}
}
@@ -603,7 +603,7 @@ class TimedEvents {
ui::TouchEvent move(ui::ET_TOUCH_MOVED, gfx::Point(x, y),
touch_id,
base::TimeDelta::FromMilliseconds(simulated_now_));
- root_window->AsRootWindowHostDelegate()->OnHostTouchEvent(&move);
+ root_window->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move);
simulated_now_++;
}
};
@@ -717,7 +717,7 @@ TEST_F(GestureRecognizerTest, GestureEventTap) {
delegate->Reset();
ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId, tes.Now());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
EXPECT_FALSE(delegate->tap());
EXPECT_FALSE(delegate->show_press());
EXPECT_TRUE(delegate->tap_down());
@@ -739,7 +739,7 @@ TEST_F(GestureRecognizerTest, GestureEventTap) {
ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId, tes.LeapForward(50));
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
EXPECT_TRUE(delegate->tap());
EXPECT_FALSE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -772,7 +772,7 @@ TEST_F(GestureRecognizerTest, GestureEventTapRegion) {
kTouchId, tes.Now());
press.set_radius_x(5);
press.set_radius_y(12);
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
EXPECT_FALSE(delegate->tap());
EXPECT_TRUE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -790,7 +790,7 @@ TEST_F(GestureRecognizerTest, GestureEventTapRegion) {
release.set_radius_x(5);
release.set_radius_y(12);
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
EXPECT_TRUE(delegate->tap());
EXPECT_FALSE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -815,7 +815,7 @@ TEST_F(GestureRecognizerTest, GestureEventTapRegion) {
kTouchId, tes.Now());
press.set_radius_x(8);
press.set_radius_y(14);
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
EXPECT_FALSE(delegate->tap());
EXPECT_TRUE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -831,7 +831,7 @@ TEST_F(GestureRecognizerTest, GestureEventTapRegion) {
release.set_radius_x(20);
release.set_radius_y(13);
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
EXPECT_TRUE(delegate->tap());
EXPECT_FALSE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -856,7 +856,7 @@ TEST_F(GestureRecognizerTest, GestureEventTapRegion) {
kTouchId, tes.Now());
press.set_radius_x(6);
press.set_radius_y(10);
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
EXPECT_FALSE(delegate->tap());
EXPECT_TRUE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -872,7 +872,7 @@ TEST_F(GestureRecognizerTest, GestureEventTapRegion) {
kTouchId, tes.LeapForward(50));
move.set_radius_x(8);
move.set_radius_y(12);
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move);
EXPECT_FALSE(delegate->tap());
EXPECT_FALSE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -888,7 +888,7 @@ TEST_F(GestureRecognizerTest, GestureEventTapRegion) {
release.set_radius_x(4);
release.set_radius_y(8);
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
EXPECT_TRUE(delegate->tap());
EXPECT_FALSE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -913,7 +913,7 @@ TEST_F(GestureRecognizerTest, GestureEventTapRegion) {
kTouchId, tes.Now());
press.set_radius_x(7);
press.set_radius_y(10);
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
EXPECT_FALSE(delegate->tap());
EXPECT_TRUE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -928,7 +928,7 @@ TEST_F(GestureRecognizerTest, GestureEventTapRegion) {
kTouchId, tes.LeapForward(50));
move.set_radius_x(13);
move.set_radius_y(12);
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move);
EXPECT_FALSE(delegate->tap());
EXPECT_FALSE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -943,7 +943,7 @@ TEST_F(GestureRecognizerTest, GestureEventTapRegion) {
kTouchId, tes.LeapForward(50));
move1.set_radius_x(16);
move1.set_radius_y(16);
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move1);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move1);
EXPECT_FALSE(delegate->tap());
EXPECT_FALSE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -958,7 +958,7 @@ TEST_F(GestureRecognizerTest, GestureEventTapRegion) {
kTouchId, tes.LeapForward(50));
move2.set_radius_x(14);
move2.set_radius_y(10);
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move2);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move2);
EXPECT_FALSE(delegate->tap());
EXPECT_FALSE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -974,7 +974,7 @@ TEST_F(GestureRecognizerTest, GestureEventTapRegion) {
release.set_radius_x(8);
release.set_radius_y(9);
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
EXPECT_TRUE(delegate->tap());
EXPECT_FALSE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -1008,7 +1008,7 @@ TEST_F(GestureRecognizerTest, GestureEventScroll) {
delegate->Reset();
ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId, tes.Now());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
EXPECT_2_EVENTS(delegate->events(),
ui::ET_GESTURE_BEGIN,
ui::ET_GESTURE_TAP_DOWN);
@@ -1049,7 +1049,7 @@ TEST_F(GestureRecognizerTest, GestureEventScroll) {
ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId,
tes.LeapForward(50));
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
EXPECT_2_EVENTS(delegate->events(),
ui::ET_SCROLL_FLING_START,
ui::ET_GESTURE_END);
@@ -1076,7 +1076,7 @@ TEST_F(GestureRecognizerTest, GestureEventScrollPrediction) {
gfx::Vector2dF total_scroll;
ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId, tes.Now());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
EXPECT_2_EVENTS(delegate->events(),
ui::ET_GESTURE_BEGIN,
ui::ET_GESTURE_TAP_DOWN);
@@ -1126,7 +1126,7 @@ TEST_F(GestureRecognizerTest, GestureEventScrollPrediction) {
ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId,
tes.LeapForward(50));
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
}
// Check that the bounding box during a scroll event is correct.
@@ -1150,7 +1150,7 @@ TEST_F(GestureRecognizerTest, GestureEventScrollBoundingBox) {
gfx::Point(kPositionX, kPositionY),
kTouchId,
tes.Now());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
EXPECT_EQ(gfx::Rect(kPositionX - radius,
kPositionY - radius,
radius * 2,
@@ -1175,7 +1175,7 @@ TEST_F(GestureRecognizerTest, GestureEventScrollBoundingBox) {
kPositionY + kScrollAmount),
kTouchId, press.time_stamp() +
base::TimeDelta::FromMilliseconds(50));
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
EXPECT_EQ(gfx::Rect(kPositionX + kScrollAmount - radius,
kPositionY + kScrollAmount - radius,
radius * 2,
@@ -1198,7 +1198,7 @@ TEST_F(GestureRecognizerTest, GestureEventHorizontalRailFling) {
ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(0, 0),
kTouchId, tes.Now());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
// Move the touch-point horizontally enough that it is considered a
// horizontal scroll.
@@ -1221,7 +1221,7 @@ TEST_F(GestureRecognizerTest, GestureEventHorizontalRailFling) {
delegate->Reset();
ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId, tes.Now());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
EXPECT_TRUE(delegate->fling());
EXPECT_FALSE(delegate->scroll_end());
@@ -1242,7 +1242,7 @@ TEST_F(GestureRecognizerTest, GestureEventVerticalRailFling) {
ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(0, 0),
kTouchId, tes.Now());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
// Move the touch-point vertically enough that it is considered a
// vertical scroll.
@@ -1265,7 +1265,7 @@ TEST_F(GestureRecognizerTest, GestureEventVerticalRailFling) {
delegate->Reset();
ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId, tes.Now());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
EXPECT_TRUE(delegate->fling());
EXPECT_FALSE(delegate->scroll_end());
@@ -1286,7 +1286,7 @@ TEST_F(GestureRecognizerTest, GestureEventNonRailFling) {
ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(0, 0),
kTouchId, tes.Now());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
// Move the touch-point such that a non-rail scroll begins
tes.SendScrollEvent(dispatcher(), 20, 20, kTouchId, delegate.get());
@@ -1301,7 +1301,7 @@ TEST_F(GestureRecognizerTest, GestureEventNonRailFling) {
delegate->Reset();
ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId, tes.Now());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
EXPECT_TRUE(delegate->fling());
EXPECT_FALSE(delegate->scroll_end());
@@ -1330,7 +1330,7 @@ TEST_F(GestureRecognizerTest, GestureEventLongPress) {
ui::TouchEvent press1(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId, tes.Now());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press1);
EXPECT_TRUE(delegate->tap_down());
EXPECT_TRUE(delegate->begin());
EXPECT_FALSE(delegate->tap_cancel());
@@ -1347,7 +1347,7 @@ TEST_F(GestureRecognizerTest, GestureEventLongPress) {
delegate->Reset();
ui::TouchEvent release1(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId, tes.Now());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release1);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release1);
EXPECT_FALSE(delegate->long_press());
// Note the tap down isn't cancelled until the release
@@ -1379,7 +1379,7 @@ TEST_F(GestureRecognizerTest, GestureEventLongPressCancelledByScroll) {
ui::TouchEvent press1(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId, tes.Now());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press1);
EXPECT_TRUE(delegate->tap_down());
// We haven't pressed long enough for a long press to occur
@@ -1396,7 +1396,7 @@ TEST_F(GestureRecognizerTest, GestureEventLongPressCancelledByScroll) {
delegate->Reset();
ui::TouchEvent release1(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId, tes.LeapForward(10));
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release1);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release1);
EXPECT_FALSE(delegate->long_press());
EXPECT_FALSE(delegate->tap_cancel());
}
@@ -1422,7 +1422,7 @@ TEST_F(GestureRecognizerTest, GestureEventLongTap) {
ui::TouchEvent press1(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId, tes.Now());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press1);
EXPECT_TRUE(delegate->tap_down());
EXPECT_TRUE(delegate->begin());
EXPECT_FALSE(delegate->tap_cancel());
@@ -1439,7 +1439,7 @@ TEST_F(GestureRecognizerTest, GestureEventLongTap) {
delegate->Reset();
ui::TouchEvent release1(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId, tes.Now());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release1);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release1);
EXPECT_FALSE(delegate->long_press());
EXPECT_TRUE(delegate->long_tap());
@@ -1472,7 +1472,7 @@ TEST_F(GestureRecognizerTest, GestureEventLongPressCancelledBySecondTap) {
delegate->Reset();
ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId1, tes.Now());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
EXPECT_TRUE(delegate->tap_down());
EXPECT_TRUE(delegate->begin());
@@ -1483,7 +1483,7 @@ TEST_F(GestureRecognizerTest, GestureEventLongPressCancelledBySecondTap) {
delegate->Reset();
ui::TouchEvent press2(ui::ET_TOUCH_PRESSED, gfx::Point(10, 10),
kTouchId2, tes.Now());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press2);
EXPECT_FALSE(delegate->tap_down()); // no touch down for second tap.
EXPECT_TRUE(delegate->tap_cancel());
EXPECT_TRUE(delegate->begin());
@@ -1497,7 +1497,7 @@ TEST_F(GestureRecognizerTest, GestureEventLongPressCancelledBySecondTap) {
delegate->Reset();
ui::TouchEvent release1(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId1, tes.Now());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release1);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release1);
EXPECT_FALSE(delegate->long_press());
EXPECT_TRUE(delegate->two_finger_tap());
EXPECT_FALSE(delegate->tap_cancel());
@@ -1516,7 +1516,7 @@ TEST_F(GestureRecognizerTest, GestureEventHorizontalRailScroll) {
ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(0, 0),
kTouchId, tes.Now());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
// Move the touch-point horizontally enough that it is considered a
// horizontal scroll.
@@ -1563,7 +1563,7 @@ TEST_F(GestureRecognizerTest, GestureEventVerticalRailScroll) {
ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(0, 0),
kTouchId, tes.Now());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
// Move the touch-point vertically enough that it is considered a
// vertical scroll.
@@ -1611,7 +1611,7 @@ TEST_F(GestureRecognizerTest, GestureTapFollowedByScroll) {
delegate->Reset();
ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId, tes.Now());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
EXPECT_FALSE(delegate->tap());
EXPECT_TRUE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -1624,7 +1624,7 @@ TEST_F(GestureRecognizerTest, GestureTapFollowedByScroll) {
delegate->Reset();
ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId, tes.LeapForward(50));
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
EXPECT_TRUE(delegate->tap());
EXPECT_FALSE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -1637,7 +1637,7 @@ TEST_F(GestureRecognizerTest, GestureTapFollowedByScroll) {
delegate->Reset();
ui::TouchEvent press1(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId, tes.LeapForward(1000));
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press1);
EXPECT_FALSE(delegate->tap());
EXPECT_TRUE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -1652,7 +1652,7 @@ TEST_F(GestureRecognizerTest, GestureTapFollowedByScroll) {
delegate->Reset();
ui::TouchEvent move(ui::ET_TOUCH_MOVED, gfx::Point(130, 230),
kTouchId, tes.Now());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move);
EXPECT_FALSE(delegate->tap());
EXPECT_FALSE(delegate->tap_down());
EXPECT_TRUE(delegate->tap_cancel());
@@ -1668,7 +1668,7 @@ TEST_F(GestureRecognizerTest, GestureTapFollowedByScroll) {
delegate->Reset();
ui::TouchEvent move1(ui::ET_TOUCH_MOVED, gfx::Point(110, 211),
kTouchId, tes.Now());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move1);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move1);
EXPECT_FALSE(delegate->tap());
EXPECT_FALSE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -1683,7 +1683,7 @@ TEST_F(GestureRecognizerTest, GestureTapFollowedByScroll) {
delegate->Reset();
ui::TouchEvent move2(ui::ET_TOUCH_MOVED, gfx::Point(140, 215),
kTouchId, tes.Now());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move2);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move2);
EXPECT_FALSE(delegate->tap());
EXPECT_FALSE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -1697,7 +1697,7 @@ TEST_F(GestureRecognizerTest, GestureTapFollowedByScroll) {
delegate->Reset();
ui::TouchEvent release1(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId, tes.Now());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release1);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release1);
EXPECT_FALSE(delegate->tap());
EXPECT_FALSE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -1724,7 +1724,7 @@ TEST_F(GestureRecognizerTest, AsynchronousGestureRecognition) {
queued_delegate->Reset();
ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId1, GetTime());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
EXPECT_FALSE(queued_delegate->tap());
EXPECT_FALSE(queued_delegate->tap_down());
EXPECT_FALSE(queued_delegate->tap_cancel());
@@ -1739,7 +1739,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()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
EXPECT_FALSE(queued_delegate->tap());
EXPECT_FALSE(queued_delegate->tap_down());
EXPECT_FALSE(queued_delegate->tap_cancel());
@@ -1758,7 +1758,7 @@ TEST_F(GestureRecognizerTest, AsynchronousGestureRecognition) {
delegate->Reset();
ui::TouchEvent press2(ui::ET_TOUCH_PRESSED, gfx::Point(10, 20),
kTouchId2, GetTime());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press2);
EXPECT_FALSE(delegate->tap());
EXPECT_TRUE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -1770,7 +1770,7 @@ TEST_F(GestureRecognizerTest, AsynchronousGestureRecognition) {
ui::TouchEvent release2(ui::ET_TOUCH_RELEASED, gfx::Point(10, 20),
kTouchId2, GetTime());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release2);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release2);
// Process the first queued event.
queued_delegate->Reset();
@@ -1801,7 +1801,7 @@ TEST_F(GestureRecognizerTest, AsynchronousGestureRecognition) {
queued_delegate->Reset();
ui::TouchEvent press3(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId1, GetTime());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press3);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press3);
EXPECT_FALSE(queued_delegate->tap());
EXPECT_FALSE(queued_delegate->tap_down());
EXPECT_FALSE(queued_delegate->tap_cancel());
@@ -1817,7 +1817,7 @@ TEST_F(GestureRecognizerTest, AsynchronousGestureRecognition) {
delegate->Reset();
ui::TouchEvent press4(ui::ET_TOUCH_PRESSED, gfx::Point(103, 203),
kTouchId2, GetTime());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press4);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press4);
EXPECT_FALSE(delegate->tap());
EXPECT_FALSE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -1842,7 +1842,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()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move);
EXPECT_FALSE(delegate->tap());
EXPECT_FALSE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -1916,7 +1916,7 @@ TEST_F(GestureRecognizerTest, GestureEventPinchFromScroll) {
delegate->Reset();
ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId1, tes.Now());
- root->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
+ root->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
EXPECT_2_EVENTS(delegate->events(),
ui::ET_GESTURE_BEGIN,
ui::ET_GESTURE_TAP_DOWN);
@@ -1926,7 +1926,7 @@ TEST_F(GestureRecognizerTest, GestureEventPinchFromScroll) {
delegate->Reset();
ui::TouchEvent move(ui::ET_TOUCH_MOVED, gfx::Point(130, 301),
kTouchId1, tes.Now());
- root->AsRootWindowHostDelegate()->OnHostTouchEvent(&move);
+ root->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move);
EXPECT_3_EVENTS(delegate->events(),
ui::ET_GESTURE_TAP_CANCEL,
ui::ET_GESTURE_SCROLL_BEGIN,
@@ -1937,7 +1937,7 @@ TEST_F(GestureRecognizerTest, GestureEventPinchFromScroll) {
delegate->Reset();
ui::TouchEvent press2(ui::ET_TOUCH_PRESSED, gfx::Point(10, 10),
kTouchId2, tes.Now());
- root->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2);
+ root->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press2);
EXPECT_2_EVENTS(delegate->events(),
ui::ET_GESTURE_BEGIN,
ui::ET_GESTURE_PINCH_BEGIN);
@@ -1948,7 +1948,7 @@ TEST_F(GestureRecognizerTest, GestureEventPinchFromScroll) {
delegate->Reset();
ui::TouchEvent move3(ui::ET_TOUCH_MOVED, gfx::Point(95, 201),
kTouchId1, tes.Now());
- root->AsRootWindowHostDelegate()->OnHostTouchEvent(&move3);
+ root->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move3);
EXPECT_2_EVENTS(delegate->events(),
ui::ET_GESTURE_PINCH_UPDATE,
ui::ET_GESTURE_SCROLL_UPDATE);
@@ -1959,7 +1959,7 @@ TEST_F(GestureRecognizerTest, GestureEventPinchFromScroll) {
delegate->Reset();
ui::TouchEvent move4(ui::ET_TOUCH_MOVED, gfx::Point(55, 15),
kTouchId2, tes.Now());
- root->AsRootWindowHostDelegate()->OnHostTouchEvent(&move4);
+ root->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move4);
EXPECT_2_EVENTS(delegate->events(),
ui::ET_GESTURE_PINCH_UPDATE,
ui::ET_GESTURE_SCROLL_UPDATE);
@@ -1970,7 +1970,7 @@ TEST_F(GestureRecognizerTest, GestureEventPinchFromScroll) {
delegate->Reset();
ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId1, tes.Now());
- root->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
+ root->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
EXPECT_2_EVENTS(delegate->events(),
ui::ET_GESTURE_PINCH_END,
ui::ET_GESTURE_END);
@@ -1981,7 +1981,7 @@ TEST_F(GestureRecognizerTest, GestureEventPinchFromScroll) {
delegate->Reset();
ui::TouchEvent move5(ui::ET_TOUCH_MOVED, gfx::Point(25, 10),
kTouchId2, tes.Now());
- root->AsRootWindowHostDelegate()->OnHostTouchEvent(&move5);
+ root->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move5);
EXPECT_1_EVENT(delegate->events(), ui::ET_GESTURE_SCROLL_UPDATE);
EXPECT_TRUE(delegate->bounding_box().IsEmpty());
}
@@ -2000,11 +2000,11 @@ scoped_ptr<GestureEventConsumeDelegate> delegate(
ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(101, 301),
kTouchId1, tes.Now());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
delegate->Reset();
ui::TouchEvent press2(ui::ET_TOUCH_PRESSED, gfx::Point(10, 10),
kTouchId2, tes.Now());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press2);
EXPECT_FALSE(delegate->pinch_begin());
// Touch move triggers pinch begin.
@@ -2021,7 +2021,7 @@ scoped_ptr<GestureEventConsumeDelegate> delegate(
delegate->Reset();
ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId1, tes.Now());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
EXPECT_TRUE(delegate->pinch_end());
tes.SendScrollEvent(dispatcher(), 130, 230, kTouchId2, delegate.get());
@@ -2031,12 +2031,12 @@ scoped_ptr<GestureEventConsumeDelegate> delegate(
delegate->Reset();
ui::TouchEvent press3(ui::ET_TOUCH_PRESSED, gfx::Point(10, 10),
kTouchId1, tes.Now());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press3);
+ dispatcher()->AsWindowTreeHostDelegate()->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()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move2);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move2);
EXPECT_TRUE(delegate->pinch_begin());
tes.SendScrollEvent(dispatcher(), 130, 230, kTouchId1, delegate.get());
@@ -2060,7 +2060,7 @@ TEST_F(GestureRecognizerTest, GestureEventPinchFromTap) {
delegate->Reset();
ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(101, 301),
kTouchId1, tes.Now());
- root->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
+ root->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
EXPECT_2_EVENTS(delegate->events(),
ui::ET_GESTURE_BEGIN,
ui::ET_GESTURE_TAP_DOWN);
@@ -2070,7 +2070,7 @@ TEST_F(GestureRecognizerTest, GestureEventPinchFromTap) {
delegate->Reset();
ui::TouchEvent press2(ui::ET_TOUCH_PRESSED, gfx::Point(10, 10),
kTouchId2, tes.Now());
- root->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2);
+ root->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press2);
EXPECT_2_EVENTS(delegate->events(),
ui::ET_GESTURE_TAP_CANCEL,
ui::ET_GESTURE_BEGIN);
@@ -2081,7 +2081,7 @@ TEST_F(GestureRecognizerTest, GestureEventPinchFromTap) {
delegate->Reset();
ui::TouchEvent move3(ui::ET_TOUCH_MOVED, gfx::Point(65, 201),
kTouchId1, tes.Now());
- root->AsRootWindowHostDelegate()->OnHostTouchEvent(&move3);
+ root->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move3);
EXPECT_2_EVENTS(delegate->events(),
ui::ET_GESTURE_PINCH_BEGIN,
ui::ET_GESTURE_SCROLL_BEGIN);
@@ -2092,7 +2092,7 @@ TEST_F(GestureRecognizerTest, GestureEventPinchFromTap) {
delegate->Reset();
ui::TouchEvent move4(ui::ET_TOUCH_MOVED, gfx::Point(55, 15),
kTouchId2, tes.Now());
- root->AsRootWindowHostDelegate()->OnHostTouchEvent(&move4);
+ root->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move4);
EXPECT_2_EVENTS(delegate->events(),
ui::ET_GESTURE_PINCH_UPDATE,
ui::ET_GESTURE_SCROLL_UPDATE);
@@ -2103,7 +2103,7 @@ TEST_F(GestureRecognizerTest, GestureEventPinchFromTap) {
delegate->Reset();
ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId1, tes.LeapForward(10));
- root->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
+ root->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
EXPECT_2_EVENTS(delegate->events(),
ui::ET_GESTURE_PINCH_END,
ui::ET_GESTURE_END);
@@ -2114,7 +2114,7 @@ TEST_F(GestureRecognizerTest, GestureEventPinchFromTap) {
delegate->Reset();
ui::TouchEvent move5(ui::ET_TOUCH_MOVED, gfx::Point(25, 10),
kTouchId2, tes.Now());
- root->AsRootWindowHostDelegate()->OnHostTouchEvent(&move5);
+ root->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move5);
EXPECT_1_EVENT(delegate->events(), ui::ET_GESTURE_SCROLL_UPDATE);
EXPECT_TRUE(delegate->bounding_box().IsEmpty());
}
@@ -2126,7 +2126,7 @@ TEST_F(GestureRecognizerTest, GestureEventIgnoresDisconnectedEvents) {
ui::TouchEvent release1(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
6, tes.Now());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release1);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release1);
EXPECT_FALSE(delegate->tap());
EXPECT_FALSE(delegate->tap_down());
}
@@ -2164,7 +2164,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()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
}
// Touches should now be associated with the closest touch within
@@ -2181,10 +2181,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()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
ui::TouchEvent move(ui::ET_TOUCH_MOVED, gfx::Point(250, 250),
kNumWindows, tes.Now());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move);
target = gesture_recognizer->GetTargetForLocation(gfx::Point(250, 250));
EXPECT_EQ("2", WindowIDAsString(target));
@@ -2205,7 +2205,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()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move2);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move2);
target = gesture_recognizer->GetTargetForLocation(gfx::Point(1000, 1000));
EXPECT_EQ("2", WindowIDAsString(target));
@@ -2236,11 +2236,11 @@ TEST_F(GestureRecognizerTest, GestureEventOutsideRootWindowTap) {
gfx::Point pos1(-10, -10);
ui::TouchEvent press1(ui::ET_TOUCH_PRESSED, pos1, 0, tes.Now());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press1);
gfx::Point pos2(1000, 1000);
ui::TouchEvent press2(ui::ET_TOUCH_PRESSED, pos2, 1, tes.Now());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press2);
// As these presses were outside the root window, they should be
// associated with the root window.
@@ -2261,10 +2261,10 @@ TEST_F(GestureRecognizerTest, NoTapWithPreventDefaultedRelease) {
delegate->Reset();
ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId, tes.Now());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId, tes.LeapForward(50));
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
delegate->Reset();
delegate->ReceivedAck();
@@ -2294,9 +2294,9 @@ TEST_F(GestureRecognizerTest, PinchScrollWithPreventDefaultedRelease) {
tes.LeapForward(200));
ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(15, 25), kTouchId1,
tes.LeapForward(50));
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move);
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
delegate->Reset();
// Ack the press event.
@@ -2330,12 +2330,12 @@ TEST_F(GestureRecognizerTest, PinchScrollWithPreventDefaultedRelease) {
tes.LeapForward(14));
// Do a pinch.
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move);
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2);
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move2);
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release2);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press2);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move2);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release2);
// Ack the press and move events.
delegate->Reset();
@@ -2464,14 +2464,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()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsWindowTreeHostDelegate()->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()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press2);
// This new press should not generate a tap-down.
EXPECT_FALSE(delegate->begin());
@@ -2495,7 +2495,7 @@ TEST_F(GestureRecognizerTest, TwoFingerTap) {
delegate->Reset();
ui::TouchEvent press1(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId1, tes.Now());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press1);
EXPECT_FALSE(delegate->tap());
EXPECT_TRUE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -2508,7 +2508,7 @@ TEST_F(GestureRecognizerTest, TwoFingerTap) {
delegate->Reset();
ui::TouchEvent press2(ui::ET_TOUCH_PRESSED, gfx::Point(130, 201),
kTouchId2, tes.Now());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press2);
EXPECT_FALSE(delegate->tap());
EXPECT_FALSE(delegate->tap_down()); // no touch down for second tap.
EXPECT_TRUE(delegate->tap_cancel());
@@ -2522,10 +2522,10 @@ TEST_F(GestureRecognizerTest, TwoFingerTap) {
delegate->Reset();
ui::TouchEvent move1(ui::ET_TOUCH_MOVED, gfx::Point(102, 202),
kTouchId1, tes.Now());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move1);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move1);
ui::TouchEvent move2(ui::ET_TOUCH_MOVED, gfx::Point(131, 202),
kTouchId2, tes.Now());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move2);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move2);
EXPECT_FALSE(delegate->tap());
EXPECT_FALSE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -2541,7 +2541,7 @@ TEST_F(GestureRecognizerTest, TwoFingerTap) {
ui::TouchEvent release1(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId1, tes.LeapForward(50));
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release1);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release1);
EXPECT_FALSE(delegate->tap());
EXPECT_FALSE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -2557,7 +2557,7 @@ TEST_F(GestureRecognizerTest, TwoFingerTap) {
ui::TouchEvent release2(ui::ET_TOUCH_RELEASED, gfx::Point(130, 201),
kTouchId2, tes.LeapForward(50));
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release2);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release2);
EXPECT_FALSE(delegate->tap());
EXPECT_FALSE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -2583,19 +2583,19 @@ TEST_F(GestureRecognizerTest, TwoFingerTapExpired) {
delegate->Reset();
ui::TouchEvent press1(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId1, tes.Now());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press1);
delegate->Reset();
ui::TouchEvent press2(ui::ET_TOUCH_PRESSED, gfx::Point(130, 201),
kTouchId2, tes.Now());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2);
+ dispatcher()->AsWindowTreeHostDelegate()->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()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release1);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release1);
EXPECT_FALSE(delegate->two_finger_tap());
// Lift second finger.
@@ -2605,7 +2605,7 @@ TEST_F(GestureRecognizerTest, TwoFingerTapExpired) {
ui::TouchEvent release2(ui::ET_TOUCH_RELEASED, gfx::Point(130, 201),
kTouchId2, tes.LeapForward(50));
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release2);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release2);
EXPECT_FALSE(delegate->two_finger_tap());
}
@@ -2627,12 +2627,12 @@ TEST_F(GestureRecognizerTest, TwoFingerTapChangesToPinch) {
delegate->Reset();
ui::TouchEvent press1(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId1, tes.Now());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press1);
delegate->Reset();
ui::TouchEvent press2(ui::ET_TOUCH_PRESSED, gfx::Point(130, 201),
kTouchId2, tes.Now());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press2);
tes.SendScrollEvent(dispatcher(), 130, 230, kTouchId1, delegate.get());
EXPECT_FALSE(delegate->two_finger_tap());
@@ -2644,7 +2644,7 @@ TEST_F(GestureRecognizerTest, TwoFingerTapChangesToPinch) {
ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId2, tes.LeapForward(50));
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
EXPECT_FALSE(delegate->two_finger_tap());
EXPECT_TRUE(delegate->pinch_end());
}
@@ -2658,12 +2658,12 @@ TEST_F(GestureRecognizerTest, TwoFingerTapChangesToPinch) {
delegate->Reset();
ui::TouchEvent press1(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId1, tes.Now());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press1);
delegate->Reset();
ui::TouchEvent press2(ui::ET_TOUCH_PRESSED, gfx::Point(130, 201),
kTouchId2, tes.Now());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press2);
tes.SendScrollEvent(dispatcher(), 101, 230, kTouchId2, delegate.get());
EXPECT_FALSE(delegate->two_finger_tap());
@@ -2675,7 +2675,7 @@ TEST_F(GestureRecognizerTest, TwoFingerTapChangesToPinch) {
ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId1, tes.LeapForward(50));
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
EXPECT_FALSE(delegate->two_finger_tap());
EXPECT_TRUE(delegate->pinch_end());
}
@@ -2697,13 +2697,13 @@ TEST_F(GestureRecognizerTest, NoTwoFingerTapWhenFirstFingerHasScrolled) {
delegate->Reset();
ui::TouchEvent press1(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId1, tes.Now());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1);
+ dispatcher()->AsWindowTreeHostDelegate()->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()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press2);
EXPECT_TRUE(delegate->pinch_begin());
@@ -2713,7 +2713,7 @@ TEST_F(GestureRecognizerTest, NoTwoFingerTapWhenFirstFingerHasScrolled) {
ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId2, tes.LeapForward(50));
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
EXPECT_FALSE(delegate->two_finger_tap());
EXPECT_TRUE(delegate->pinch_end());
}
@@ -2776,17 +2776,17 @@ TEST_F(GestureRecognizerTest, TwoFingerTapCancelled) {
delegate->Reset();
ui::TouchEvent press1(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId1, tes.Now());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press1);
delegate->Reset();
ui::TouchEvent press2(ui::ET_TOUCH_PRESSED, gfx::Point(130, 201),
kTouchId2, tes.Now());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press2);
delegate->Reset();
ui::TouchEvent cancel(ui::ET_TOUCH_CANCELLED, gfx::Point(130, 201),
kTouchId1, tes.Now());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&cancel);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&cancel);
EXPECT_FALSE(delegate->two_finger_tap());
// Make sure there is enough delay before the touch is released so that it
@@ -2795,7 +2795,7 @@ TEST_F(GestureRecognizerTest, TwoFingerTapCancelled) {
ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId2, tes.LeapForward(50));
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
EXPECT_FALSE(delegate->two_finger_tap());
}
@@ -2808,17 +2808,17 @@ TEST_F(GestureRecognizerTest, TwoFingerTapCancelled) {
delegate->Reset();
ui::TouchEvent press1(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId1, tes.Now());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press1);
delegate->Reset();
ui::TouchEvent press2(ui::ET_TOUCH_PRESSED, gfx::Point(130, 201),
kTouchId2, tes.Now());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press2);
delegate->Reset();
ui::TouchEvent cancel(ui::ET_TOUCH_CANCELLED, gfx::Point(130, 201),
kTouchId2, tes.Now());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&cancel);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&cancel);
EXPECT_FALSE(delegate->two_finger_tap());
// Make sure there is enough delay before the touch is released so that it
@@ -2827,7 +2827,7 @@ TEST_F(GestureRecognizerTest, TwoFingerTapCancelled) {
ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId1, tes.LeapForward(50));
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
EXPECT_FALSE(delegate->two_finger_tap());
}
}
@@ -2847,7 +2847,7 @@ TEST_F(GestureRecognizerTest, VeryWideTwoFingerTouchDownShouldBeAPinch) {
delegate->Reset();
ui::TouchEvent press1(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId1, tes.Now());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press1);
EXPECT_FALSE(delegate->tap());
EXPECT_TRUE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -2860,7 +2860,7 @@ TEST_F(GestureRecognizerTest, VeryWideTwoFingerTouchDownShouldBeAPinch) {
delegate->Reset();
ui::TouchEvent press2(ui::ET_TOUCH_PRESSED, gfx::Point(430, 201),
kTouchId2, tes.Now());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press2);
EXPECT_FALSE(delegate->tap());
EXPECT_FALSE(delegate->tap_down()); // no touch down for second tap.
EXPECT_TRUE(delegate->tap_cancel());
@@ -2874,7 +2874,7 @@ TEST_F(GestureRecognizerTest, VeryWideTwoFingerTouchDownShouldBeAPinch) {
delegate->Reset();
ui::TouchEvent move2(ui::ET_TOUCH_MOVED, gfx::Point(530, 301),
kTouchId2, tes.Now());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move2);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move2);
EXPECT_FALSE(delegate->tap());
EXPECT_FALSE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -2901,10 +2901,10 @@ TEST_F(GestureRecognizerTest, FlushAllOnHide) {
ui::TouchEvent press1(ui::ET_TOUCH_PRESSED, gfx::Point(10, 10),
kTouchId1, tes.Now());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press1);
ui::TouchEvent press2(ui::ET_TOUCH_PRESSED, gfx::Point(20, 20),
kTouchId2, tes.Now());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press2);
window->Hide();
EXPECT_EQ(NULL,
ui::GestureRecognizer::Get()->GetTouchLockedTarget(press1));
@@ -2933,7 +2933,7 @@ TEST_F(GestureRecognizerTest, LongPressTimerStopsOnPreventDefaultedTouchMoves) {
delegate->Reset();
ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId, tes.Now());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
// Scroll around, to cancel the long press
tes.SendScrollEvent(dispatcher(), 130, 230, kTouchId, delegate.get());
@@ -2986,7 +2986,7 @@ TEST_F(GestureRecognizerTest, GestureEventScrollTouchMoveConsumed) {
delegate->Reset();
ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId, tes.Now());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
EXPECT_FALSE(delegate->tap());
EXPECT_TRUE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -3012,7 +3012,7 @@ TEST_F(GestureRecognizerTest, GestureEventScrollTouchMoveConsumed) {
delegate->Reset();
ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(130, 230),
kTouchId, tes.LeapForward(50));
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
EXPECT_FALSE(delegate->tap());
EXPECT_FALSE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -3040,7 +3040,7 @@ TEST_F(GestureRecognizerTest, GestureEventScrollTwoFingerTouchMoveConsumed) {
delegate->Reset();
ui::TouchEvent press1(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId1, tes.Now());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press1);
tes.SendScrollEvent(dispatcher(), 131, 231, kTouchId1, delegate.get());
// First finger touches down and moves.
@@ -3053,7 +3053,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()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press2);
tes.SendScrollEvent(dispatcher(), 161, 231, kTouchId2, delegate.get());
// PinchBegin & ScrollBegin were not sent if the touch-move events were
@@ -3110,8 +3110,8 @@ TEST_F(GestureRecognizerTest, GestureEventScrollTwoFingerTouchMoveConsumed) {
kTouchId1, tes.Now());
ui::TouchEvent release2(ui::ET_TOUCH_RELEASED, gfx::Point(130, 201),
kTouchId2, tes.Now());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release1);
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release2);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release1);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release2);
EXPECT_FALSE(delegate->tap());
// Touch release is not consumed, so we still see two finger tap.
@@ -3144,7 +3144,7 @@ TEST_F(GestureRecognizerTest, GestureEventScrollTouchMovePartialConsumed) {
delegate->Reset();
ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId, tes.Now());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
EXPECT_FALSE(delegate->tap());
EXPECT_TRUE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -3211,7 +3211,7 @@ TEST_F(GestureRecognizerTest, GestureEventScrollTouchMovePartialConsumed) {
delegate->Reset();
ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId, tes.LeapForward(50));
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
EXPECT_FALSE(delegate->tap());
EXPECT_FALSE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -3238,19 +3238,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()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press1);
ui::TouchEvent release1(ui::ET_TOUCH_RELEASED, gfx::Point(104, 201),
kTouchId, tes.LeapForward(50));
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release1);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release1);
delegate->Reset();
// Second tap
ui::TouchEvent press2(ui::ET_TOUCH_PRESSED, gfx::Point(101, 203),
kTouchId, tes.LeapForward(200));
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press2);
ui::TouchEvent release2(ui::ET_TOUCH_RELEASED, gfx::Point(102, 206),
kTouchId, tes.LeapForward(50));
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release2);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release2);
EXPECT_TRUE(delegate->tap());
EXPECT_TRUE(delegate->tap_down());
@@ -3279,10 +3279,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()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press1);
ui::TouchEvent release1(ui::ET_TOUCH_RELEASED, gfx::Point(104, 201),
kTouchId, tes.LeapForward(50));
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release1);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release1);
EXPECT_EQ(1, delegate->tap_count());
delegate->Reset();
@@ -3290,10 +3290,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()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press2);
ui::TouchEvent release2(ui::ET_TOUCH_RELEASED, gfx::Point(102, 206),
kTouchId, tes.LeapForward(50));
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release2);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release2);
EXPECT_EQ(2, delegate->tap_count());
delegate->Reset();
@@ -3301,10 +3301,10 @@ TEST_F(GestureRecognizerTest, GestureEventTripleTap) {
// Third tap
ui::TouchEvent press3(ui::ET_TOUCH_PRESSED, gfx::Point(102, 206),
kTouchId, tes.LeapForward(200));
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press3);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press3);
ui::TouchEvent release3(ui::ET_TOUCH_RELEASED, gfx::Point(102, 206),
kTouchId, tes.LeapForward(50));
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release3);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release3);
EXPECT_TRUE(delegate->tap());
@@ -3334,19 +3334,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()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press1);
ui::TouchEvent release1(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId, tes.LeapForward(50));
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release1);
+ dispatcher()->AsWindowTreeHostDelegate()->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()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press2);
ui::TouchEvent release2(ui::ET_TOUCH_RELEASED, gfx::Point(201, 201),
kTouchId, tes.LeapForward(50));
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release2);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release2);
EXPECT_TRUE(delegate->tap());
EXPECT_TRUE(delegate->tap_down());
@@ -3376,19 +3376,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()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press1);
ui::TouchEvent release1(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId, tes.LeapForward(50));
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release1);
+ dispatcher()->AsWindowTreeHostDelegate()->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()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press2);
ui::TouchEvent release2(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId, tes.LeapForward(50));
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release2);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release2);
EXPECT_TRUE(delegate->tap());
EXPECT_TRUE(delegate->tap_down());
@@ -3418,7 +3418,7 @@ TEST_F(GestureRecognizerTest, BoundingBoxRadiusChange) {
ui::TouchEvent press1(
ui::ET_TOUCH_PRESSED, gfx::Point(101, 201), kTouchId, tes.Now());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press1);
EXPECT_TRUE(delegate->bounding_box().IsEmpty());
delegate->Reset();
@@ -3427,7 +3427,7 @@ TEST_F(GestureRecognizerTest, BoundingBoxRadiusChange) {
ui::ET_TOUCH_PRESSED, gfx::Point(201, 201), kTouchId2,
tes.LeapForward(400));
press2.set_radius_x(5);
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press2);
EXPECT_FALSE(delegate->pinch_begin());
EXPECT_EQ(gfx::Rect(101, 201, 100, 0).ToString(),
delegate->bounding_box().ToString());
@@ -3436,7 +3436,7 @@ TEST_F(GestureRecognizerTest, BoundingBoxRadiusChange) {
ui::TouchEvent move1(ui::ET_TOUCH_MOVED, gfx::Point(141, 201), kTouchId,
tes.LeapForward(40));
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move1);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move1);
EXPECT_TRUE(delegate->pinch_begin());
EXPECT_EQ(gfx::Rect(141, 201, 60, 0).ToString(),
delegate->bounding_box().ToString());
@@ -3448,7 +3448,7 @@ TEST_F(GestureRecognizerTest, BoundingBoxRadiusChange) {
tes.LeapForward(40));
move2.set_radius_x(50);
move2.set_radius_y(60);
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move2);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move2);
EXPECT_FALSE(delegate->tap());
EXPECT_FALSE(delegate->tap_cancel());
EXPECT_FALSE(delegate->scroll_update());
@@ -3474,21 +3474,21 @@ TEST_F(GestureRecognizerTest, NoDriftInScroll) {
ui::TouchEvent press1(
ui::ET_TOUCH_PRESSED, gfx::Point(101, 208), kTouchId, tes.Now());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press1);
EXPECT_TRUE(delegate->begin());
delegate->Reset();
ui::TouchEvent move1(ui::ET_TOUCH_MOVED, gfx::Point(101, 206), kTouchId,
tes.LeapForward(40));
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move1);
+ dispatcher()->AsWindowTreeHostDelegate()->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()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move2);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move2);
EXPECT_TRUE(delegate->tap_cancel());
EXPECT_TRUE(delegate->scroll_begin());
EXPECT_TRUE(delegate->scroll_update());
@@ -3499,14 +3499,14 @@ TEST_F(GestureRecognizerTest, NoDriftInScroll) {
ui::TouchEvent move3(ui::ET_TOUCH_MOVED, gfx::Point(101, 204), kTouchId,
tes.LeapForward(40));
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move3);
+ dispatcher()->AsWindowTreeHostDelegate()->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()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move4);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move4);
EXPECT_TRUE(delegate->scroll_update());
EXPECT_EQ(-1, delegate->scroll_y());
@@ -3530,7 +3530,7 @@ TEST_F(GestureRecognizerTest, GestureEventConsumedTouchMoveCanFireTapCancel) {
kTouchId, tes.Now());
delegate->set_consume_touch_move(false);
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
delegate->set_consume_touch_move(true);
delegate->Reset();
// Move the touch-point enough so that it would normally be considered a
@@ -3567,8 +3567,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()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&p2);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&p2);
EXPECT_FALSE(delegate->tap());
EXPECT_TRUE(delegate->tap_down());
EXPECT_TRUE(delegate->tap_cancel());
@@ -3609,7 +3609,7 @@ TEST_F(GestureRecognizerTest, GestureEventShowPress) {
ui::TouchEvent press1(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId, tes.Now());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press1);
EXPECT_TRUE(delegate->tap_down());
EXPECT_TRUE(delegate->begin());
EXPECT_FALSE(delegate->tap_cancel());
@@ -3625,7 +3625,7 @@ TEST_F(GestureRecognizerTest, GestureEventShowPress) {
delegate->Reset();
ui::TouchEvent release1(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId, tes.Now());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release1);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release1);
EXPECT_FALSE(delegate->long_press());
// Note the tap down isn't cancelled until the release
@@ -3657,7 +3657,7 @@ TEST_F(GestureRecognizerTest, GestureEventShowPressCancelledByScroll) {
ui::TouchEvent press1(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId, tes.Now());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press1);
EXPECT_TRUE(delegate->tap_down());
// We haven't pressed long enough for a show press to occur
@@ -3674,7 +3674,7 @@ TEST_F(GestureRecognizerTest, GestureEventShowPressCancelledByScroll) {
delegate->Reset();
ui::TouchEvent release1(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId, tes.LeapForward(10));
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release1);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release1);
EXPECT_FALSE(delegate->show_press());
EXPECT_FALSE(delegate->tap_cancel());
}
@@ -3695,7 +3695,7 @@ TEST_F(GestureRecognizerTest, GestureEventShowPressSentOnTap) {
ui::TouchEvent press1(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId, tes.Now());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press1);
EXPECT_TRUE(delegate->tap_down());
// We haven't pressed long enough for a show press to occur
@@ -3705,7 +3705,7 @@ TEST_F(GestureRecognizerTest, GestureEventShowPressSentOnTap) {
delegate->Reset();
ui::TouchEvent release1(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId, tes.LeapForward(50));
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release1);
+ dispatcher()->AsWindowTreeHostDelegate()->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 18296f5..a91fed4 100644
--- a/ui/aura/remote_root_window_host_win.cc
+++ b/ui/aura/remote_root_window_host_win.cc
@@ -31,7 +31,7 @@ namespace aura {
namespace {
-const char* kRootWindowHostWinKey = "__AURA_REMOTE_ROOT_WINDOW_HOST_WIN__";
+const char* kWindowTreeHostWinKey = "__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) {
@@ -87,8 +87,8 @@ void HandleOpenFile(const base::string16& title,
const base::string16& filter,
const OpenFileCompletion& on_success,
const FileSelectionCanceled& on_failure) {
- DCHECK(aura::RemoteRootWindowHostWin::Instance());
- aura::RemoteRootWindowHostWin::Instance()->HandleOpenFile(title,
+ DCHECK(aura::RemoteWindowTreeHostWin::Instance());
+ aura::RemoteWindowTreeHostWin::Instance()->HandleOpenFile(title,
default_path,
filter,
on_success,
@@ -100,8 +100,8 @@ void HandleOpenMultipleFiles(const base::string16& title,
const base::string16& filter,
const OpenMultipleFilesCompletion& on_success,
const FileSelectionCanceled& on_failure) {
- DCHECK(aura::RemoteRootWindowHostWin::Instance());
- aura::RemoteRootWindowHostWin::Instance()->HandleOpenMultipleFiles(
+ DCHECK(aura::RemoteWindowTreeHostWin::Instance());
+ aura::RemoteWindowTreeHostWin::Instance()->HandleOpenMultipleFiles(
title,
default_path,
filter,
@@ -116,8 +116,8 @@ void HandleSaveFile(const base::string16& title,
const base::string16& default_extension,
const SaveFileCompletion& on_success,
const FileSelectionCanceled& on_failure) {
- DCHECK(aura::RemoteRootWindowHostWin::Instance());
- aura::RemoteRootWindowHostWin::Instance()->HandleSaveFile(title,
+ DCHECK(aura::RemoteWindowTreeHostWin::Instance());
+ aura::RemoteWindowTreeHostWin::Instance()->HandleSaveFile(title,
default_path,
filter,
filter_index,
@@ -129,48 +129,48 @@ void HandleSaveFile(const base::string16& title,
void HandleSelectFolder(const base::string16& title,
const SelectFolderCompletion& on_success,
const FileSelectionCanceled& on_failure) {
- DCHECK(aura::RemoteRootWindowHostWin::Instance());
- aura::RemoteRootWindowHostWin::Instance()->HandleSelectFolder(title,
+ DCHECK(aura::RemoteWindowTreeHostWin::Instance());
+ aura::RemoteWindowTreeHostWin::Instance()->HandleSelectFolder(title,
on_success,
on_failure);
}
void HandleActivateDesktop(const base::FilePath& shortcut,
bool ash_exit) {
- DCHECK(aura::RemoteRootWindowHostWin::Instance());
- aura::RemoteRootWindowHostWin::Instance()->HandleActivateDesktop(shortcut,
+ DCHECK(aura::RemoteWindowTreeHostWin::Instance());
+ aura::RemoteWindowTreeHostWin::Instance()->HandleActivateDesktop(shortcut,
ash_exit);
}
-RemoteRootWindowHostWin* g_instance = NULL;
+RemoteWindowTreeHostWin* g_instance = NULL;
-RemoteRootWindowHostWin* RemoteRootWindowHostWin::Instance() {
+RemoteWindowTreeHostWin* RemoteWindowTreeHostWin::Instance() {
if (g_instance)
return g_instance;
return Create(gfx::Rect());
}
-RemoteRootWindowHostWin* RemoteRootWindowHostWin::Create(
+RemoteWindowTreeHostWin* RemoteWindowTreeHostWin::Create(
const gfx::Rect& bounds) {
- g_instance = g_instance ? g_instance : new RemoteRootWindowHostWin(bounds);
+ g_instance = g_instance ? g_instance : new RemoteWindowTreeHostWin(bounds);
return g_instance;
}
-RemoteRootWindowHostWin::RemoteRootWindowHostWin(const gfx::Rect& bounds)
+RemoteWindowTreeHostWin::RemoteWindowTreeHostWin(const gfx::Rect& bounds)
: remote_window_(NULL),
host_(NULL),
ignore_mouse_moves_until_set_cursor_ack_(false),
event_flags_(0),
- window_size_(aura::RootWindowHost::GetNativeScreenSize()) {
- prop_.reset(new ui::ViewProp(NULL, kRootWindowHostWinKey, this));
+ window_size_(aura::WindowTreeHost::GetNativeScreenSize()) {
+ prop_.reset(new ui::ViewProp(NULL, kWindowTreeHostWinKey, this));
CreateCompositor(GetAcceleratedWidget());
}
-RemoteRootWindowHostWin::~RemoteRootWindowHostWin() {
+RemoteWindowTreeHostWin::~RemoteWindowTreeHostWin() {
g_instance = NULL;
}
-void RemoteRootWindowHostWin::Connected(IPC::Sender* host, HWND remote_window) {
+void RemoteWindowTreeHostWin::Connected(IPC::Sender* host, HWND remote_window) {
CHECK(host_ == NULL);
host_ = host;
remote_window_ = remote_window;
@@ -180,7 +180,7 @@ void RemoteRootWindowHostWin::Connected(IPC::Sender* host, HWND remote_window) {
InitCompositor();
}
-void RemoteRootWindowHostWin::Disconnected() {
+void RemoteWindowTreeHostWin::Disconnected() {
// Don't CHECK here, Disconnected is called on a channel error which can
// happen before we're successfully Connected.
if (!host_)
@@ -193,9 +193,9 @@ void RemoteRootWindowHostWin::Disconnected() {
remote_window_ = NULL;
}
-bool RemoteRootWindowHostWin::OnMessageReceived(const IPC::Message& message) {
+bool RemoteWindowTreeHostWin::OnMessageReceived(const IPC::Message& message) {
bool handled = true;
- IPC_BEGIN_MESSAGE_MAP(RemoteRootWindowHostWin, message)
+ IPC_BEGIN_MESSAGE_MAP(RemoteWindowTreeHostWin, message)
IPC_MESSAGE_HANDLER(MetroViewerHostMsg_MouseMoved, OnMouseMoved)
IPC_MESSAGE_HANDLER(MetroViewerHostMsg_MouseButton, OnMouseButton)
IPC_MESSAGE_HANDLER(MetroViewerHostMsg_KeyDown, OnKeyDown)
@@ -232,7 +232,7 @@ bool RemoteRootWindowHostWin::OnMessageReceived(const IPC::Message& message) {
return handled;
}
-void RemoteRootWindowHostWin::HandleOpenURLOnDesktop(
+void RemoteWindowTreeHostWin::HandleOpenURLOnDesktop(
const base::FilePath& shortcut,
const base::string16& url) {
if (!host_)
@@ -240,7 +240,7 @@ void RemoteRootWindowHostWin::HandleOpenURLOnDesktop(
host_->Send(new MetroViewerHostMsg_OpenURLOnDesktop(shortcut, url));
}
-void RemoteRootWindowHostWin::HandleActivateDesktop(
+void RemoteWindowTreeHostWin::HandleActivateDesktop(
const base::FilePath& shortcut,
bool ash_exit) {
if (!host_)
@@ -248,7 +248,7 @@ void RemoteRootWindowHostWin::HandleActivateDesktop(
host_->Send(new MetroViewerHostMsg_ActivateDesktop(shortcut, ash_exit));
}
-void RemoteRootWindowHostWin::HandleOpenFile(
+void RemoteWindowTreeHostWin::HandleOpenFile(
const base::string16& title,
const base::FilePath& default_path,
const base::string16& filter,
@@ -270,7 +270,7 @@ void RemoteRootWindowHostWin::HandleOpenFile(
false));
}
-void RemoteRootWindowHostWin::HandleOpenMultipleFiles(
+void RemoteWindowTreeHostWin::HandleOpenMultipleFiles(
const base::string16& title,
const base::FilePath& default_path,
const base::string16& filter,
@@ -291,7 +291,7 @@ void RemoteRootWindowHostWin::HandleOpenMultipleFiles(
true));
}
-void RemoteRootWindowHostWin::HandleSaveFile(
+void RemoteWindowTreeHostWin::HandleSaveFile(
const base::string16& title,
const base::FilePath& default_path,
const base::string16& filter,
@@ -318,7 +318,7 @@ void RemoteRootWindowHostWin::HandleSaveFile(
host_->Send(new MetroViewerHostMsg_DisplayFileSaveAs(params));
}
-void RemoteRootWindowHostWin::HandleSelectFolder(
+void RemoteWindowTreeHostWin::HandleSelectFolder(
const base::string16& title,
const SelectFolderCompletion& on_success,
const FileSelectionCanceled& on_failure) {
@@ -334,78 +334,78 @@ void RemoteRootWindowHostWin::HandleSelectFolder(
host_->Send(new MetroViewerHostMsg_DisplaySelectFolder(title));
}
-void RemoteRootWindowHostWin::HandleWindowSizeChanged(uint32 width,
+void RemoteWindowTreeHostWin::HandleWindowSizeChanged(uint32 width,
uint32 height) {
SetBounds(gfx::Rect(0, 0, width, height));
}
-bool RemoteRootWindowHostWin::IsForegroundWindow() {
+bool RemoteWindowTreeHostWin::IsForegroundWindow() {
return ::GetForegroundWindow() == remote_window_;
}
-Window* RemoteRootWindowHostWin::GetAshWindow() {
+Window* RemoteWindowTreeHostWin::GetAshWindow() {
return GetRootWindow()->window();
}
-RootWindow* RemoteRootWindowHostWin::GetRootWindow() {
+RootWindow* RemoteWindowTreeHostWin::GetRootWindow() {
return delegate_->AsRootWindow();
}
-gfx::AcceleratedWidget RemoteRootWindowHostWin::GetAcceleratedWidget() {
+gfx::AcceleratedWidget RemoteWindowTreeHostWin::GetAcceleratedWidget() {
if (remote_window_)
return remote_window_;
// Getting here should only happen for ash_unittests.exe and related code.
return ::GetDesktopWindow();
}
-void RemoteRootWindowHostWin::Show() {
+void RemoteWindowTreeHostWin::Show() {
ui::RemoteInputMethodPrivateWin* remote_input_method_private =
GetRemoteInputMethodPrivate();
if (remote_input_method_private)
remote_input_method_private->SetRemoteDelegate(this);
}
-void RemoteRootWindowHostWin::Hide() {
+void RemoteWindowTreeHostWin::Hide() {
NOTIMPLEMENTED();
}
-void RemoteRootWindowHostWin::ToggleFullScreen() {
+void RemoteWindowTreeHostWin::ToggleFullScreen() {
}
-gfx::Rect RemoteRootWindowHostWin::GetBounds() const {
+gfx::Rect RemoteWindowTreeHostWin::GetBounds() const {
return gfx::Rect(window_size_);
}
-void RemoteRootWindowHostWin::SetBounds(const gfx::Rect& bounds) {
+void RemoteWindowTreeHostWin::SetBounds(const gfx::Rect& bounds) {
window_size_ = bounds.size();
NotifyHostResized(bounds.size());
}
-gfx::Insets RemoteRootWindowHostWin::GetInsets() const {
+gfx::Insets RemoteWindowTreeHostWin::GetInsets() const {
return gfx::Insets();
}
-void RemoteRootWindowHostWin::SetInsets(const gfx::Insets& insets) {
+void RemoteWindowTreeHostWin::SetInsets(const gfx::Insets& insets) {
}
-gfx::Point RemoteRootWindowHostWin::GetLocationOnNativeScreen() const {
+gfx::Point RemoteWindowTreeHostWin::GetLocationOnNativeScreen() const {
return gfx::Point(0, 0);
}
-void RemoteRootWindowHostWin::SetCursor(gfx::NativeCursor native_cursor) {
+void RemoteWindowTreeHostWin::SetCursor(gfx::NativeCursor native_cursor) {
if (!host_)
return;
host_->Send(
new MetroViewerHostMsg_SetCursor(uint64(native_cursor.platform())));
}
-void RemoteRootWindowHostWin::SetCapture() {
+void RemoteWindowTreeHostWin::SetCapture() {
}
-void RemoteRootWindowHostWin::ReleaseCapture() {
+void RemoteWindowTreeHostWin::ReleaseCapture() {
}
-bool RemoteRootWindowHostWin::QueryMouseLocation(gfx::Point* location_return) {
+bool RemoteWindowTreeHostWin::QueryMouseLocation(gfx::Point* location_return) {
aura::client::CursorClient* cursor_client =
aura::client::GetCursorClient(GetRootWindow()->window());
if (cursor_client && !cursor_client->IsMouseEventsEnabled()) {
@@ -419,18 +419,18 @@ bool RemoteRootWindowHostWin::QueryMouseLocation(gfx::Point* location_return) {
return true;
}
-bool RemoteRootWindowHostWin::ConfineCursorToRootWindow() {
+bool RemoteWindowTreeHostWin::ConfineCursorToRootWindow() {
return true;
}
-void RemoteRootWindowHostWin::UnConfineCursor() {
+void RemoteWindowTreeHostWin::UnConfineCursor() {
}
-void RemoteRootWindowHostWin::OnCursorVisibilityChanged(bool show) {
+void RemoteWindowTreeHostWin::OnCursorVisibilityChanged(bool show) {
NOTIMPLEMENTED();
}
-void RemoteRootWindowHostWin::MoveCursorTo(const gfx::Point& location) {
+void RemoteWindowTreeHostWin::MoveCursorTo(const gfx::Point& location) {
VLOG(1) << "In MoveCursorTo: " << location.x() << ", " << location.y();
if (!host_)
return;
@@ -455,23 +455,23 @@ void RemoteRootWindowHostWin::MoveCursorTo(const gfx::Point& location) {
host_->Send(new MetroViewerHostMsg_SetCursorPos(location.x(), location.y()));
}
-void RemoteRootWindowHostWin::PostNativeEvent(
+void RemoteWindowTreeHostWin::PostNativeEvent(
const base::NativeEvent& native_event) {
}
-void RemoteRootWindowHostWin::OnDeviceScaleFactorChanged(
+void RemoteWindowTreeHostWin::OnDeviceScaleFactorChanged(
float device_scale_factor) {
NOTIMPLEMENTED();
}
-void RemoteRootWindowHostWin::PrepareForShutdown() {
+void RemoteWindowTreeHostWin::PrepareForShutdown() {
}
-void RemoteRootWindowHostWin::CancelComposition() {
+void RemoteWindowTreeHostWin::CancelComposition() {
host_->Send(new MetroViewerHostMsg_ImeCancelComposition);
}
-void RemoteRootWindowHostWin::OnTextInputClientUpdated(
+void RemoteWindowTreeHostWin::OnTextInputClientUpdated(
const std::vector<int32>& input_scopes,
const std::vector<gfx::Rect>& composition_character_bounds) {
std::vector<metro_viewer::CharacterBounds> character_bounds;
@@ -494,7 +494,7 @@ gfx::Point PointFromNativeEvent(int32 x, int32 y) {
return result;
}
-void RemoteRootWindowHostWin::OnMouseMoved(int32 x, int32 y, int32 flags) {
+void RemoteWindowTreeHostWin::OnMouseMoved(int32 x, int32 y, int32 flags) {
if (ignore_mouse_moves_until_set_cursor_ack_)
return;
@@ -503,7 +503,7 @@ void RemoteRootWindowHostWin::OnMouseMoved(int32 x, int32 y, int32 flags) {
delegate_->OnHostMouseEvent(&event);
}
-void RemoteRootWindowHostWin::OnMouseButton(
+void RemoteWindowTreeHostWin::OnMouseButton(
const MetroViewerHostMsg_MouseButtonParams& params) {
gfx::Point location = PointFromNativeEvent(params.x, params.y);
ui::MouseEvent mouse_event(params.event_type, location, location,
@@ -535,7 +535,7 @@ void RemoteRootWindowHostWin::OnMouseButton(
}
}
-void RemoteRootWindowHostWin::OnKeyDown(uint32 vkey,
+void RemoteWindowTreeHostWin::OnKeyDown(uint32 vkey,
uint32 repeat_count,
uint32 scan_code,
uint32 flags) {
@@ -543,7 +543,7 @@ void RemoteRootWindowHostWin::OnKeyDown(uint32 vkey,
flags, false);
}
-void RemoteRootWindowHostWin::OnKeyUp(uint32 vkey,
+void RemoteWindowTreeHostWin::OnKeyUp(uint32 vkey,
uint32 repeat_count,
uint32 scan_code,
uint32 flags) {
@@ -551,7 +551,7 @@ void RemoteRootWindowHostWin::OnKeyUp(uint32 vkey,
flags, false);
}
-void RemoteRootWindowHostWin::OnChar(uint32 key_code,
+void RemoteWindowTreeHostWin::OnChar(uint32 key_code,
uint32 repeat_count,
uint32 scan_code,
uint32 flags) {
@@ -559,11 +559,11 @@ void RemoteRootWindowHostWin::OnChar(uint32 key_code,
scan_code, flags, true);
}
-void RemoteRootWindowHostWin::OnWindowActivated() {
+void RemoteWindowTreeHostWin::OnWindowActivated() {
delegate_->OnHostActivated();
}
-void RemoteRootWindowHostWin::OnTouchDown(int32 x,
+void RemoteWindowTreeHostWin::OnTouchDown(int32 x,
int32 y,
uint64 timestamp,
uint32 pointer_id) {
@@ -575,7 +575,7 @@ void RemoteRootWindowHostWin::OnTouchDown(int32 x,
delegate_->OnHostTouchEvent(&event);
}
-void RemoteRootWindowHostWin::OnTouchUp(int32 x,
+void RemoteWindowTreeHostWin::OnTouchUp(int32 x,
int32 y,
uint64 timestamp,
uint32 pointer_id) {
@@ -587,7 +587,7 @@ void RemoteRootWindowHostWin::OnTouchUp(int32 x,
delegate_->OnHostTouchEvent(&event);
}
-void RemoteRootWindowHostWin::OnTouchMoved(int32 x,
+void RemoteWindowTreeHostWin::OnTouchMoved(int32 x,
int32 y,
uint64 timestamp,
uint32 pointer_id) {
@@ -599,7 +599,7 @@ void RemoteRootWindowHostWin::OnTouchMoved(int32 x,
delegate_->OnHostTouchEvent(&event);
}
-void RemoteRootWindowHostWin::OnFileSaveAsDone(bool success,
+void RemoteWindowTreeHostWin::OnFileSaveAsDone(bool success,
const base::FilePath& filename,
int filter_index) {
if (success)
@@ -611,7 +611,7 @@ void RemoteRootWindowHostWin::OnFileSaveAsDone(bool success,
}
-void RemoteRootWindowHostWin::OnFileOpenDone(bool success,
+void RemoteWindowTreeHostWin::OnFileOpenDone(bool success,
const base::FilePath& filename) {
if (success)
file_open_completion_callback_.Run(base::FilePath(filename), 0, NULL);
@@ -621,7 +621,7 @@ void RemoteRootWindowHostWin::OnFileOpenDone(bool success,
failure_callback_.Reset();
}
-void RemoteRootWindowHostWin::OnMultiFileOpenDone(
+void RemoteWindowTreeHostWin::OnMultiFileOpenDone(
bool success,
const std::vector<base::FilePath>& files) {
if (success)
@@ -632,7 +632,7 @@ void RemoteRootWindowHostWin::OnMultiFileOpenDone(
failure_callback_.Reset();
}
-void RemoteRootWindowHostWin::OnSelectFolderDone(
+void RemoteWindowTreeHostWin::OnSelectFolderDone(
bool success,
const base::FilePath& folder) {
if (success)
@@ -643,19 +643,19 @@ void RemoteRootWindowHostWin::OnSelectFolderDone(
failure_callback_.Reset();
}
-void RemoteRootWindowHostWin::OnSetCursorPosAck() {
+void RemoteWindowTreeHostWin::OnSetCursorPosAck() {
DCHECK(ignore_mouse_moves_until_set_cursor_ack_);
ignore_mouse_moves_until_set_cursor_ack_ = false;
}
ui::RemoteInputMethodPrivateWin*
-RemoteRootWindowHostWin::GetRemoteInputMethodPrivate() {
+RemoteWindowTreeHostWin::GetRemoteInputMethodPrivate() {
ui::InputMethod* input_method = GetAshWindow()->GetProperty(
aura::client::kRootWindowInputMethodKey);
return ui::RemoteInputMethodPrivateWin::Get(input_method);
}
-void RemoteRootWindowHostWin::OnImeCandidatePopupChanged(bool visible) {
+void RemoteWindowTreeHostWin::OnImeCandidatePopupChanged(bool visible) {
ui::RemoteInputMethodPrivateWin* remote_input_method_private =
GetRemoteInputMethodPrivate();
if (!remote_input_method_private)
@@ -663,7 +663,7 @@ void RemoteRootWindowHostWin::OnImeCandidatePopupChanged(bool visible) {
remote_input_method_private->OnCandidatePopupChanged(visible);
}
-void RemoteRootWindowHostWin::OnImeCompositionChanged(
+void RemoteWindowTreeHostWin::OnImeCompositionChanged(
const base::string16& text,
int32 selection_start,
int32 selection_end,
@@ -678,7 +678,7 @@ void RemoteRootWindowHostWin::OnImeCompositionChanged(
remote_input_method_private->OnCompositionChanged(composition_text);
}
-void RemoteRootWindowHostWin::OnImeTextCommitted(const base::string16& text) {
+void RemoteWindowTreeHostWin::OnImeTextCommitted(const base::string16& text) {
ui::RemoteInputMethodPrivateWin* remote_input_method_private =
GetRemoteInputMethodPrivate();
if (!remote_input_method_private)
@@ -686,7 +686,7 @@ void RemoteRootWindowHostWin::OnImeTextCommitted(const base::string16& text) {
remote_input_method_private->OnTextCommitted(text);
}
-void RemoteRootWindowHostWin::OnImeInputSourceChanged(uint16 language_id,
+void RemoteWindowTreeHostWin::OnImeInputSourceChanged(uint16 language_id,
bool is_ime) {
ui::RemoteInputMethodPrivateWin* remote_input_method_private =
GetRemoteInputMethodPrivate();
@@ -695,7 +695,7 @@ void RemoteRootWindowHostWin::OnImeInputSourceChanged(uint16 language_id,
remote_input_method_private->OnInputSourceChanged(language_id, is_ime);
}
-void RemoteRootWindowHostWin::DispatchKeyboardMessage(ui::EventType type,
+void RemoteWindowTreeHostWin::DispatchKeyboardMessage(ui::EventType type,
uint32 vkey,
uint32 repeat_count,
uint32 scan_code,
@@ -724,7 +724,7 @@ void RemoteRootWindowHostWin::DispatchKeyboardMessage(ui::EventType type,
}
}
-void RemoteRootWindowHostWin::SetEventFlags(uint32 flags) {
+void RemoteWindowTreeHostWin::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 a295109..5be1117 100644
--- a/ui/aura/remote_root_window_host_win.h
+++ b/ui/aura/remote_root_window_host_win.h
@@ -94,17 +94,17 @@ AURA_EXPORT void HandleActivateDesktop(
const base::FilePath& shortcut,
bool ash_exit);
-// RootWindowHost implementaton that receives events from a different
+// WindowTreeHost 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 RemoteRootWindowHostWin
- : public RootWindowHost,
+class AURA_EXPORT RemoteWindowTreeHostWin
+ : public WindowTreeHost,
public ui::internal::RemoteInputMethodDelegateWin {
public:
- // Returns the only RemoteRootWindowHostWin, if this is the first time
+ // Returns the only RemoteWindowTreeHostWin, if this is the first time
// this function is called, it will call Create() wiht empty bounds.
- static RemoteRootWindowHostWin* Instance();
- static RemoteRootWindowHostWin* Create(const gfx::Rect& bounds);
+ static RemoteWindowTreeHostWin* Instance();
+ static RemoteWindowTreeHostWin* 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
@@ -159,8 +159,8 @@ class AURA_EXPORT RemoteRootWindowHostWin
bool IsForegroundWindow();
private:
- explicit RemoteRootWindowHostWin(const gfx::Rect& bounds);
- virtual ~RemoteRootWindowHostWin();
+ explicit RemoteWindowTreeHostWin(const gfx::Rect& bounds);
+ virtual ~RemoteWindowTreeHostWin();
// IPC message handing methods:
void OnMouseMoved(int32 x, int32 y, int32 flags);
@@ -201,7 +201,7 @@ class AURA_EXPORT RemoteRootWindowHostWin
void OnImeTextCommitted(const base::string16& text);
void OnImeInputSourceChanged(uint16 language_id, bool is_ime);
- // RootWindowHost overrides:
+ // WindowTreeHost overrides:
virtual RootWindow* GetRootWindow() OVERRIDE;
virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE;
virtual void Show() OVERRIDE;
@@ -231,7 +231,7 @@ class AURA_EXPORT RemoteRootWindowHostWin
const std::vector<gfx::Rect>& composition_character_bounds) OVERRIDE;
// Helper function to dispatch a keyboard message to the desired target.
- // The default target is the RootWindowHostDelegate. For nested message loop
+ // The default target is the WindowTreeHostDelegate. 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.
@@ -284,7 +284,7 @@ class AURA_EXPORT RemoteRootWindowHostWin
// Current size of this root window.
gfx::Size window_size_;
- DISALLOW_COPY_AND_ASSIGN(RemoteRootWindowHostWin);
+ DISALLOW_COPY_AND_ASSIGN(RemoteWindowTreeHostWin);
};
} // namespace aura
diff --git a/ui/aura/root_window.cc b/ui/aura/root_window.cc
index 5601b894..01f62c7 100644
--- a/ui/aura/root_window.cc
+++ b/ui/aura/root_window.cc
@@ -70,10 +70,10 @@ void SetLastMouseLocation(const Window* root_window,
}
}
-RootWindowHost* CreateHost(RootWindow* root_window,
+WindowTreeHost* CreateHost(RootWindow* root_window,
const RootWindow::CreateParams& params) {
- RootWindowHost* host = params.host ?
- params.host : RootWindowHost::Create(params.initial_bounds);
+ WindowTreeHost* host = params.host ?
+ params.host : WindowTreeHost::Create(params.initial_bounds);
host->set_delegate(root_window);
return host;
}
@@ -190,7 +190,7 @@ void RootWindow::RepostEvent(const ui::LocatedEvent& event) {
}
}
-RootWindowHostDelegate* RootWindow::AsRootWindowHostDelegate() {
+WindowTreeHostDelegate* RootWindow::AsWindowTreeHostDelegate() {
return this;
}
@@ -348,9 +348,9 @@ void RootWindow::OnKeyboardMappingChanged() {
OnKeyboardMappingChanged(this));
}
-void RootWindow::OnRootWindowHostCloseRequested() {
+void RootWindow::OnWindowTreeHostCloseRequested() {
FOR_EACH_OBSERVER(RootWindowObserver, observers_,
- OnRootWindowHostCloseRequested(this));
+ OnWindowTreeHostCloseRequested(this));
}
void RootWindow::AddRootWindowObserver(RootWindowObserver* observer) {
@@ -671,7 +671,7 @@ void RootWindow::OnLayerAnimationAborted(
}
////////////////////////////////////////////////////////////////////////////////
-// RootWindow, RootWindowHostDelegate implementation:
+// RootWindow, WindowTreeHostDelegate implementation:
bool RootWindow::OnHostKeyEvent(ui::KeyEvent* event) {
DispatchDetails details = OnEventFromSource(event);
@@ -728,7 +728,7 @@ void RootWindow::OnHostMoved(const gfx::Point& origin) {
"origin", origin.ToString());
FOR_EACH_OBSERVER(RootWindowObserver, observers_,
- OnRootWindowHostMoved(this, origin));
+ OnWindowTreeHostMoved(this, origin));
}
void RootWindow::OnHostResized(const gfx::Size& size) {
@@ -739,7 +739,7 @@ void RootWindow::OnHostResized(const gfx::Size& size) {
if (details.dispatcher_destroyed)
return;
FOR_EACH_OBSERVER(RootWindowObserver, observers_,
- OnRootWindowHostResized(this));
+ OnWindowTreeHostResized(this));
}
RootWindow* RootWindow::AsRootWindow() {
diff --git a/ui/aura/root_window.h b/ui/aura/root_window.h
index 218d83ad..1b8068e 100644
--- a/ui/aura/root_window.h
+++ b/ui/aura/root_window.h
@@ -46,7 +46,7 @@ class ViewProp;
namespace aura {
class RootWindow;
-class RootWindowHost;
+class WindowTreeHost;
class RootWindowObserver;
class TestScreen;
class WindowTargeter;
@@ -56,7 +56,7 @@ class AURA_EXPORT RootWindow : public ui::EventProcessor,
public ui::GestureEventHelper,
public ui::LayerAnimationObserver,
public aura::client::CaptureDelegate,
- public aura::RootWindowHostDelegate {
+ public aura::WindowTreeHostDelegate {
public:
struct AURA_EXPORT CreateParams {
// CreateParams with initial_bounds and default host in pixel.
@@ -67,13 +67,13 @@ class AURA_EXPORT RootWindow : public ui::EventProcessor,
// A host to use in place of the default one that RootWindow will create.
// NULL by default.
- RootWindowHost* host;
+ WindowTreeHost* host;
};
explicit RootWindow(const CreateParams& params);
virtual ~RootWindow();
- // Returns the RootWindowHost for the specified accelerated widget, or NULL
+ // Returns the WindowTreeHost for the specified accelerated widget, or NULL
// if there is none associated.
static RootWindow* GetForAcceleratedWidget(gfx::AcceleratedWidget widget);
@@ -81,11 +81,11 @@ class AURA_EXPORT RootWindow : public ui::EventProcessor,
return const_cast<Window*>(const_cast<const RootWindow*>(this)->window());
}
const Window* window() const { return window_.get(); }
- RootWindowHost* host() {
- return const_cast<RootWindowHost*>(
+ WindowTreeHost* host() {
+ return const_cast<WindowTreeHost*>(
const_cast<const RootWindow*>(this)->host());
}
- const RootWindowHost* host() const { return host_.get(); }
+ const WindowTreeHost* 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_; }
@@ -101,7 +101,7 @@ class AURA_EXPORT RootWindow : public ui::EventProcessor,
// types (although the latter is currently a no-op).
void RepostEvent(const ui::LocatedEvent& event);
- RootWindowHostDelegate* AsRootWindowHostDelegate();
+ WindowTreeHostDelegate* AsWindowTreeHostDelegate();
// Gets/sets the size of the host window.
void SetHostSize(const gfx::Size& size_in_pixel);
@@ -132,7 +132,7 @@ class AURA_EXPORT RootWindow : public ui::EventProcessor,
// 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 RootWindowHost.
+ // events are dispatched from GestureRecognizer instead of WindowTreeHost.
void DispatchGestureEvent(ui::GestureEvent* event);
// Invoked when |window| is being destroyed.
@@ -161,7 +161,7 @@ class AURA_EXPORT RootWindow : public ui::EventProcessor,
void OnKeyboardMappingChanged();
// The system windowing system has sent a request that we close our window.
- void OnRootWindowHostCloseRequested();
+ void OnWindowTreeHostCloseRequested();
// Add/remove observer. There is no need to remove the observer if
// the root window is being deleted. In particular, you SHOULD NOT remove
@@ -210,7 +210,7 @@ class AURA_EXPORT RootWindow : public ui::EventProcessor,
};
// Updates the event with the appropriate transform for the device scale
- // factor. The RootWindowHostDelegate dispatches events in the physical pixel
+ // factor. The WindowTreeHostDelegate 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.
@@ -272,7 +272,7 @@ class AURA_EXPORT RootWindow : public ui::EventProcessor,
virtual void OnLayerAnimationAborted(
ui::LayerAnimationSequence* animation) OVERRIDE;
- // Overridden from aura::RootWindowHostDelegate:
+ // Overridden from aura::WindowTreeHostDelegate:
virtual bool OnHostKeyEvent(ui::KeyEvent* event) OVERRIDE;
virtual bool OnHostMouseEvent(ui::MouseEvent* event) OVERRIDE;
virtual bool OnHostScrollEvent(ui::ScrollEvent* event) OVERRIDE;
@@ -295,7 +295,7 @@ class AURA_EXPORT RootWindow : public ui::EventProcessor,
// 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 RootWindowHost the coordinates are in terms of
+ // methods dispatch events from WindowTreeHost the coordinates are in terms of
// the root.
ui::EventDispatchDetails DispatchMouseEventImpl(ui::MouseEvent* event)
WARN_UNUSED_RESULT;
@@ -321,7 +321,7 @@ class AURA_EXPORT RootWindow : public ui::EventProcessor,
// TODO(beng): evaluate the ideal ownership model.
scoped_ptr<Window> window_;
- scoped_ptr<RootWindowHost> host_;
+ scoped_ptr<WindowTreeHost> host_;
// Touch ids that are currently down.
uint32 touch_ids_down_;
diff --git a/ui/aura/root_window_host_mac.h b/ui/aura/root_window_host_mac.h
index 20454f0..7cbf082 100644
--- a/ui/aura/root_window_host_mac.h
+++ b/ui/aura/root_window_host_mac.h
@@ -23,13 +23,13 @@ namespace internal {
class TouchEventCalibrate;
}
-class AURA_EXPORT RootWindowHostMac : public RootWindowHost {
+class AURA_EXPORT WindowTreeHostMac : public WindowTreeHost {
public:
- explicit RootWindowHostMac(const gfx::Rect& bounds);
- virtual ~RootWindowHostMac();
+ explicit WindowTreeHostMac(const gfx::Rect& bounds);
+ virtual ~WindowTreeHostMac();
private:
- // RootWindowHost Overrides.
+ // WindowTreeHost Overrides.
virtual RootWindow* GetRootWindow() OVERRIDE;
virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE;
virtual void Show() OVERRIDE;
@@ -55,7 +55,7 @@ class AURA_EXPORT RootWindowHostMac : public RootWindowHost {
private:
base::scoped_nsobject<NSWindow> window_;
- DISALLOW_COPY_AND_ASSIGN(RootWindowHostMac);
+ DISALLOW_COPY_AND_ASSIGN(WindowTreeHostMac);
};
} // namespace aura
diff --git a/ui/aura/root_window_host_mac.mm b/ui/aura/root_window_host_mac.mm
index b06f487..3f18f17 100644
--- a/ui/aura/root_window_host_mac.mm
+++ b/ui/aura/root_window_host_mac.mm
@@ -10,7 +10,7 @@
namespace aura {
-RootWindowHostMac::RootWindowHostMac(const gfx::Rect& bounds) {
+WindowTreeHostMac::WindowTreeHostMac(const gfx::Rect& bounds) {
window_.reset(
[[NSWindow alloc]
initWithContentRect:NSRectFromCGRect(bounds.ToCGRect())
@@ -20,101 +20,101 @@ RootWindowHostMac::RootWindowHostMac(const gfx::Rect& bounds) {
CreateCompositor(GetAcceleratedWidget());
}
-RootWindowHostMac::~RootWindowHostMac() {
+WindowTreeHostMac::~WindowTreeHostMac() {
}
-RootWindow* RootWindowHostMac::GetRootWindow() {
+RootWindow* WindowTreeHostMac::GetRootWindow() {
return delegate_->AsRootWindow();
}
-gfx::AcceleratedWidget RootWindowHostMac::GetAcceleratedWidget() {
+gfx::AcceleratedWidget WindowTreeHostMac::GetAcceleratedWidget() {
return [window_ contentView];
}
-void RootWindowHostMac::Show() {
+void WindowTreeHostMac::Show() {
[window_ makeKeyAndOrderFront:nil];
}
-void RootWindowHostMac::Hide() {
+void WindowTreeHostMac::Hide() {
[window_ orderOut:nil];
}
-void RootWindowHostMac::ToggleFullScreen() {
+void WindowTreeHostMac::ToggleFullScreen() {
}
-gfx::Rect RootWindowHostMac::GetBounds() const {
+gfx::Rect WindowTreeHostMac::GetBounds() const {
return gfx::Rect(NSRectToCGRect([window_ frame]));
}
-void RootWindowHostMac::SetBounds(const gfx::Rect& bounds) {
+void WindowTreeHostMac::SetBounds(const gfx::Rect& bounds) {
[window_ setFrame:NSRectFromCGRect(bounds.ToCGRect()) display:YES animate:NO];
}
-gfx::Insets RootWindowHostMac::GetInsets() const {
+gfx::Insets WindowTreeHostMac::GetInsets() const {
NOTIMPLEMENTED();
return gfx::Insets();
}
-void RootWindowHostMac::SetInsets(const gfx::Insets& insets) {
+void WindowTreeHostMac::SetInsets(const gfx::Insets& insets) {
NOTIMPLEMENTED();
}
-gfx::Point RootWindowHostMac::GetLocationOnNativeScreen() const {
+gfx::Point WindowTreeHostMac::GetLocationOnNativeScreen() const {
NOTIMPLEMENTED();
return gfx::Point(0, 0);
}
-void RootWindowHostMac::SetCapture() {
+void WindowTreeHostMac::SetCapture() {
NOTIMPLEMENTED();
}
-void RootWindowHostMac::ReleaseCapture() {
+void WindowTreeHostMac::ReleaseCapture() {
NOTIMPLEMENTED();
}
-void RootWindowHostMac::SetCursor(gfx::NativeCursor cursor_type) {
+void WindowTreeHostMac::SetCursor(gfx::NativeCursor cursor_type) {
NOTIMPLEMENTED();
}
-bool RootWindowHostMac::QueryMouseLocation(gfx::Point* location_return) {
+bool WindowTreeHostMac::QueryMouseLocation(gfx::Point* location_return) {
NOTIMPLEMENTED();
return false;
}
-bool RootWindowHostMac::ConfineCursorToRootWindow() {
+bool WindowTreeHostMac::ConfineCursorToRootWindow() {
return false;
}
-void RootWindowHostMac::UnConfineCursor() {
+void WindowTreeHostMac::UnConfineCursor() {
NOTIMPLEMENTED();
}
-void RootWindowHostMac::OnCursorVisibilityChanged(bool show) {
+void WindowTreeHostMac::OnCursorVisibilityChanged(bool show) {
NOTIMPLEMENTED();
}
-void RootWindowHostMac::MoveCursorTo(const gfx::Point& location) {
+void WindowTreeHostMac::MoveCursorTo(const gfx::Point& location) {
NOTIMPLEMENTED();
}
-void RootWindowHostMac::PostNativeEvent(const base::NativeEvent& event) {
+void WindowTreeHostMac::PostNativeEvent(const base::NativeEvent& event) {
NOTIMPLEMENTED();
}
-void RootWindowHostMac::OnDeviceScaleFactorChanged(float device_scale_factor) {
+void WindowTreeHostMac::OnDeviceScaleFactorChanged(float device_scale_factor) {
NOTIMPLEMENTED();
}
-void RootWindowHostMac::PrepareForShutdown() {
+void WindowTreeHostMac::PrepareForShutdown() {
NOTIMPLEMENTED();
}
// static
-RootWindowHost* RootWindowHost::Create(const gfx::Rect& bounds) {
- return new RootWindowHostMac(bounds);
+WindowTreeHost* WindowTreeHost::Create(const gfx::Rect& bounds) {
+ return new WindowTreeHostMac(bounds);
}
// static
-gfx::Size RootWindowHost::GetNativeScreenSize() {
+gfx::Size WindowTreeHost::GetNativeScreenSize() {
NOTIMPLEMENTED();
return gfx::Size(1024, 768);
}
diff --git a/ui/aura/root_window_host_ozone.cc b/ui/aura/root_window_host_ozone.cc
index 9f324c2..9bb2a2b 100644
--- a/ui/aura/root_window_host_ozone.cc
+++ b/ui/aura/root_window_host_ozone.cc
@@ -11,7 +11,7 @@
namespace aura {
-RootWindowHostOzone::RootWindowHostOzone(const gfx::Rect& bounds)
+WindowTreeHostOzone::WindowTreeHostOzone(const gfx::Rect& bounds)
: widget_(0),
bounds_(bounds) {
ui::OzonePlatform::Initialize();
@@ -31,11 +31,11 @@ RootWindowHostOzone::RootWindowHostOzone(const gfx::Rect& bounds)
CreateCompositor(GetAcceleratedWidget());
}
-RootWindowHostOzone::~RootWindowHostOzone() {
+WindowTreeHostOzone::~WindowTreeHostOzone() {
base::MessagePumpOzone::Current()->RemoveDispatcherForRootWindow(0);
}
-bool RootWindowHostOzone::Dispatch(const base::NativeEvent& ne) {
+bool WindowTreeHostOzone::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 RootWindowHostOzone::Dispatch(const base::NativeEvent& ne) {
return true;
}
-RootWindow* RootWindowHostOzone::GetRootWindow() {
+RootWindow* WindowTreeHostOzone::GetRootWindow() {
return delegate_->AsRootWindow();
}
-gfx::AcceleratedWidget RootWindowHostOzone::GetAcceleratedWidget() {
+gfx::AcceleratedWidget WindowTreeHostOzone::GetAcceleratedWidget() {
return widget_;
}
-void RootWindowHostOzone::Show() { NOTIMPLEMENTED(); }
+void WindowTreeHostOzone::Show() { NOTIMPLEMENTED(); }
-void RootWindowHostOzone::Hide() { NOTIMPLEMENTED(); }
+void WindowTreeHostOzone::Hide() { NOTIMPLEMENTED(); }
-void RootWindowHostOzone::ToggleFullScreen() { NOTIMPLEMENTED(); }
+void WindowTreeHostOzone::ToggleFullScreen() { NOTIMPLEMENTED(); }
-gfx::Rect RootWindowHostOzone::GetBounds() const { return bounds_; }
+gfx::Rect WindowTreeHostOzone::GetBounds() const { return bounds_; }
-void RootWindowHostOzone::SetBounds(const gfx::Rect& bounds) {
+void WindowTreeHostOzone::SetBounds(const gfx::Rect& bounds) {
NOTIMPLEMENTED();
}
-gfx::Insets RootWindowHostOzone::GetInsets() const { return gfx::Insets(); }
+gfx::Insets WindowTreeHostOzone::GetInsets() const { return gfx::Insets(); }
-void RootWindowHostOzone::SetInsets(const gfx::Insets& insets) {
+void WindowTreeHostOzone::SetInsets(const gfx::Insets& insets) {
NOTIMPLEMENTED();
}
-gfx::Point RootWindowHostOzone::GetLocationOnNativeScreen() const {
+gfx::Point WindowTreeHostOzone::GetLocationOnNativeScreen() const {
return bounds_.origin();
}
-void RootWindowHostOzone::SetCapture() { NOTIMPLEMENTED(); }
+void WindowTreeHostOzone::SetCapture() { NOTIMPLEMENTED(); }
-void RootWindowHostOzone::ReleaseCapture() { NOTIMPLEMENTED(); }
+void WindowTreeHostOzone::ReleaseCapture() { NOTIMPLEMENTED(); }
-void RootWindowHostOzone::SetCursor(gfx::NativeCursor cursor) {
+void WindowTreeHostOzone::SetCursor(gfx::NativeCursor cursor) {
NOTIMPLEMENTED();
}
-bool RootWindowHostOzone::QueryMouseLocation(gfx::Point* location_return) {
+bool WindowTreeHostOzone::QueryMouseLocation(gfx::Point* location_return) {
NOTIMPLEMENTED();
return false;
}
-bool RootWindowHostOzone::ConfineCursorToRootWindow() {
+bool WindowTreeHostOzone::ConfineCursorToRootWindow() {
NOTIMPLEMENTED();
return false;
}
-void RootWindowHostOzone::UnConfineCursor() { NOTIMPLEMENTED(); }
+void WindowTreeHostOzone::UnConfineCursor() { NOTIMPLEMENTED(); }
-void RootWindowHostOzone::OnCursorVisibilityChanged(bool show) {
+void WindowTreeHostOzone::OnCursorVisibilityChanged(bool show) {
NOTIMPLEMENTED();
}
-void RootWindowHostOzone::MoveCursorTo(const gfx::Point& location) {
+void WindowTreeHostOzone::MoveCursorTo(const gfx::Point& location) {
NOTIMPLEMENTED();
}
-void RootWindowHostOzone::PostNativeEvent(
+void WindowTreeHostOzone::PostNativeEvent(
const base::NativeEvent& native_event) {
NOTIMPLEMENTED();
}
-void RootWindowHostOzone::OnDeviceScaleFactorChanged(
+void WindowTreeHostOzone::OnDeviceScaleFactorChanged(
float device_scale_factor) {
NOTIMPLEMENTED();
}
-void RootWindowHostOzone::PrepareForShutdown() { NOTIMPLEMENTED(); }
+void WindowTreeHostOzone::PrepareForShutdown() { NOTIMPLEMENTED(); }
// static
-RootWindowHost* RootWindowHost::Create(const gfx::Rect& bounds) {
- return new RootWindowHostOzone(bounds);
+WindowTreeHost* WindowTreeHost::Create(const gfx::Rect& bounds) {
+ return new WindowTreeHostOzone(bounds);
}
// static
-gfx::Size RootWindowHost::GetNativeScreenSize() {
+gfx::Size WindowTreeHost::GetNativeScreenSize() {
NOTIMPLEMENTED();
return gfx::Size();
}
diff --git a/ui/aura/root_window_host_ozone.h b/ui/aura/root_window_host_ozone.h
index 41f6a8e..a026994 100644
--- a/ui/aura/root_window_host_ozone.h
+++ b/ui/aura/root_window_host_ozone.h
@@ -15,17 +15,17 @@
namespace aura {
-class RootWindowHostOzone : public RootWindowHost,
+class WindowTreeHostOzone : public WindowTreeHost,
public base::MessageLoop::Dispatcher {
public:
- explicit RootWindowHostOzone(const gfx::Rect& bounds);
- virtual ~RootWindowHostOzone();
+ explicit WindowTreeHostOzone(const gfx::Rect& bounds);
+ virtual ~WindowTreeHostOzone();
private:
// Overridden from Dispatcher overrides:
virtual bool Dispatch(const base::NativeEvent& event) OVERRIDE;
- // RootWindowHost Overrides.
+ // WindowTreeHost Overrides.
virtual RootWindow* GetRootWindow() OVERRIDE;
virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE;
virtual void Show() OVERRIDE;
@@ -51,7 +51,7 @@ class RootWindowHostOzone : public RootWindowHost,
gfx::AcceleratedWidget widget_;
gfx::Rect bounds_;
- DISALLOW_COPY_AND_ASSIGN(RootWindowHostOzone);
+ DISALLOW_COPY_AND_ASSIGN(WindowTreeHostOzone);
};
} // namespace aura
diff --git a/ui/aura/root_window_host_win.cc b/ui/aura/root_window_host_win.cc
index 7bf4284..e4ae7f6 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
-RootWindowHost* RootWindowHost::Create(const gfx::Rect& bounds) {
- return new RootWindowHostWin(bounds);
+WindowTreeHost* WindowTreeHost::Create(const gfx::Rect& bounds) {
+ return new WindowTreeHostWin(bounds);
}
// static
-gfx::Size RootWindowHost::GetNativeScreenSize() {
+gfx::Size WindowTreeHost::GetNativeScreenSize() {
return gfx::Size(GetSystemMetrics(SM_CXSCREEN),
GetSystemMetrics(SM_CYSCREEN));
}
-RootWindowHostWin::RootWindowHostWin(const gfx::Rect& bounds)
+WindowTreeHostWin::WindowTreeHostWin(const gfx::Rect& bounds)
: fullscreen_(false),
has_capture_(false),
saved_window_style_(0),
@@ -51,27 +51,27 @@ RootWindowHostWin::RootWindowHostWin(const gfx::Rect& bounds)
CreateCompositor(GetAcceleratedWidget());
}
-RootWindowHostWin::~RootWindowHostWin() {
+WindowTreeHostWin::~WindowTreeHostWin() {
DestroyWindow(hwnd());
}
-RootWindow* RootWindowHostWin::GetRootWindow() {
+RootWindow* WindowTreeHostWin::GetRootWindow() {
return delegate_->AsRootWindow();
}
-gfx::AcceleratedWidget RootWindowHostWin::GetAcceleratedWidget() {
+gfx::AcceleratedWidget WindowTreeHostWin::GetAcceleratedWidget() {
return hwnd();
}
-void RootWindowHostWin::Show() {
+void WindowTreeHostWin::Show() {
ShowWindow(hwnd(), SW_SHOWNORMAL);
}
-void RootWindowHostWin::Hide() {
+void WindowTreeHostWin::Hide() {
NOTIMPLEMENTED();
}
-void RootWindowHostWin::ToggleFullScreen() {
+void WindowTreeHostWin::ToggleFullScreen() {
gfx::Rect target_rect;
if (!fullscreen_) {
fullscreen_ = true;
@@ -103,13 +103,13 @@ void RootWindowHostWin::ToggleFullScreen() {
SWP_NOZORDER | SWP_NOACTIVATE | SWP_FRAMECHANGED);
}
-gfx::Rect RootWindowHostWin::GetBounds() const {
+gfx::Rect WindowTreeHostWin::GetBounds() const {
RECT r;
GetClientRect(hwnd(), &r);
return gfx::Rect(r);
}
-void RootWindowHostWin::SetBounds(const gfx::Rect& bounds) {
+void WindowTreeHostWin::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 RootWindowHostWin::SetBounds(const gfx::Rect& bounds) {
NotifyHostResized(bounds.size());
}
-gfx::Insets RootWindowHostWin::GetInsets() const {
+gfx::Insets WindowTreeHostWin::GetInsets() const {
return gfx::Insets();
}
-void RootWindowHostWin::SetInsets(const gfx::Insets& insets) {
+void WindowTreeHostWin::SetInsets(const gfx::Insets& insets) {
}
-gfx::Point RootWindowHostWin::GetLocationOnNativeScreen() const {
+gfx::Point WindowTreeHostWin::GetLocationOnNativeScreen() const {
RECT r;
GetClientRect(hwnd(), &r);
return gfx::Point(r.left, r.top);
}
-void RootWindowHostWin::SetCursor(gfx::NativeCursor native_cursor) {
+void WindowTreeHostWin::SetCursor(gfx::NativeCursor native_cursor) {
// Custom web cursors are handled directly.
if (native_cursor == ui::kCursorCustom)
return;
@@ -167,21 +167,21 @@ void RootWindowHostWin::SetCursor(gfx::NativeCursor native_cursor) {
::SetCursor(native_cursor.platform());
}
-void RootWindowHostWin::SetCapture() {
+void WindowTreeHostWin::SetCapture() {
if (!has_capture_) {
has_capture_ = true;
::SetCapture(hwnd());
}
}
-void RootWindowHostWin::ReleaseCapture() {
+void WindowTreeHostWin::ReleaseCapture() {
if (has_capture_) {
has_capture_ = false;
::ReleaseCapture();
}
}
-bool RootWindowHostWin::QueryMouseLocation(gfx::Point* location_return) {
+bool WindowTreeHostWin::QueryMouseLocation(gfx::Point* location_return) {
client::CursorClient* cursor_client =
client::GetCursorClient(GetRootWindow()->window());
if (cursor_client && !cursor_client->IsMouseEventsEnabled()) {
@@ -200,44 +200,44 @@ bool RootWindowHostWin::QueryMouseLocation(gfx::Point* location_return) {
pt.y >= 0 && static_cast<int>(pt.y) < size.height());
}
-bool RootWindowHostWin::ConfineCursorToRootWindow() {
+bool WindowTreeHostWin::ConfineCursorToRootWindow() {
RECT window_rect;
GetWindowRect(hwnd(), &window_rect);
return ClipCursor(&window_rect) != 0;
}
-void RootWindowHostWin::UnConfineCursor() {
+void WindowTreeHostWin::UnConfineCursor() {
ClipCursor(NULL);
}
-void RootWindowHostWin::OnCursorVisibilityChanged(bool show) {
+void WindowTreeHostWin::OnCursorVisibilityChanged(bool show) {
NOTIMPLEMENTED();
}
-void RootWindowHostWin::MoveCursorTo(const gfx::Point& location) {
+void WindowTreeHostWin::MoveCursorTo(const gfx::Point& location) {
// Deliberately not implemented.
}
-void RootWindowHostWin::PostNativeEvent(const base::NativeEvent& native_event) {
+void WindowTreeHostWin::PostNativeEvent(const base::NativeEvent& native_event) {
::PostMessage(
hwnd(), native_event.message, native_event.wParam, native_event.lParam);
}
-void RootWindowHostWin::OnDeviceScaleFactorChanged(
+void WindowTreeHostWin::OnDeviceScaleFactorChanged(
float device_scale_factor) {
NOTIMPLEMENTED();
}
-void RootWindowHostWin::PrepareForShutdown() {
+void WindowTreeHostWin::PrepareForShutdown() {
NOTIMPLEMENTED();
}
-void RootWindowHostWin::OnClose() {
+void WindowTreeHostWin::OnClose() {
// TODO: this obviously shouldn't be here.
base::MessageLoopForUI::current()->Quit();
}
-LRESULT RootWindowHostWin::OnKeyEvent(UINT message,
+LRESULT WindowTreeHostWin::OnKeyEvent(UINT message,
WPARAM w_param,
LPARAM l_param) {
MSG msg = { hwnd(), message, w_param, l_param };
@@ -246,7 +246,7 @@ LRESULT RootWindowHostWin::OnKeyEvent(UINT message,
return 0;
}
-LRESULT RootWindowHostWin::OnMouseRange(UINT message,
+LRESULT WindowTreeHostWin::OnMouseRange(UINT message,
WPARAM w_param,
LPARAM l_param) {
MSG msg = { hwnd(), message, w_param, l_param, 0,
@@ -259,7 +259,7 @@ LRESULT RootWindowHostWin::OnMouseRange(UINT message,
return 0;
}
-LRESULT RootWindowHostWin::OnCaptureChanged(UINT message,
+LRESULT WindowTreeHostWin::OnCaptureChanged(UINT message,
WPARAM w_param,
LPARAM l_param) {
if (has_capture_) {
@@ -269,7 +269,7 @@ LRESULT RootWindowHostWin::OnCaptureChanged(UINT message,
return 0;
}
-LRESULT RootWindowHostWin::OnNCActivate(UINT message,
+LRESULT WindowTreeHostWin::OnNCActivate(UINT message,
WPARAM w_param,
LPARAM l_param) {
if (!!w_param)
@@ -277,12 +277,12 @@ LRESULT RootWindowHostWin::OnNCActivate(UINT message,
return DefWindowProc(hwnd(), message, w_param, l_param);
}
-void RootWindowHostWin::OnMove(const CPoint& point) {
+void WindowTreeHostWin::OnMove(const CPoint& point) {
if (delegate_)
delegate_->OnHostMoved(gfx::Point(point.x, point.y));
}
-void RootWindowHostWin::OnPaint(HDC dc) {
+void WindowTreeHostWin::OnPaint(HDC dc) {
gfx::Rect damage_rect;
RECT update_rect = {0};
if (GetUpdateRect(hwnd(), &update_rect, FALSE))
@@ -291,7 +291,7 @@ void RootWindowHostWin::OnPaint(HDC dc) {
ValidateRect(hwnd(), NULL);
}
-void RootWindowHostWin::OnSize(UINT param, const CSize& size) {
+void WindowTreeHostWin::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 3d99821..3833fff 100644
--- a/ui/aura/root_window_host_win.h
+++ b/ui/aura/root_window_host_win.h
@@ -12,11 +12,11 @@
namespace aura {
-class RootWindowHostWin : public RootWindowHost, public gfx::WindowImpl {
+class WindowTreeHostWin : public WindowTreeHost, public gfx::WindowImpl {
public:
- RootWindowHostWin(const gfx::Rect& bounds);
- virtual ~RootWindowHostWin();
- // RootWindowHost:
+ WindowTreeHostWin(const gfx::Rect& bounds);
+ virtual ~WindowTreeHostWin();
+ // WindowTreeHost:
virtual RootWindow* GetRootWindow() OVERRIDE;
virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE;
virtual void Show() OVERRIDE;
@@ -40,7 +40,7 @@ class RootWindowHostWin : public RootWindowHost, public gfx::WindowImpl {
virtual void PrepareForShutdown() OVERRIDE;
private:
- BEGIN_MSG_MAP_EX(RootWindowHostWin)
+ BEGIN_MSG_MAP_EX(WindowTreeHostWin)
// 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 RootWindowHostWin : public RootWindowHost, public gfx::WindowImpl {
DWORD saved_window_style_;
DWORD saved_window_ex_style_;
- DISALLOW_COPY_AND_ASSIGN(RootWindowHostWin);
+ DISALLOW_COPY_AND_ASSIGN(WindowTreeHostWin);
};
namespace test {
-// Set true to let RootWindowHostWin use a popup window
+// Set true to let WindowTreeHostWin 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 f1b8102..ce248e8 100644
--- a/ui/aura/root_window_host_x11.cc
+++ b/ui/aura/root_window_host_x11.cc
@@ -266,7 +266,7 @@ class TouchEventCalibrate : public base::MessagePumpObserver {
} // namespace internal
////////////////////////////////////////////////////////////////////////////////
-// RootWindowHostX11::MouseMoveFilter filters out the move events that
+// WindowTreeHostX11::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.
@@ -274,7 +274,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 RootWindowHostX11::MouseMoveFilter {
+class WindowTreeHostX11::MouseMoveFilter {
public:
MouseMoveFilter() : insert_index_(0) {
for (size_t i = 0; i < kMaxEvents; ++i) {
@@ -307,9 +307,9 @@ class RootWindowHostX11::MouseMoveFilter {
};
////////////////////////////////////////////////////////////////////////////////
-// RootWindowHostX11
+// WindowTreeHostX11
-RootWindowHostX11::RootWindowHostX11(const gfx::Rect& bounds)
+WindowTreeHostX11::WindowTreeHostX11(const gfx::Rect& bounds)
: xdisplay_(gfx::GetXDisplay()),
xwindow_(0),
x_root_window_(DefaultRootWindow(xdisplay_)),
@@ -382,7 +382,7 @@ RootWindowHostX11::RootWindowHostX11(const gfx::Rect& bounds)
CreateCompositor(GetAcceleratedWidget());
}
-RootWindowHostX11::~RootWindowHostX11() {
+WindowTreeHostX11::~WindowTreeHostX11() {
Env::GetInstance()->RemoveObserver(this);
base::MessagePumpX11::Current()->RemoveDispatcherForRootWindow(this);
base::MessagePumpX11::Current()->RemoveDispatcherForWindow(xwindow_);
@@ -392,7 +392,7 @@ RootWindowHostX11::~RootWindowHostX11() {
XDestroyWindow(xdisplay_, xwindow_);
}
-bool RootWindowHostX11::Dispatch(const base::NativeEvent& event) {
+bool WindowTreeHostX11::Dispatch(const base::NativeEvent& event) {
XEvent* xev = event;
if (FindEventTarget(event) == x_root_window_)
@@ -506,7 +506,7 @@ bool RootWindowHostX11::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()->OnRootWindowHostCloseRequested();
+ delegate_->AsRootWindow()->OnWindowTreeHostCloseRequested();
} else if (message_type == atom_cache_.GetAtom("_NET_WM_PING")) {
XEvent reply_event = *xev;
reply_event.xclient.window = x_root_window_;
@@ -561,15 +561,15 @@ bool RootWindowHostX11::Dispatch(const base::NativeEvent& event) {
return true;
}
-RootWindow* RootWindowHostX11::GetRootWindow() {
+RootWindow* WindowTreeHostX11::GetRootWindow() {
return delegate_->AsRootWindow();
}
-gfx::AcceleratedWidget RootWindowHostX11::GetAcceleratedWidget() {
+gfx::AcceleratedWidget WindowTreeHostX11::GetAcceleratedWidget() {
return xwindow_;
}
-void RootWindowHostX11::Show() {
+void WindowTreeHostX11::Show() {
if (!window_mapped_) {
// Before we map the window, set size hints. Otherwise, some window managers
// will ignore toplevel XMoveWindow commands.
@@ -592,22 +592,22 @@ void RootWindowHostX11::Show() {
}
}
-void RootWindowHostX11::Hide() {
+void WindowTreeHostX11::Hide() {
if (window_mapped_) {
XWithdrawWindow(xdisplay_, xwindow_, 0);
window_mapped_ = false;
}
}
-void RootWindowHostX11::ToggleFullScreen() {
+void WindowTreeHostX11::ToggleFullScreen() {
NOTIMPLEMENTED();
}
-gfx::Rect RootWindowHostX11::GetBounds() const {
+gfx::Rect WindowTreeHostX11::GetBounds() const {
return bounds_;
}
-void RootWindowHostX11::SetBounds(const gfx::Rect& bounds) {
+void WindowTreeHostX11::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();
@@ -650,11 +650,11 @@ void RootWindowHostX11::SetBounds(const gfx::Rect& bounds) {
}
}
-gfx::Insets RootWindowHostX11::GetInsets() const {
+gfx::Insets WindowTreeHostX11::GetInsets() const {
return insets_;
}
-void RootWindowHostX11::SetInsets(const gfx::Insets& insets) {
+void WindowTreeHostX11::SetInsets(const gfx::Insets& insets) {
insets_ = insets;
if (pointer_barriers_) {
UnConfineCursor();
@@ -662,26 +662,26 @@ void RootWindowHostX11::SetInsets(const gfx::Insets& insets) {
}
}
-gfx::Point RootWindowHostX11::GetLocationOnNativeScreen() const {
+gfx::Point WindowTreeHostX11::GetLocationOnNativeScreen() const {
return bounds_.origin();
}
-void RootWindowHostX11::SetCapture() {
+void WindowTreeHostX11::SetCapture() {
// TODO(oshima): Grab x input.
}
-void RootWindowHostX11::ReleaseCapture() {
+void WindowTreeHostX11::ReleaseCapture() {
// TODO(oshima): Release x input.
}
-void RootWindowHostX11::SetCursor(gfx::NativeCursor cursor) {
+void WindowTreeHostX11::SetCursor(gfx::NativeCursor cursor) {
if (cursor == current_cursor_)
return;
current_cursor_ = cursor;
SetCursorInternal(cursor);
}
-bool RootWindowHostX11::QueryMouseLocation(gfx::Point* location_return) {
+bool WindowTreeHostX11::QueryMouseLocation(gfx::Point* location_return) {
client::CursorClient* cursor_client =
client::GetCursorClient(GetRootWindow()->window());
if (cursor_client && !cursor_client->IsMouseEventsEnabled()) {
@@ -705,7 +705,7 @@ bool RootWindowHostX11::QueryMouseLocation(gfx::Point* location_return) {
win_y_return >= 0 && win_y_return < bounds_.height());
}
-bool RootWindowHostX11::ConfineCursorToRootWindow() {
+bool WindowTreeHostX11::ConfineCursorToRootWindow() {
#if XFIXES_MAJOR >= 5
DCHECK(!pointer_barriers_.get());
if (pointer_barriers_)
@@ -741,7 +741,7 @@ bool RootWindowHostX11::ConfineCursorToRootWindow() {
return true;
}
-void RootWindowHostX11::UnConfineCursor() {
+void WindowTreeHostX11::UnConfineCursor() {
#if XFIXES_MAJOR >= 5
if (pointer_barriers_) {
XFixesDestroyPointerBarrier(xdisplay_, pointer_barriers_[0]);
@@ -753,17 +753,17 @@ void RootWindowHostX11::UnConfineCursor() {
#endif
}
-void RootWindowHostX11::OnCursorVisibilityChanged(bool show) {
+void WindowTreeHostX11::OnCursorVisibilityChanged(bool show) {
SetCrOSTapPaused(!show);
}
-void RootWindowHostX11::MoveCursorTo(const gfx::Point& location) {
+void WindowTreeHostX11::MoveCursorTo(const gfx::Point& location) {
XWarpPointer(xdisplay_, None, x_root_window_, 0, 0, 0, 0,
bounds_.x() + location.x(),
bounds_.y() + location.y());
}
-void RootWindowHostX11::PostNativeEvent(
+void WindowTreeHostX11::PostNativeEvent(
const base::NativeEvent& native_event) {
DCHECK(xwindow_);
DCHECK(xdisplay_);
@@ -796,18 +796,18 @@ void RootWindowHostX11::PostNativeEvent(
XSendEvent(xdisplay_, xwindow_, False, 0, &xevent);
}
-void RootWindowHostX11::OnDeviceScaleFactorChanged(
+void WindowTreeHostX11::OnDeviceScaleFactorChanged(
float device_scale_factor) {
}
-void RootWindowHostX11::PrepareForShutdown() {
+void WindowTreeHostX11::PrepareForShutdown() {
base::MessagePumpX11::Current()->RemoveDispatcherForWindow(xwindow_);
}
-void RootWindowHostX11::OnWindowInitialized(Window* window) {
+void WindowTreeHostX11::OnWindowInitialized(Window* window) {
}
-void RootWindowHostX11::OnRootWindowInitialized(RootWindow* root_window) {
+void WindowTreeHostX11::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
@@ -823,11 +823,11 @@ void RootWindowHostX11::OnRootWindowInitialized(RootWindow* root_window) {
SetCrOSTapPaused(false);
}
-ui::EventProcessor* RootWindowHostX11::GetEventProcessor() {
+ui::EventProcessor* WindowTreeHostX11::GetEventProcessor() {
return delegate_->GetEventProcessor();
}
-bool RootWindowHostX11::DispatchEventForRootWindow(
+bool WindowTreeHostX11::DispatchEventForRootWindow(
const base::NativeEvent& event) {
switch (event->type) {
case GenericEvent:
@@ -838,13 +838,13 @@ bool RootWindowHostX11::DispatchEventForRootWindow(
return true;
}
-void RootWindowHostX11::DispatchXI2Event(const base::NativeEvent& event) {
+void WindowTreeHostX11::DispatchXI2Event(const base::NativeEvent& event) {
ui::TouchFactory* factory = ui::TouchFactory::GetInstance();
XEvent* xev = event;
if (!factory->ShouldProcessXI2Event(xev))
return;
- TRACE_EVENT1("input", "RootWindowHostX11::DispatchXI2Event",
+ TRACE_EVENT1("input", "WindowTreeHostX11::DispatchXI2Event",
"event_latency_us",
(ui::EventTimeForNow() - ui::EventTimeFromNative(event)).
InMicroseconds());
@@ -970,18 +970,18 @@ void RootWindowHostX11::DispatchXI2Event(const base::NativeEvent& event) {
XFreeEventData(xev->xgeneric.display, &last_event.xcookie);
}
-bool RootWindowHostX11::IsWindowManagerPresent() {
+bool WindowTreeHostX11::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 RootWindowHostX11::SetCursorInternal(gfx::NativeCursor cursor) {
+void WindowTreeHostX11::SetCursorInternal(gfx::NativeCursor cursor) {
XDefineCursor(xdisplay_, xwindow_, cursor.platform());
}
-void RootWindowHostX11::TranslateAndDispatchMouseEvent(
+void WindowTreeHostX11::TranslateAndDispatchMouseEvent(
ui::MouseEvent* event) {
Window* root_window = GetRootWindow()->window();
client::ScreenPositionClient* screen_position_client =
@@ -1003,14 +1003,14 @@ void RootWindowHostX11::TranslateAndDispatchMouseEvent(
delegate_->OnHostMouseEvent(event);
}
-void RootWindowHostX11::UpdateIsInternalDisplay() {
+void WindowTreeHostX11::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 RootWindowHostX11::SetCrOSTapPaused(bool state) {
+void WindowTreeHostX11::SetCrOSTapPaused(bool state) {
#if defined(OS_CHROMEOS)
if (!ui::IsXInput2Available())
return;
@@ -1041,12 +1041,12 @@ void RootWindowHostX11::SetCrOSTapPaused(bool state) {
}
// static
-RootWindowHost* RootWindowHost::Create(const gfx::Rect& bounds) {
- return new RootWindowHostX11(bounds);
+WindowTreeHost* WindowTreeHost::Create(const gfx::Rect& bounds) {
+ return new WindowTreeHostX11(bounds);
}
// static
-gfx::Size RootWindowHost::GetNativeScreenSize() {
+gfx::Size WindowTreeHost::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 d4b3518..ece9642 100644
--- a/ui/aura/root_window_host_x11.h
+++ b/ui/aura/root_window_host_x11.h
@@ -33,18 +33,18 @@ namespace internal {
class TouchEventCalibrate;
}
-class AURA_EXPORT RootWindowHostX11 : public RootWindowHost,
+class AURA_EXPORT WindowTreeHostX11 : public WindowTreeHost,
public base::MessageLoop::Dispatcher,
public ui::EventSource,
public EnvObserver {
public:
- explicit RootWindowHostX11(const gfx::Rect& bounds);
- virtual ~RootWindowHostX11();
+ explicit WindowTreeHostX11(const gfx::Rect& bounds);
+ virtual ~WindowTreeHostX11();
// Overridden from Dispatcher overrides:
virtual bool Dispatch(const base::NativeEvent& event) OVERRIDE;
- // RootWindowHost Overrides.
+ // WindowTreeHost Overrides.
virtual RootWindow* GetRootWindow() OVERRIDE;
virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE;
virtual void Show() OVERRIDE;
@@ -94,7 +94,7 @@ class AURA_EXPORT RootWindowHostX11 : public RootWindowHost,
void SetCursorInternal(gfx::NativeCursor cursor);
// Translates the native mouse location into screen coordinates and and
- // dispatches the event to RootWindowHostDelegate.
+ // dispatches the event to WindowTreeHostDelegate.
void TranslateAndDispatchMouseEvent(ui::MouseEvent* event);
// Update is_internal_display_ based on delegate_ state
@@ -137,13 +137,13 @@ class AURA_EXPORT RootWindowHostX11 : public RootWindowHost,
// Touch ids of which the touch press happens at side bezel region.
uint32 bezel_tracking_ids_;
- DISALLOW_COPY_AND_ASSIGN(RootWindowHostX11);
+ DISALLOW_COPY_AND_ASSIGN(WindowTreeHostX11);
};
namespace test {
// Set the default value of the override redirect flag used to
-// create a X window for RootWindowHostX11.
+// create a X window for WindowTreeHostX11.
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 049e0fa..4070bbe 100644
--- a/ui/aura/root_window_host_x11_unittest.cc
+++ b/ui/aura/root_window_host_x11_unittest.cc
@@ -15,17 +15,17 @@
#include "ui/events/test/events_test_utils_x11.h"
namespace {
-class TestRootWindowHostDelegate : public aura::RootWindowHostDelegate,
+class TestWindowTreeHostDelegate : public aura::WindowTreeHostDelegate,
public ui::EventProcessor,
public ui::EventTarget {
public:
- TestRootWindowHostDelegate() : last_touch_type_(ui::ET_UNKNOWN),
+ TestWindowTreeHostDelegate() : last_touch_type_(ui::ET_UNKNOWN),
last_touch_id_(-1),
last_touch_location_(0, 0) {
}
- virtual ~TestRootWindowHostDelegate() {}
+ virtual ~TestWindowTreeHostDelegate() {}
- // aura::RootWindowHostDelegate:
+ // aura::WindowTreeHostDelegate:
virtual bool OnHostKeyEvent(ui::KeyEvent* event) OVERRIDE {
return true;
}
@@ -96,29 +96,29 @@ class TestRootWindowHostDelegate : public aura::RootWindowHostDelegate,
gfx::Point last_touch_location_;
ui::EventTargeter targeter_;
- DISALLOW_COPY_AND_ASSIGN(TestRootWindowHostDelegate);
+ DISALLOW_COPY_AND_ASSIGN(TestWindowTreeHostDelegate);
};
} // namespace
namespace aura {
-typedef test::AuraTestBase RootWindowHostX11Test;
+typedef test::AuraTestBase WindowTreeHostX11Test;
-// Send X touch events to one RootWindowHost. The RootWindowHost's
+// Send X touch events to one WindowTreeHost. The WindowTreeHost's
// delegate will get corresponding ui::TouchEvent if the touch events
-// are winthin the bound of the RootWindowHost.
-TEST_F(RootWindowHostX11Test, DispatchTouchEventToOneRootWindow) {
+// are winthin the bound of the WindowTreeHost.
+TEST_F(WindowTreeHostX11Test, 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<RootWindowHostX11> root_window_host(
- new RootWindowHostX11(gfx::Rect(0, 0, 2560, 1700)));
- scoped_ptr<TestRootWindowHostDelegate> delegate(
- new TestRootWindowHostDelegate());
+ scoped_ptr<WindowTreeHostX11> root_window_host(
+ new WindowTreeHostX11(gfx::Rect(0, 0, 2560, 1700)));
+ scoped_ptr<TestWindowTreeHostDelegate> delegate(
+ new TestWindowTreeHostDelegate());
root_window_host->set_delegate(delegate.get());
std::vector<unsigned int> devices;
@@ -171,26 +171,26 @@ TEST_F(RootWindowHostX11Test, DispatchTouchEventToOneRootWindow) {
#endif // defined(OS_CHROMEOS)
}
-// Send X touch events to two RootWindowHost. The RootWindowHost which is
+// Send X touch events to two WindowTreeHost. The WindowTreeHost 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(RootWindowHostX11Test, DispatchTouchEventToTwoRootWindow) {
+TEST_F(WindowTreeHostX11Test, DispatchTouchEventToTwoRootWindow) {
// Fake a ChromeOS running env.
const char* kLsbRelease = "CHROMEOS_RELEASE_NAME=Chromium OS\n";
base::SysInfo::SetChromeOSVersionInfoForTest(kLsbRelease, base::Time());
- scoped_ptr<RootWindowHostX11> root_window_host1(
- new RootWindowHostX11(gfx::Rect(0, 0, 2560, 1700)));
- scoped_ptr<TestRootWindowHostDelegate> delegate1(
- new TestRootWindowHostDelegate());
+ scoped_ptr<WindowTreeHostX11> root_window_host1(
+ new WindowTreeHostX11(gfx::Rect(0, 0, 2560, 1700)));
+ scoped_ptr<TestWindowTreeHostDelegate> delegate1(
+ new TestWindowTreeHostDelegate());
root_window_host1->set_delegate(delegate1.get());
int host2_y_offset = 1700;
- scoped_ptr<RootWindowHostX11> root_window_host2(
- new RootWindowHostX11(gfx::Rect(0, host2_y_offset, 1920, 1080)));
- scoped_ptr<TestRootWindowHostDelegate> delegate2(
- new TestRootWindowHostDelegate());
+ scoped_ptr<WindowTreeHostX11> root_window_host2(
+ new WindowTreeHostX11(gfx::Rect(0, host2_y_offset, 1920, 1080)));
+ scoped_ptr<TestWindowTreeHostDelegate> delegate2(
+ new TestWindowTreeHostDelegate());
root_window_host2->set_delegate(delegate2.get());
std::vector<unsigned int> devices;
@@ -203,7 +203,7 @@ TEST_F(RootWindowHostX11Test, 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 RootWindowHost.
+ // 2 Touch events are targeted at the second WindowTreeHost.
ui::ScopedXI2Event scoped_xevent;
scoped_xevent.InitTouchEvent(
0, XI_TouchBegin, 5, gfx::Point(1500, 2500), valuators);
diff --git a/ui/aura/root_window_observer.h b/ui/aura/root_window_observer.h
index bfb8e65..0ef86e1 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 OnRootWindowHostResized(const RootWindow* root) {}
+ virtual void OnWindowTreeHostResized(const RootWindow* root) {}
// Invoked after the RootWindow's host has been moved on screen.
- virtual void OnRootWindowHostMoved(const RootWindow* root,
+ virtual void OnWindowTreeHostMoved(const RootWindow* root,
const gfx::Point& new_origin) {}
// Invoked when the native windowing system sends us a request to close our
// window.
- virtual void OnRootWindowHostCloseRequested(const RootWindow* root) {}
+ virtual void OnWindowTreeHostCloseRequested(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 78c9d3b..645e2f99 100644
--- a/ui/aura/root_window_unittest.cc
+++ b/ui/aura/root_window_unittest.cc
@@ -116,7 +116,7 @@ TEST_F(RootWindowTest, OnHostMouseEvent) {
ui::MouseEvent event1(
ui::ET_MOUSE_PRESSED, point, point, ui::EF_LEFT_MOUSE_BUTTON,
ui::EF_LEFT_MOUSE_BUTTON);
- dispatcher()->AsRootWindowHostDelegate()->OnHostMouseEvent(&event1);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostMouseEvent(&event1);
// Event was tested for non-client area for the target window.
EXPECT_EQ(1, delegate1->non_client_count());
@@ -159,7 +159,7 @@ TEST_F(RootWindowTest, MouseButtonState) {
location,
ui::EF_LEFT_MOUSE_BUTTON,
ui::EF_LEFT_MOUSE_BUTTON));
- dispatcher()->AsRootWindowHostDelegate()->OnHostMouseEvent(event.get());
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostMouseEvent(event.get());
EXPECT_TRUE(Env::GetInstance()->IsMouseButtonDown());
// Additionally press the right.
@@ -169,7 +169,7 @@ TEST_F(RootWindowTest, MouseButtonState) {
location,
ui::EF_LEFT_MOUSE_BUTTON | ui::EF_RIGHT_MOUSE_BUTTON,
ui::EF_RIGHT_MOUSE_BUTTON));
- dispatcher()->AsRootWindowHostDelegate()->OnHostMouseEvent(event.get());
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostMouseEvent(event.get());
EXPECT_TRUE(Env::GetInstance()->IsMouseButtonDown());
// Release the left button.
@@ -179,7 +179,7 @@ TEST_F(RootWindowTest, MouseButtonState) {
location,
ui::EF_RIGHT_MOUSE_BUTTON,
ui::EF_LEFT_MOUSE_BUTTON));
- dispatcher()->AsRootWindowHostDelegate()->OnHostMouseEvent(event.get());
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostMouseEvent(event.get());
EXPECT_TRUE(Env::GetInstance()->IsMouseButtonDown());
// Release the right button. We should ignore the Shift-is-down flag.
@@ -189,7 +189,7 @@ TEST_F(RootWindowTest, MouseButtonState) {
location,
ui::EF_SHIFT_DOWN,
ui::EF_RIGHT_MOUSE_BUTTON));
- dispatcher()->AsRootWindowHostDelegate()->OnHostMouseEvent(event.get());
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostMouseEvent(event.get());
EXPECT_FALSE(Env::GetInstance()->IsMouseButtonDown());
// Press the middle button.
@@ -199,7 +199,7 @@ TEST_F(RootWindowTest, MouseButtonState) {
location,
ui::EF_MIDDLE_MOUSE_BUTTON,
ui::EF_MIDDLE_MOUSE_BUTTON));
- dispatcher()->AsRootWindowHostDelegate()->OnHostMouseEvent(event.get());
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostMouseEvent(event.get());
EXPECT_TRUE(Env::GetInstance()->IsMouseButtonDown());
}
@@ -343,12 +343,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()->AsRootWindowHostDelegate()->OnHostKeyEvent(
+ EXPECT_FALSE(dispatcher()->AsWindowTreeHostDelegate()->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()->AsRootWindowHostDelegate()->OnHostKeyEvent(
+ EXPECT_TRUE(dispatcher()->AsWindowTreeHostDelegate()->OnHostKeyEvent(
&known_event));
EXPECT_EQ(1, filter->num_key_events());
}
@@ -361,7 +361,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()->AsRootWindowHostDelegate()->OnHostKeyEvent(
+ EXPECT_TRUE(dispatcher()->AsWindowTreeHostDelegate()->OnHostKeyEvent(
&key_press));
EXPECT_EQ(1, handler.num_key_events());
@@ -377,14 +377,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()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsWindowTreeHostDelegate()->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()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
EXPECT_EQ(2, filter->num_touch_events());
}
@@ -406,7 +406,7 @@ TEST_F(RootWindowTest, ScrollEventDispatch) {
0, -10,
0, -10,
2);
- dispatcher()->AsRootWindowHostDelegate()->OnHostScrollEvent(&scroll1);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostScrollEvent(&scroll1);
EXPECT_EQ(1, filter->num_scroll_events());
// Scroll event on a window should be dispatched properly.
@@ -417,7 +417,7 @@ TEST_F(RootWindowTest, ScrollEventDispatch) {
-10, 0,
-10, 0,
2);
- dispatcher()->AsRootWindowHostDelegate()->OnHostScrollEvent(&scroll2);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostScrollEvent(&scroll2);
EXPECT_EQ(2, filter->num_scroll_events());
}
@@ -592,7 +592,7 @@ TEST_F(RootWindowTest, MouseMovesHeld) {
ui::MouseEvent mouse_move_event(ui::ET_MOUSE_MOVED, gfx::Point(0, 0),
gfx::Point(0, 0), 0, 0);
- dispatcher()->AsRootWindowHostDelegate()->OnHostMouseEvent(
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostMouseEvent(
&mouse_move_event);
// Discard MOUSE_ENTER.
filter->events().clear();
@@ -602,7 +602,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, 0);
- dispatcher()->AsRootWindowHostDelegate()->OnHostMouseEvent(
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostMouseEvent(
&mouse_dragged_event);
EXPECT_TRUE(filter->events().empty());
@@ -610,7 +610,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, 0);
- dispatcher()->AsRootWindowHostDelegate()->OnHostMouseEvent(
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostMouseEvent(
&mouse_pressed_event);
EXPECT_EQ("MOUSE_DRAGGED MOUSE_PRESSED",
EventTypesToString(filter->events()));
@@ -619,12 +619,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, 0);
- dispatcher()->AsRootWindowHostDelegate()->OnHostMouseEvent(
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostMouseEvent(
&mouse_dragged_event);
- dispatcher()->AsRootWindowHostDelegate()->OnHostMouseEvent(
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostMouseEvent(
&mouse_dragged_event2);
EXPECT_TRUE(filter->events().empty());
- dispatcher()->AsRootWindowHostDelegate()->OnHostMouseEvent(
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostMouseEvent(
&mouse_pressed_event);
EXPECT_EQ("MOUSE_DRAGGED MOUSE_PRESSED",
EventTypesToString(filter->events()));
@@ -632,7 +632,7 @@ TEST_F(RootWindowTest, MouseMovesHeld) {
// Check that on ReleasePointerMoves, held events are not dispatched
// immediately, but posted instead.
- dispatcher()->AsRootWindowHostDelegate()->OnHostMouseEvent(
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostMouseEvent(
&mouse_dragged_event);
dispatcher()->ReleasePointerMoves();
EXPECT_TRUE(filter->events().empty());
@@ -643,10 +643,10 @@ TEST_F(RootWindowTest, MouseMovesHeld) {
// However if another message comes in before the dispatch of the posted
// event, check that the posted event is dispatched before this new event.
dispatcher()->HoldPointerMoves();
- dispatcher()->AsRootWindowHostDelegate()->OnHostMouseEvent(
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostMouseEvent(
&mouse_dragged_event);
dispatcher()->ReleasePointerMoves();
- dispatcher()->AsRootWindowHostDelegate()->OnHostMouseEvent(
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostMouseEvent(
&mouse_pressed_event);
EXPECT_EQ("MOUSE_DRAGGED MOUSE_PRESSED",
EventTypesToString(filter->events()));
@@ -657,10 +657,10 @@ TEST_F(RootWindowTest, MouseMovesHeld) {
// Check that if the other message is another MOUSE_DRAGGED, we still coalesce
// them.
dispatcher()->HoldPointerMoves();
- dispatcher()->AsRootWindowHostDelegate()->OnHostMouseEvent(
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostMouseEvent(
&mouse_dragged_event);
dispatcher()->ReleasePointerMoves();
- dispatcher()->AsRootWindowHostDelegate()->OnHostMouseEvent(
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostMouseEvent(
&mouse_dragged_event2);
EXPECT_EQ("MOUSE_DRAGGED", EventTypesToString(filter->events()));
filter->events().clear();
@@ -681,7 +681,7 @@ TEST_F(RootWindowTest, TouchMovesHeld) {
// test.
ui::TouchEvent touch_pressed_event(ui::ET_TOUCH_PRESSED, gfx::Point(0, 0),
0, base::TimeDelta());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(
&touch_pressed_event);
RunAllPendingInMessageLoop();
filter->events().clear();
@@ -691,13 +691,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()->AsRootWindowHostDelegate()->OnHostTouchEvent(
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(
&touch_moved_event);
EXPECT_TRUE(filter->events().empty());
// Check that on ReleasePointerMoves, held events are not dispatched
// immediately, but posted instead.
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(
&touch_moved_event);
dispatcher()->ReleasePointerMoves();
EXPECT_TRUE(filter->events().empty());
@@ -711,9 +711,9 @@ TEST_F(RootWindowTest, TouchMovesHeld) {
0, base::TimeDelta());
filter->events().clear();
dispatcher()->HoldPointerMoves();
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(
&touch_moved_event);
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(
&touch_released_event);
EXPECT_EQ("TOUCH_MOVED TOUCH_RELEASED GESTURE_TAP_CANCEL GESTURE_END",
EventTypesToString(filter->events()));
@@ -740,20 +740,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, 0);
- dispatcher()->AsRootWindowHostDelegate()->OnHostMouseEvent(&mouse1);
+ dispatcher()->AsWindowTreeHostDelegate()->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, 0);
- dispatcher()->AsRootWindowHostDelegate()->OnHostMouseEvent(&mouse2);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostMouseEvent(&mouse2);
EXPECT_FALSE(filter->events().empty());
filter->events().clear();
// Dispatch a synthetic mouse event when mouse events are disabled.
cursor_client.DisableMouseEvents();
- dispatcher()->AsRootWindowHostDelegate()->OnHostMouseEvent(&mouse2);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostMouseEvent(&mouse2);
EXPECT_TRUE(filter->events().empty());
}
@@ -775,7 +775,7 @@ TEST_F(RootWindowTest, DispatchMouseExitWhenCursorHidden) {
ui::MouseEvent mouse1(ui::ET_MOUSE_MOVED, mouse_location,
mouse_location, 0, 0);
EXPECT_TRUE(filter->events().empty());
- dispatcher()->AsRootWindowHostDelegate()->OnHostMouseEvent(&mouse1);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostMouseEvent(&mouse1);
EXPECT_FALSE(filter->events().empty());
filter->events().clear();
@@ -1226,7 +1226,7 @@ class ValidRootDuringDestructionWindowObserver : public aura::WindowObserver {
} // namespace
#if defined(USE_OZONE)
-// Creating multiple RootWindowHostOzone instances is broken.
+// Creating multiple WindowTreeHostOzone instances is broken.
#define MAYBE_ValidRootDuringDestruction DISABLED_ValidRootDuringDestruction
#else
#define MAYBE_ValidRootDuringDestruction ValidRootDuringDestruction
@@ -1290,8 +1290,8 @@ class DontResetHeldEventWindowDelegate : public test::TestWindowDelegate {
TEST_F(RootWindowTest, DontResetHeldEvent) {
DontResetHeldEventWindowDelegate delegate(root_window());
scoped_ptr<Window> w1(CreateNormalWindow(1, root_window(), &delegate));
- RootWindowHostDelegate* root_window_delegate =
- static_cast<RootWindowHostDelegate*>(root_window()->GetDispatcher());
+ WindowTreeHostDelegate* root_window_delegate =
+ static_cast<WindowTreeHostDelegate*>(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),
@@ -1346,7 +1346,7 @@ class DeleteRootFromHeldMouseEventDelegate : public test::TestWindowDelegate {
} // namespace
#if defined(USE_OZONE)
-// Creating multiple RootWindowHostOzone instances is broken.
+// Creating multiple WindowTreeHostOzone instances is broken.
#define MAYBE_DeleteRootFromHeldMouseEvent DISABLED_DeleteRootFromHeldMouseEvent
#else
#define MAYBE_DeleteRootFromHeldMouseEvent DeleteRootFromHeldMouseEvent
@@ -1383,7 +1383,7 @@ TEST_F(RootWindowTest, WindowHideCancelsActiveTouches) {
gfx::Point position1 = root_window()->bounds().origin();
ui::TouchEvent press(ui::ET_TOUCH_PRESSED, position1, 0, base::TimeDelta());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
EXPECT_EQ("TOUCH_PRESSED GESTURE_BEGIN GESTURE_TAP_DOWN",
EventTypesToString(filter->GetAndResetEvents()));
@@ -1405,13 +1405,13 @@ TEST_F(RootWindowTest, WindowHideCancelsActiveGestures) {
gfx::Point position1 = root_window()->bounds().origin();
gfx::Point position2 = root_window()->bounds().CenterPoint();
ui::TouchEvent press(ui::ET_TOUCH_PRESSED, position1, 0, base::TimeDelta());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
ui::TouchEvent move(ui::ET_TOUCH_MOVED, position2, 0, base::TimeDelta());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move);
ui::TouchEvent press2(ui::ET_TOUCH_PRESSED, position1, 1, base::TimeDelta());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press2);
EXPECT_EQ("TOUCH_PRESSED GESTURE_BEGIN GESTURE_TAP_DOWN TOUCH_MOVED "
"GESTURE_TAP_CANCEL GESTURE_SCROLL_BEGIN GESTURE_SCROLL_UPDATE "
@@ -1442,11 +1442,11 @@ TEST_F(RootWindowTest, EndingEventDoesntRetarget) {
gfx::Point position = window1->bounds().origin();
ui::TouchEvent press(ui::ET_TOUCH_PRESSED, position, 0, base::TimeDelta());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
gfx::Point position2 = window1->bounds().CenterPoint();
ui::TouchEvent move(ui::ET_TOUCH_MOVED, position2, 0, base::TimeDelta());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move);
window2->SetCapture();
diff --git a/ui/aura/test/event_generator.cc b/ui/aura/test/event_generator.cc
index d4a9c3a9..b62d3a8 100644
--- a/ui/aura/test/event_generator.cc
+++ b/ui/aura/test/event_generator.cc
@@ -587,8 +587,8 @@ void EventGenerator::DoDispatchEvent(ui::Event* event, bool async) {
}
pending_events_.push_back(pending_event);
} else {
- RootWindowHostDelegate* root_window_host_delegate =
- current_root_window_->AsRootWindowHostDelegate();
+ WindowTreeHostDelegate* root_window_host_delegate =
+ current_root_window_->AsWindowTreeHostDelegate();
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 ee9ebda..a914a20 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 RootWindowHostWin/RootWindowHostX11.
+// tests for WindowTreeHostWin/WindowTreeHostX11.
//
// 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 225e56e..484a478 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(RootWindowHost::GetNativeScreenSize()));
+ return new TestScreen(gfx::Rect(WindowTreeHost::GetNativeScreenSize()));
}
TestScreen::~TestScreen() {
diff --git a/ui/aura/window_targeter_unittest.cc b/ui/aura/window_targeter_unittest.cc
index 08efdaa..0939281 100644
--- a/ui/aura/window_targeter_unittest.cc
+++ b/ui/aura/window_targeter_unittest.cc
@@ -39,7 +39,7 @@ TEST_F(WindowTargeterTest, Basic) {
gfx::Point(20, 20),
ui::EF_NONE,
ui::EF_NONE);
- root_window()->GetDispatcher()->AsRootWindowHostDelegate()->
+ root_window()->GetDispatcher()->AsWindowTreeHostDelegate()->
OnHostMouseEvent(&press);
EXPECT_EQ(1, handler.num_mouse_events());
diff --git a/ui/aura/window_tree_host.cc b/ui/aura/window_tree_host.cc
index f29039c..65ad754 100644
--- a/ui/aura/window_tree_host.cc
+++ b/ui/aura/window_tree_host.cc
@@ -70,9 +70,9 @@ class SimpleRootWindowTransformer : public RootWindowTransformer {
};
////////////////////////////////////////////////////////////////////////////////
-// RootWindowHost, public:
+// WindowTreeHost, public:
-RootWindowHost::~RootWindowHost() {
+WindowTreeHost::~WindowTreeHost() {
// 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 @@ RootWindowHost::~RootWindowHost() {
compositor_.reset();
}
-void RootWindowHost::InitHost() {
+void WindowTreeHost::InitHost() {
window()->Init(ui::LAYER_NOT_DRAWN);
InitCompositor();
UpdateRootWindowSize(GetBounds().size());
@@ -89,7 +89,7 @@ void RootWindowHost::InitHost() {
window()->Show();
}
-void RootWindowHost::InitCompositor() {
+void WindowTreeHost::InitCompositor() {
compositor_->SetScaleAndSize(GetDeviceScaleFactorFromDisplay(window()),
GetBounds().size());
compositor_->SetRootLayer(window()->layer());
@@ -97,15 +97,15 @@ void RootWindowHost::InitCompositor() {
new SimpleRootWindowTransformer(window(), gfx::Transform()));
}
-aura::Window* RootWindowHost::window() {
- return const_cast<Window*>(const_cast<const RootWindowHost*>(this)->window());
+aura::Window* WindowTreeHost::window() {
+ return const_cast<Window*>(const_cast<const WindowTreeHost*>(this)->window());
}
-const aura::Window* RootWindowHost::window() const {
+const aura::Window* WindowTreeHost::window() const {
return delegate_->AsRootWindow()->window();
}
-void RootWindowHost::SetRootWindowTransformer(
+void WindowTreeHost::SetRootWindowTransformer(
scoped_ptr<RootWindowTransformer> transformer) {
transformer_ = transformer.Pass();
SetInsets(transformer_->GetHostInsets());
@@ -116,7 +116,7 @@ void RootWindowHost::SetRootWindowTransformer(
UpdateRootWindowSize(GetBounds().size());
}
-gfx::Transform RootWindowHost::GetRootTransform() const {
+gfx::Transform WindowTreeHost::GetRootTransform() const {
float scale = ui::GetDeviceScaleFactor(window()->layer());
gfx::Transform transform;
transform.Scale(scale, scale);
@@ -124,61 +124,61 @@ gfx::Transform RootWindowHost::GetRootTransform() const {
return transform;
}
-void RootWindowHost::SetTransform(const gfx::Transform& transform) {
+void WindowTreeHost::SetTransform(const gfx::Transform& transform) {
scoped_ptr<RootWindowTransformer> transformer(
new SimpleRootWindowTransformer(window(), transform));
SetRootWindowTransformer(transformer.Pass());
}
-gfx::Transform RootWindowHost::GetInverseRootTransform() const {
+gfx::Transform WindowTreeHost::GetInverseRootTransform() const {
float scale = ui::GetDeviceScaleFactor(window()->layer());
gfx::Transform transform;
transform.Scale(1.0f / scale, 1.0f / scale);
return transformer_->GetInverseTransform() * transform;
}
-void RootWindowHost::UpdateRootWindowSize(const gfx::Size& host_size) {
+void WindowTreeHost::UpdateRootWindowSize(const gfx::Size& host_size) {
window()->SetBounds(transformer_->GetRootWindowBounds(host_size));
}
-void RootWindowHost::ConvertPointToNativeScreen(gfx::Point* point) const {
+void WindowTreeHost::ConvertPointToNativeScreen(gfx::Point* point) const {
ConvertPointToHost(point);
gfx::Point location = GetLocationOnNativeScreen();
point->Offset(location.x(), location.y());
}
-void RootWindowHost::ConvertPointFromNativeScreen(gfx::Point* point) const {
+void WindowTreeHost::ConvertPointFromNativeScreen(gfx::Point* point) const {
gfx::Point location = GetLocationOnNativeScreen();
point->Offset(-location.x(), -location.y());
ConvertPointFromHost(point);
}
-void RootWindowHost::ConvertPointToHost(gfx::Point* point) const {
+void WindowTreeHost::ConvertPointToHost(gfx::Point* point) const {
gfx::Point3F point_3f(*point);
GetRootTransform().TransformPoint(&point_3f);
*point = gfx::ToFlooredPoint(point_3f.AsPointF());
}
-void RootWindowHost::ConvertPointFromHost(gfx::Point* point) const {
+void WindowTreeHost::ConvertPointFromHost(gfx::Point* point) const {
gfx::Point3F point_3f(*point);
GetInverseRootTransform().TransformPoint(&point_3f);
*point = gfx::ToFlooredPoint(point_3f.AsPointF());
}
////////////////////////////////////////////////////////////////////////////////
-// RootWindowHost, protected:
+// WindowTreeHost, protected:
-RootWindowHost::RootWindowHost()
+WindowTreeHost::WindowTreeHost()
: delegate_(NULL) {
}
-void RootWindowHost::CreateCompositor(
+void WindowTreeHost::CreateCompositor(
gfx::AcceleratedWidget accelerated_widget) {
compositor_.reset(new ui::Compositor(GetAcceleratedWidget()));
DCHECK(compositor_.get());
}
-void RootWindowHost::NotifyHostResized(const gfx::Size& new_size) {
+void WindowTreeHost::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 d437e0a..8006484 100644
--- a/ui/aura/window_tree_host.h
+++ b/ui/aura/window_tree_host.h
@@ -28,18 +28,18 @@ class Compositor;
namespace aura {
class RootWindow;
-class RootWindowHostDelegate;
+class WindowTreeHostDelegate;
class RootWindowTransformer;
-// RootWindowHost bridges between a native window and the embedded RootWindow.
+// WindowTreeHost 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 RootWindowHost {
+class AURA_EXPORT WindowTreeHost {
public:
- virtual ~RootWindowHost();
+ virtual ~WindowTreeHost();
- // Creates a new RootWindowHost. The caller owns the returned value.
- static RootWindowHost* Create(const gfx::Rect& bounds);
+ // Creates a new WindowTreeHost. The caller owns the returned value.
+ static WindowTreeHost* Create(const gfx::Rect& bounds);
void InitHost();
@@ -66,7 +66,7 @@ class AURA_EXPORT RootWindowHost {
// (gfx::Screen only reports on the virtual desktop exposed by Aura.)
static gfx::Size GetNativeScreenSize();
- void set_delegate(RootWindowHostDelegate* delegate) {
+ void set_delegate(WindowTreeHostDelegate* delegate) {
delegate_ = delegate;
}
@@ -90,16 +90,16 @@ class AURA_EXPORT RootWindowHost {
// Returns the accelerated widget.
virtual gfx::AcceleratedWidget GetAcceleratedWidget() = 0;
- // Shows the RootWindowHost.
+ // Shows the WindowTreeHost.
virtual void Show() = 0;
- // Hides the RootWindowHost.
+ // Hides the WindowTreeHost.
virtual void Hide() = 0;
// Toggles the host's full screen state.
virtual void ToggleFullScreen() = 0;
- // Gets/Sets the size of the RootWindowHost.
+ // Gets/Sets the size of the WindowTreeHost.
virtual gfx::Rect GetBounds() const = 0;
virtual void SetBounds(const gfx::Rect& bounds) = 0;
@@ -151,7 +151,7 @@ class AURA_EXPORT RootWindowHost {
protected:
friend class TestScreen; // TODO(beng): see if we can remove/consolidate.
- RootWindowHost();
+ WindowTreeHost();
void CreateCompositor(gfx::AcceleratedWidget accelerated_widget);
@@ -160,14 +160,14 @@ class AURA_EXPORT RootWindowHost {
void NotifyHostResized(const gfx::Size& new_size);
- RootWindowHostDelegate* delegate_;
+ WindowTreeHostDelegate* delegate_;
private:
scoped_ptr<ui::Compositor> compositor_;
scoped_ptr<RootWindowTransformer> transformer_;
- DISALLOW_COPY_AND_ASSIGN(RootWindowHost);
+ DISALLOW_COPY_AND_ASSIGN(WindowTreeHost);
};
} // namespace aura
diff --git a/ui/aura/window_tree_host_delegate.h b/ui/aura/window_tree_host_delegate.h
index 308e838..4428f51 100644
--- a/ui/aura/window_tree_host_delegate.h
+++ b/ui/aura/window_tree_host_delegate.h
@@ -26,9 +26,9 @@ namespace aura {
class RootWindow;
-// A private interface used by RootWindowHost implementations to communicate
+// A private interface used by WindowTreeHost implementations to communicate
// with their owning RootWindow.
-class AURA_EXPORT RootWindowHostDelegate {
+class AURA_EXPORT WindowTreeHostDelegate {
public:
virtual bool OnHostKeyEvent(ui::KeyEvent* event) = 0;
virtual bool OnHostMouseEvent(ui::MouseEvent* event) = 0;
@@ -55,7 +55,7 @@ class AURA_EXPORT RootWindowHostDelegate {
virtual ui::EventProcessor* GetEventProcessor() = 0;
protected:
- virtual ~RootWindowHostDelegate() {}
+ virtual ~WindowTreeHostDelegate() {}
};
} // namespace aura
diff --git a/ui/aura/window_unittest.cc b/ui/aura/window_unittest.cc
index 6117489..dd6fb97 100644
--- a/ui/aura/window_unittest.cc
+++ b/ui/aura/window_unittest.cc
@@ -490,13 +490,13 @@ TEST_F(WindowTest, HitTest) {
ui::TouchEvent pressed(
ui::ET_TOUCH_PRESSED, gfx::Point(50, 50), 0, getTime());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&pressed);
+ dispatcher()->AsWindowTreeHostDelegate()->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()->AsRootWindowHostDelegate()->OnHostTouchEvent(&released);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&released);
EXPECT_FALSE(w1.HitTest(gfx::Point(-2, -2)));
// TODO(beng): clip Window to parent.
@@ -847,7 +847,7 @@ TEST_F(WindowTest, CaptureTests) {
ui::TouchEvent touchev(
ui::ET_TOUCH_PRESSED, gfx::Point(50, 50), 0, getTime());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&touchev);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&touchev);
EXPECT_EQ(1, delegate.touch_event_count());
delegate.ResetCounts();
@@ -863,7 +863,7 @@ TEST_F(WindowTest, CaptureTests) {
ui::TouchEvent touchev2(
ui::ET_TOUCH_PRESSED, gfx::Point(250, 250), 1, getTime());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&touchev2);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&touchev2);
EXPECT_EQ(0, delegate.touch_event_count());
// Removing the capture window from parent should reset the capture window
@@ -886,7 +886,7 @@ TEST_F(WindowTest, TouchCaptureCancelsOtherTouches) {
// Press on w1.
ui::TouchEvent press(
ui::ET_TOUCH_PRESSED, gfx::Point(10, 10), 0, getTime());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
// We will get both GESTURE_BEGIN and GESTURE_TAP_DOWN.
EXPECT_EQ(2, delegate1.gesture_event_count());
delegate1.ResetCounts();
@@ -900,7 +900,7 @@ TEST_F(WindowTest, TouchCaptureCancelsOtherTouches) {
// Events now go to w2.
ui::TouchEvent move(ui::ET_TOUCH_MOVED, gfx::Point(10, 20), 0, getTime());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move);
EXPECT_EQ(0, delegate1.gesture_event_count());
EXPECT_EQ(0, delegate1.touch_event_count());
EXPECT_EQ(0, delegate2.gesture_event_count());
@@ -908,14 +908,14 @@ TEST_F(WindowTest, TouchCaptureCancelsOtherTouches) {
ui::TouchEvent release(
ui::ET_TOUCH_RELEASED, gfx::Point(10, 20), 0, getTime());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsWindowTreeHostDelegate()->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()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2);
+ dispatcher()->AsWindowTreeHostDelegate()->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());
@@ -937,7 +937,7 @@ TEST_F(WindowTest, TouchCaptureDoesntCancelCapturedTouches) {
ui::TouchEvent press(
ui::ET_TOUCH_PRESSED, gfx::Point(10, 10), 0, getTime());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
// We will get both GESTURE_BEGIN and GESTURE_TAP_DOWN.
EXPECT_EQ(2, delegate.gesture_event_count());
@@ -952,7 +952,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()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move);
EXPECT_EQ(1, delegate.touch_event_count());
EXPECT_EQ(3, delegate.gesture_event_count());
delegate.ResetCounts();
@@ -965,7 +965,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()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move2);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move2);
EXPECT_EQ(1, delegate.touch_event_count());
EXPECT_EQ(1, delegate.gesture_event_count());
delegate.ResetCounts();
@@ -973,7 +973,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()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
EXPECT_EQ(1, delegate.touch_event_count());
EXPECT_EQ(2, delegate.gesture_event_count());
}
@@ -986,7 +986,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()->AsRootWindowHostDelegate()->OnHostTouchEvent(&p1);
+ dispatcher()->AsWindowTreeHostDelegate()->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());
@@ -997,7 +997,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()->AsRootWindowHostDelegate()->OnHostTouchEvent(&p2);
+ dispatcher()->AsWindowTreeHostDelegate()->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.
@@ -1033,7 +1033,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()->AsRootWindowHostDelegate()->OnHostTouchEvent(&m3);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&m3);
EXPECT_EQ(0, d1.touch_event_count());
EXPECT_EQ(0, d1.gesture_event_count());
EXPECT_EQ(0, d2.touch_event_count());
@@ -1056,7 +1056,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()->AsRootWindowHostDelegate()->OnHostTouchEvent(&m4);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&m4);
EXPECT_EQ(0, d1.touch_event_count());
EXPECT_EQ(0, d1.gesture_event_count());
EXPECT_EQ(0, d2.touch_event_count());
@@ -1207,7 +1207,7 @@ TEST_F(WindowTest, MouseEnterExit) {
}
// Verifies that the WindowDelegate receives MouseExit from ET_MOUSE_EXITED.
-TEST_F(WindowTest, RootWindowHostExit) {
+TEST_F(WindowTest, WindowTreeHostExit) {
MouseEnterExitWindowDelegate d1;
scoped_ptr<Window> w1(
CreateTestWindowWithDelegate(&d1, 1, gfx::Rect(10, 10, 50, 50),
@@ -1221,7 +1221,7 @@ TEST_F(WindowTest, RootWindowHostExit) {
ui::MouseEvent exit_event(
ui::ET_MOUSE_EXITED, gfx::Point(), gfx::Point(), 0, 0);
- dispatcher()->AsRootWindowHostDelegate()->OnHostMouseEvent(&exit_event);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostMouseEvent(&exit_event);
EXPECT_FALSE(d1.entered());
EXPECT_TRUE(d1.exited());
}
@@ -1578,7 +1578,7 @@ TEST_F(WindowTest, TransformGesture) {
ui::TouchEvent press(
ui::ET_TOUCH_PRESSED, gfx::Point(size.height() - 10, 10), 0, getTime());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsWindowTreeHostDelegate()->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 57678f7..b6b30e2 100644
--- a/ui/base/ime/input_method.h
+++ b/ui/base/ime/input_method.h
@@ -42,7 +42,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::RootWindowHost creates an instance of
+// In Aura environment, aura::WindowTreeHost creates an instance of
// ui::InputMethod and owns it.
class InputMethod {
public:
diff --git a/ui/base/ime/remote_input_method_win.h b/ui/base/ime/remote_input_method_win.h
index 942df98..5258f3d 100644
--- a/ui/base/ime/remote_input_method_win.h
+++ b/ui/base/ime/remote_input_method_win.h
@@ -32,7 +32,7 @@ struct CompositionText;
// metro_driver process via RemoteInputMethodDelegateWin.
// - Data retrieval from RemoteInputMethodPrivateWin is implemented with
// data cache. Whenever the IME state in the metro_driver process is changed,
-// RemoteRootWindowHostWin, which receives IPCs from metro_driver process,
+// RemoteWindowTreeHostWin, which receives IPCs from metro_driver process,
// will call RemoteInputMethodPrivateWin::OnCandidatePopupChanged and/or
// RemoteInputMethodPrivateWin::OnInputSourceChanged accordingly so that
// the state cache should be updated.
diff --git a/ui/events/ozone/event_factory_ozone.h b/ui/events/ozone/event_factory_ozone.h
index 389946a..92c6115 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 RootWindowHostOzone to initialize and start processing events.
+ // Called from WindowTreeHostOzone 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 bdb049d..d8c7b7a 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->AsRootWindowHostDelegate()->OnHostKeyEvent(&event);
+ dispatcher->AsWindowTreeHostDelegate()->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->AsRootWindowHostDelegate()->OnHostKeyEvent(&press_event);
+ dispatcher->AsWindowTreeHostDelegate()->OnHostKeyEvent(&press_event);
ui::KeyEvent release_event(ui::ET_KEY_RELEASED, codex, modifier_flags, 0);
- dispatcher->AsRootWindowHostDelegate()->OnHostKeyEvent(&release_event);
+ dispatcher->AsWindowTreeHostDelegate()->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->AsRootWindowHostDelegate()->OnHostKeyEvent(&press_event);
+ dispatcher->AsWindowTreeHostDelegate()->OnHostKeyEvent(&press_event);
ui::KeyEvent release_event(ui::ET_KEY_RELEASED, codey, modifier_flags, 0);
- dispatcher->AsRootWindowHostDelegate()->OnHostKeyEvent(&release_event);
+ dispatcher->AsWindowTreeHostDelegate()->OnHostKeyEvent(&release_event);
}
return true;
}
@@ -155,7 +155,7 @@ bool SendKeyEvent(const std::string type,
}
ui::KeyEvent event(event_type, code, key_name, modifiers, false);
- dispatcher->AsRootWindowHostDelegate()->OnHostKeyEvent(&event);
+ dispatcher->AsWindowTreeHostDelegate()->OnHostKeyEvent(&event);
}
return true;
}
diff --git a/ui/views/corewm/capture_controller_unittest.cc b/ui/views/corewm/capture_controller_unittest.cc
index c779547..2479ee9 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, 0);
- dispatcher()->AsRootWindowHostDelegate()->OnHostMouseEvent(
+ dispatcher()->AsWindowTreeHostDelegate()->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 fbeb2d3..abc17b0 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()->AsRootWindowHostDelegate()->OnHostKeyEvent(&key);
+ dispatcher()->AsWindowTreeHostDelegate()->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, 0);
enter.set_flags(enter.flags() | ui::EF_IS_SYNTHESIZED);
- dispatcher()->AsRootWindowHostDelegate()->OnHostMouseEvent(&enter);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostMouseEvent(&enter);
EXPECT_FALSE(cursor_client.IsCursorVisible());
ui::MouseEvent move(ui::ET_MOUSE_MOVED, gfx::Point(10, 10),
gfx::Point(10, 10), 0, 0);
move.set_flags(enter.flags() | ui::EF_IS_SYNTHESIZED);
- dispatcher()->AsRootWindowHostDelegate()->OnHostMouseEvent(&move);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostMouseEvent(&move);
EXPECT_FALSE(cursor_client.IsCursorVisible());
ui::MouseEvent real_move(ui::ET_MOUSE_MOVED, gfx::Point(10, 10),
gfx::Point(10, 10), 0, 0);
- dispatcher()->AsRootWindowHostDelegate()->OnHostMouseEvent(&real_move);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostMouseEvent(&real_move);
EXPECT_TRUE(cursor_client.IsCursorVisible());
// Send key event to hide the cursor again.
- dispatcher()->AsRootWindowHostDelegate()->OnHostKeyEvent(&key);
+ dispatcher()->AsWindowTreeHostDelegate()->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, 0);
exit.set_flags(enter.flags() | ui::EF_IS_SYNTHESIZED);
- dispatcher()->AsRootWindowHostDelegate()->OnHostMouseEvent(&exit);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostMouseEvent(&exit);
EXPECT_FALSE(cursor_client.IsCursorVisible());
}
#endif // defined(OS_CHROMEOS)
@@ -114,29 +114,29 @@ TEST_F(CompoundEventFilterTest, TouchHidesCursor) {
ui::MouseEvent mouse0(ui::ET_MOUSE_MOVED, gfx::Point(10, 10),
gfx::Point(10, 10), 0, 0);
- dispatcher()->AsRootWindowHostDelegate()->OnHostMouseEvent(&mouse0);
+ dispatcher()->AsWindowTreeHostDelegate()->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()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press0);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press0);
EXPECT_FALSE(cursor_client.IsMouseEventsEnabled());
ui::TouchEvent move(ui::ET_TOUCH_MOVED, gfx::Point(10, 10), 1, GetTime());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move);
EXPECT_FALSE(cursor_client.IsMouseEventsEnabled());
ui::TouchEvent release(
ui::ET_TOUCH_RELEASED, gfx::Point(10, 10), 1, GetTime());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
EXPECT_FALSE(cursor_client.IsMouseEventsEnabled());
ui::MouseEvent mouse1(ui::ET_MOUSE_MOVED, gfx::Point(10, 10),
gfx::Point(10, 10), 0, 0);
// Move the cursor again. The cursor should be visible.
- dispatcher()->AsRootWindowHostDelegate()->OnHostMouseEvent(&mouse1);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostMouseEvent(&mouse1);
EXPECT_TRUE(cursor_client.IsMouseEventsEnabled());
// Now activate the window and press on it again.
@@ -144,7 +144,7 @@ TEST_F(CompoundEventFilterTest, TouchHidesCursor) {
ui::ET_TOUCH_PRESSED, gfx::Point(90, 90), 1, GetTime());
aura::client::GetActivationClient(
root_window())->ActivateWindow(window.get());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1);
+ dispatcher()->AsWindowTreeHostDelegate()->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 8e9ead8e..8a73691 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_->AsRootWindowHostDelegate()->OnHostKeyEvent(
+ return target_dispatcher_->AsWindowTreeHostDelegate()->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_->AsRootWindowHostDelegate()->OnHostKeyEvent(
+ return target_dispatcher_->AsWindowTreeHostDelegate()->OnHostKeyEvent(
&aura_event);
}
diff --git a/ui/views/corewm/tooltip_win.h b/ui/views/corewm/tooltip_win.h
index e454aac..b031a32 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 DesktopRootWindowHostWin to keep the
+ // HandleNotify() is forwarded from DesktopWindowTreeHostWin 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 5fd0e1e..6db2e4a 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 DesktopRootWindowHostX11 since this
+ // iterating across the windows owned DesktopWindowTreeHostX11 since this
// doesn't rely on having a DesktopScreenX11.
std::vector<aura::Window*> windows =
- DesktopRootWindowHostX11::GetAllOpenWindows();
+ DesktopWindowTreeHostX11::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 8e8711e..e751776 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 DesktopRootWindowHostLinux, while on the other, it
+// X11 events forwarded from DesktopWindowTreeHostLinux, 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 113fd75..9e11ff6 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
-// DesktopRootWindowHostWin. It converts Windows OLE drop messages into
+// DesktopWindowTreeHostWin. 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 e557d3b..d2a0023 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 DesktopRootWindowHost;
+class DesktopWindowTreeHost;
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 DesktopRootWindowHost::Create externally to
+ // Delegates implementation of DesktopWindowTreeHost::Create externally to
// Ozone implementation.
- virtual DesktopRootWindowHost* CreateRootWindowHost(
+ virtual DesktopWindowTreeHost* CreateWindowTreeHost(
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 8a5353c..8e07b79 100644
--- a/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
+++ b/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
@@ -247,7 +247,7 @@ DesktopNativeWidgetAura* DesktopNativeWidgetAura::ForWindow(
void DesktopNativeWidgetAura::OnHostClosed() {
// Don't invoke Widget::OnNativeWidgetDestroying(), its done by
- // DesktopRootWindowHost.
+ // DesktopWindowTreeHost.
// The WindowModalityController is at the front of the event pretarget
// handler list. We destroy it first to preserve order symantics.
@@ -262,7 +262,7 @@ void DesktopNativeWidgetAura::OnHostClosed() {
capture_window->ReleaseCapture();
}
- // DesktopRootWindowHost owns the ActivationController which ShadowController
+ // DesktopWindowTreeHost owns the ActivationController which ShadowController
// references. Make sure we destroy ShadowController early on.
shadow_controller_.reset();
tooltip_manager_.reset();
@@ -287,10 +287,10 @@ void DesktopNativeWidgetAura::OnHostClosed() {
delete this;
}
-void DesktopNativeWidgetAura::OnDesktopRootWindowHostDestroyed(
+void DesktopNativeWidgetAura::OnDesktopWindowTreeHostDestroyed(
aura::RootWindow* root) {
- // |root_window_| is still valid, but DesktopRootWindowHost is nearly
- // destroyed. Do cleanup here of members DesktopRootWindowHost may also use.
+ // |root_window_| is still valid, but DesktopWindowTreeHost is nearly
+ // destroyed. Do cleanup here of members DesktopWindowTreeHost may also use.
aura::client::SetFocusClient(root->window(), NULL);
aura::client::SetActivationClient(root->window(), NULL);
focus_client_.reset();
@@ -369,7 +369,7 @@ void DesktopNativeWidgetAura::InitNativeWidget(
desktop_root_window_host_ = params.desktop_root_window_host ?
params.desktop_root_window_host :
- DesktopRootWindowHost::Create(native_widget_delegate_, this);
+ DesktopWindowTreeHost::Create(native_widget_delegate_, this);
aura::RootWindow::CreateParams rw_params(params.bounds);
desktop_root_window_host_->Init(content_window_, params, &rw_params);
@@ -385,7 +385,7 @@ void DesktopNativeWidgetAura::InitNativeWidget(
new views::corewm::WindowModalityController(root_window_->window()));
// |root_window_event_filter_| must be created before
- // OnRootWindowHostCreated() is invoked.
+ // OnWindowTreeHostCreated() 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-
@@ -438,7 +438,7 @@ void DesktopNativeWidgetAura::InitNativeWidget(
focus_client_->FocusWindow(content_window_);
- OnRootWindowHostResized(root_window_.get());
+ OnWindowTreeHostResized(root_window_.get());
root_window_->AddRootWindowObserver(this);
@@ -637,7 +637,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::OnRootWindowHostResized function.
+ // the DesktopNativeWidgetAura::OnWindowTreeHostResized function.
float scale = 1;
aura::Window* root = root_window_->window();
if (root) {
@@ -647,7 +647,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_->AsRootWindowHost()->SetBounds(bounds_in_pixels);
+ desktop_root_window_host_->AsWindowTreeHost()->SetBounds(bounds_in_pixels);
}
void DesktopNativeWidgetAura::SetSize(const gfx::Size& size) {
@@ -689,14 +689,14 @@ void DesktopNativeWidgetAura::CloseNow() {
void DesktopNativeWidgetAura::Show() {
if (!content_window_)
return;
- desktop_root_window_host_->AsRootWindowHost()->Show();
+ desktop_root_window_host_->AsWindowTreeHost()->Show();
content_window_->Show();
}
void DesktopNativeWidgetAura::Hide() {
if (!content_window_)
return;
- desktop_root_window_host_->AsRootWindowHost()->Hide();
+ desktop_root_window_host_->AsWindowTreeHost()->Hide();
content_window_->Hide();
}
@@ -853,7 +853,7 @@ void DesktopNativeWidgetAura::SetVisibilityChangedAnimationsEnabled(
}
ui::NativeTheme* DesktopNativeWidgetAura::GetNativeTheme() const {
- return DesktopRootWindowHost::GetNativeTheme(content_window_);
+ return DesktopWindowTreeHost::GetNativeTheme(content_window_);
}
void DesktopNativeWidgetAura::OnRootViewLayout() const {
@@ -1081,12 +1081,12 @@ int DesktopNativeWidgetAura::OnPerformDrop(const ui::DropTargetEvent& event) {
////////////////////////////////////////////////////////////////////////////////
// DesktopNativeWidgetAura, aura::RootWindowObserver implementation:
-void DesktopNativeWidgetAura::OnRootWindowHostCloseRequested(
+void DesktopNativeWidgetAura::OnWindowTreeHostCloseRequested(
const aura::RootWindow* root) {
Close();
}
-void DesktopNativeWidgetAura::OnRootWindowHostResized(
+void DesktopNativeWidgetAura::OnWindowTreeHostResized(
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
@@ -1102,10 +1102,10 @@ void DesktopNativeWidgetAura::OnRootWindowHostResized(
native_widget_delegate_->OnNativeWidgetSizeChanged(new_bounds.size());
}
-void DesktopNativeWidgetAura::OnRootWindowHostMoved(
+void DesktopNativeWidgetAura::OnWindowTreeHostMoved(
const aura::RootWindow* root,
const gfx::Point& new_origin) {
- TRACE_EVENT1("views", "DesktopNativeWidgetAura::OnRootWindowHostMoved",
+ TRACE_EVENT1("views", "DesktopNativeWidgetAura::OnWindowTreeHostMoved",
"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 c5ac716..74ef634 100644
--- a/ui/views/widget/desktop_aura/desktop_native_widget_aura.h
+++ b/ui/views/widget/desktop_aura/desktop_native_widget_aura.h
@@ -42,7 +42,7 @@ class DesktopCaptureClient;
class DesktopDispatcherClient;
class DesktopEventClient;
class DesktopNativeCursorManager;
-class DesktopRootWindowHost;
+class DesktopWindowTreeHost;
class DropHelper;
class FocusManagerEventHandler;
class TooltipManagerAura;
@@ -64,13 +64,13 @@ class VIEWS_EXPORT DesktopNativeWidgetAura
// Maps from window to DesktopNativeWidgetAura.
static DesktopNativeWidgetAura* ForWindow(aura::Window* window);
- // Called by our DesktopRootWindowHost after it has deleted native resources;
+ // Called by our DesktopWindowTreeHost after it has deleted native resources;
// this is the signal that we should start our shutdown.
virtual void OnHostClosed();
- // Called from ~DesktopRootWindowHost. This takes the RootWindow as by the
+ // Called from ~DesktopWindowTreeHost. This takes the RootWindow as by the
// time we get here |root_window_| is NULL.
- virtual void OnDesktopRootWindowHostDestroyed(aura::RootWindow* root);
+ virtual void OnDesktopWindowTreeHostDestroyed(aura::RootWindow* root);
corewm::InputMethodEventFilter* input_method_event_filter() {
return input_method_event_filter_.get();
@@ -222,10 +222,10 @@ class VIEWS_EXPORT DesktopNativeWidgetAura
virtual int OnPerformDrop(const ui::DropTargetEvent& event) OVERRIDE;
// Overridden from aura::RootWindowObserver:
- virtual void OnRootWindowHostCloseRequested(
+ virtual void OnWindowTreeHostCloseRequested(
const aura::RootWindow* root) OVERRIDE;
- virtual void OnRootWindowHostResized(const aura::RootWindow* root) OVERRIDE;
- virtual void OnRootWindowHostMoved(const aura::RootWindow* root,
+ virtual void OnWindowTreeHostResized(const aura::RootWindow* root) OVERRIDE;
+ virtual void OnWindowTreeHostMoved(const aura::RootWindow* root,
const gfx::Point& new_origin) OVERRIDE;
private:
@@ -244,7 +244,7 @@ class VIEWS_EXPORT DesktopNativeWidgetAura
scoped_ptr<DesktopCaptureClient> capture_client_;
// The NativeWidget owns the RootWindow. Required because the RootWindow owns
- // its RootWindowHost, so DesktopRootWindowHost can't own it.
+ // its WindowTreeHost, so DesktopWindowTreeHost can't own it.
scoped_ptr<aura::RootWindow> root_window_;
// The following factory is used for calls to close the NativeWidgetAura
@@ -255,7 +255,7 @@ class VIEWS_EXPORT DesktopNativeWidgetAura
bool can_activate_;
// Ownership passed to RootWindow on Init.
- DesktopRootWindowHost* desktop_root_window_host_;
+ DesktopWindowTreeHost* 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 fed998e..9330bf6 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 RootWindowHost;
+class WindowTreeHost;
class Window;
namespace client {
@@ -42,11 +42,11 @@ class NativeWidgetDelegate;
class DesktopNativeCursorManager;
class DesktopNativeWidgetAura;
-class VIEWS_EXPORT DesktopRootWindowHost {
+class VIEWS_EXPORT DesktopWindowTreeHost {
public:
- virtual ~DesktopRootWindowHost() {}
+ virtual ~DesktopWindowTreeHost() {}
- static DesktopRootWindowHost* Create(
+ static DesktopWindowTreeHost* Create(
internal::NativeWidgetDelegate* native_widget_delegate,
DesktopNativeWidgetAura* desktop_native_widget_aura);
@@ -64,19 +64,19 @@ class VIEWS_EXPORT DesktopRootWindowHost {
// Creates and returns the Tooltip implementation to use. Return value is
// owned by DesktopNativeWidgetAura and lives as long as
- // DesktopRootWindowHost.
+ // DesktopWindowTreeHost.
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
- // DesktopRootWindowHost.
+ // DesktopWindowTreeHost.
virtual scoped_ptr<aura::client::DragDropClient> CreateDragDropClient(
DesktopNativeCursorManager* cursor_manager) = 0;
virtual void Close() = 0;
virtual void CloseNow() = 0;
- virtual aura::RootWindowHost* AsRootWindowHost() = 0;
+ virtual aura::WindowTreeHost* AsWindowTreeHost() = 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 f430b38..c8e8a48 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 DesktopRootWindowHostObserverX11 {
+class VIEWS_EXPORT DesktopWindowTreeHostObserverX11 {
public:
- virtual ~DesktopRootWindowHostObserverX11() {}
+ virtual ~DesktopWindowTreeHostObserverX11() {}
// 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 ffca2a6..e327cb1 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 {
-DesktopRootWindowHost* DesktopRootWindowHost::Create(
+DesktopWindowTreeHost* DesktopWindowTreeHost::Create(
internal::NativeWidgetDelegate* native_widget_delegate,
DesktopNativeWidgetAura* desktop_native_widget_aura) {
DesktopFactoryOzone* d_factory = DesktopFactoryOzone::GetInstance();
- return d_factory->CreateRootWindowHost(native_widget_delegate,
+ return d_factory->CreateWindowTreeHost(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 388b40d..f82b915 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
@@ -64,14 +64,14 @@ void InsetBottomRight(gfx::Rect* rect, gfx::Vector2d vector) {
DEFINE_WINDOW_PROPERTY_KEY(aura::Window*, kContentWindowForRootWindow, NULL);
-// Identifies the DesktopRootWindowHostWin associated with the RootWindow.
-DEFINE_WINDOW_PROPERTY_KEY(DesktopRootWindowHostWin*, kDesktopRootWindowHostKey,
+// Identifies the DesktopWindowTreeHostWin associated with the RootWindow.
+DEFINE_WINDOW_PROPERTY_KEY(DesktopWindowTreeHostWin*, kDesktopWindowTreeHostKey,
NULL);
////////////////////////////////////////////////////////////////////////////////
-// DesktopRootWindowHostWin, public:
+// DesktopWindowTreeHostWin, public:
-DesktopRootWindowHostWin::DesktopRootWindowHostWin(
+DesktopWindowTreeHostWin::DesktopWindowTreeHostWin(
internal::NativeWidgetDelegate* native_widget_delegate,
DesktopNativeWidgetAura* desktop_native_widget_aura)
: root_window_(NULL),
@@ -87,20 +87,20 @@ DesktopRootWindowHostWin::DesktopRootWindowHostWin(
is_cursor_visible_(true) {
}
-DesktopRootWindowHostWin::~DesktopRootWindowHostWin() {
+DesktopWindowTreeHostWin::~DesktopWindowTreeHostWin() {
// WARNING: |content_window_| has been destroyed by the time we get here.
- desktop_native_widget_aura_->OnDesktopRootWindowHostDestroyed(
+ desktop_native_widget_aura_->OnDesktopWindowTreeHostDestroyed(
root_window_);
}
// static
-aura::Window* DesktopRootWindowHostWin::GetContentWindowForHWND(HWND hwnd) {
+aura::Window* DesktopWindowTreeHostWin::GetContentWindowForHWND(HWND hwnd) {
aura::RootWindow* root = aura::RootWindow::GetForAcceleratedWidget(hwnd);
return root ? root->window()->GetProperty(kContentWindowForRootWindow) : NULL;
}
// static
-ui::NativeTheme* DesktopRootWindowHost::GetNativeTheme(aura::Window* window) {
+ui::NativeTheme* DesktopWindowTreeHost::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 =
@@ -108,7 +108,7 @@ ui::NativeTheme* DesktopRootWindowHost::GetNativeTheme(aura::Window* window) {
if (dispatcher) {
HWND host_hwnd = dispatcher->host()->GetAcceleratedWidget();
if (host_hwnd &&
- DesktopRootWindowHostWin::GetContentWindowForHWND(host_hwnd)) {
+ DesktopWindowTreeHostWin::GetContentWindowForHWND(host_hwnd)) {
return ui::NativeThemeWin::instance();
}
}
@@ -116,9 +116,9 @@ ui::NativeTheme* DesktopRootWindowHost::GetNativeTheme(aura::Window* window) {
}
////////////////////////////////////////////////////////////////////////////////
-// DesktopRootWindowHostWin, DesktopRootWindowHost implementation:
+// DesktopWindowTreeHostWin, DesktopWindowTreeHost implementation:
-void DesktopRootWindowHostWin::Init(
+void DesktopWindowTreeHostWin::Init(
aura::Window* content_window,
const Widget::InitParams& params,
aura::RootWindow::CreateParams* rw_create_params) {
@@ -148,7 +148,7 @@ void DesktopRootWindowHostWin::Init(
rw_create_params->host = this;
}
-void DesktopRootWindowHostWin::OnRootWindowCreated(
+void DesktopWindowTreeHostWin::OnRootWindowCreated(
aura::RootWindow* root,
const Widget::InitParams& params) {
root_window_ = root;
@@ -161,7 +161,7 @@ void DesktopRootWindowHostWin::OnRootWindowCreated(
root_window_->window()->SetProperty(kContentWindowForRootWindow,
content_window_);
- root_window_->window()->SetProperty(kDesktopRootWindowHostKey, this);
+ root_window_->window()->SetProperty(kDesktopWindowTreeHostKey, this);
should_animate_window_close_ =
content_window_->type() != ui::wm::WINDOW_TYPE_NORMAL &&
@@ -171,21 +171,21 @@ void DesktopRootWindowHostWin::OnRootWindowCreated(
SetWindowTransparency();
}
-scoped_ptr<corewm::Tooltip> DesktopRootWindowHostWin::CreateTooltip() {
+scoped_ptr<corewm::Tooltip> DesktopWindowTreeHostWin::CreateTooltip() {
DCHECK(!tooltip_);
tooltip_ = new corewm::TooltipWin(GetAcceleratedWidget());
return scoped_ptr<corewm::Tooltip>(tooltip_);
}
scoped_ptr<aura::client::DragDropClient>
-DesktopRootWindowHostWin::CreateDragDropClient(
+DesktopWindowTreeHostWin::CreateDragDropClient(
DesktopNativeCursorManager* cursor_manager) {
drag_drop_client_ = new DesktopDragDropClientWin(root_window_->window(),
GetHWND());
return scoped_ptr<aura::client::DragDropClient>(drag_drop_client_).Pass();
}
-void DesktopRootWindowHostWin::Close() {
+void DesktopWindowTreeHostWin::Close() {
// TODO(beng): Move this entire branch to DNWA so it can be shared with X11.
if (should_animate_window_close_) {
pending_close_ = true;
@@ -201,30 +201,30 @@ void DesktopRootWindowHostWin::Close() {
}
}
-void DesktopRootWindowHostWin::CloseNow() {
+void DesktopWindowTreeHostWin::CloseNow() {
message_handler_->CloseNow();
}
-aura::RootWindowHost* DesktopRootWindowHostWin::AsRootWindowHost() {
+aura::WindowTreeHost* DesktopWindowTreeHostWin::AsWindowTreeHost() {
return this;
}
-void DesktopRootWindowHostWin::ShowWindowWithState(
+void DesktopWindowTreeHostWin::ShowWindowWithState(
ui::WindowShowState show_state) {
message_handler_->ShowWindowWithState(show_state);
}
-void DesktopRootWindowHostWin::ShowMaximizedWithBounds(
+void DesktopWindowTreeHostWin::ShowMaximizedWithBounds(
const gfx::Rect& restored_bounds) {
gfx::Rect pixel_bounds = gfx::win::DIPToScreenRect(restored_bounds);
message_handler_->ShowMaximizedWithBounds(pixel_bounds);
}
-bool DesktopRootWindowHostWin::IsVisible() const {
+bool DesktopWindowTreeHostWin::IsVisible() const {
return message_handler_->IsVisible();
}
-void DesktopRootWindowHostWin::SetSize(const gfx::Size& size) {
+void DesktopWindowTreeHostWin::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);
@@ -234,11 +234,11 @@ void DesktopRootWindowHostWin::SetSize(const gfx::Size& size) {
message_handler_->SetSize(expanded);
}
-void DesktopRootWindowHostWin::StackAtTop() {
+void DesktopWindowTreeHostWin::StackAtTop() {
message_handler_->StackAtTop();
}
-void DesktopRootWindowHostWin::CenterWindow(const gfx::Size& size) {
+void DesktopWindowTreeHostWin::CenterWindow(const gfx::Size& size) {
gfx::Size expanded_size;
expanded_size = GetExpandedWindowSize(
message_handler_->window_ex_style(), size);
@@ -246,7 +246,7 @@ void DesktopRootWindowHostWin::CenterWindow(const gfx::Size& size) {
message_handler_->CenterWindow(size_in_pixels);
}
-void DesktopRootWindowHostWin::GetWindowPlacement(
+void DesktopWindowTreeHostWin::GetWindowPlacement(
gfx::Rect* bounds,
ui::WindowShowState* show_state) const {
message_handler_->GetWindowPlacement(bounds, show_state);
@@ -254,25 +254,25 @@ void DesktopRootWindowHostWin::GetWindowPlacement(
*bounds = gfx::win::ScreenToDIPRect(*bounds);
}
-gfx::Rect DesktopRootWindowHostWin::GetWindowBoundsInScreen() const {
+gfx::Rect DesktopWindowTreeHostWin::GetWindowBoundsInScreen() const {
gfx::Rect pixel_bounds = message_handler_->GetWindowBoundsInScreen();
InsetBottomRight(&pixel_bounds, window_enlargement_);
return gfx::win::ScreenToDIPRect(pixel_bounds);
}
-gfx::Rect DesktopRootWindowHostWin::GetClientAreaBoundsInScreen() const {
+gfx::Rect DesktopWindowTreeHostWin::GetClientAreaBoundsInScreen() const {
gfx::Rect pixel_bounds = message_handler_->GetClientAreaBoundsInScreen();
InsetBottomRight(&pixel_bounds, window_enlargement_);
return gfx::win::ScreenToDIPRect(pixel_bounds);
}
-gfx::Rect DesktopRootWindowHostWin::GetRestoredBounds() const {
+gfx::Rect DesktopWindowTreeHostWin::GetRestoredBounds() const {
gfx::Rect pixel_bounds = message_handler_->GetRestoredBounds();
InsetBottomRight(&pixel_bounds, window_enlargement_);
return gfx::win::ScreenToDIPRect(pixel_bounds);
}
-gfx::Rect DesktopRootWindowHostWin::GetWorkAreaBoundsInScreen() const {
+gfx::Rect DesktopWindowTreeHostWin::GetWorkAreaBoundsInScreen() const {
MONITORINFO monitor_info;
monitor_info.cbSize = sizeof(monitor_info);
GetMonitorInfo(MonitorFromWindow(message_handler_->hwnd(),
@@ -282,7 +282,7 @@ gfx::Rect DesktopRootWindowHostWin::GetWorkAreaBoundsInScreen() const {
return gfx::win::ScreenToDIPRect(pixel_bounds);
}
-void DesktopRootWindowHostWin::SetShape(gfx::NativeRegion native_region) {
+void DesktopWindowTreeHostWin::SetShape(gfx::NativeRegion native_region) {
if (native_region) {
message_handler_->SetRegion(gfx::CreateHRGNFromSkRegion(*native_region));
} else {
@@ -292,59 +292,59 @@ void DesktopRootWindowHostWin::SetShape(gfx::NativeRegion native_region) {
delete native_region;
}
-void DesktopRootWindowHostWin::Activate() {
+void DesktopWindowTreeHostWin::Activate() {
message_handler_->Activate();
}
-void DesktopRootWindowHostWin::Deactivate() {
+void DesktopWindowTreeHostWin::Deactivate() {
message_handler_->Deactivate();
}
-bool DesktopRootWindowHostWin::IsActive() const {
+bool DesktopWindowTreeHostWin::IsActive() const {
return message_handler_->IsActive();
}
-void DesktopRootWindowHostWin::Maximize() {
+void DesktopWindowTreeHostWin::Maximize() {
message_handler_->Maximize();
}
-void DesktopRootWindowHostWin::Minimize() {
+void DesktopWindowTreeHostWin::Minimize() {
message_handler_->Minimize();
}
-void DesktopRootWindowHostWin::Restore() {
+void DesktopWindowTreeHostWin::Restore() {
message_handler_->Restore();
}
-bool DesktopRootWindowHostWin::IsMaximized() const {
+bool DesktopWindowTreeHostWin::IsMaximized() const {
return message_handler_->IsMaximized();
}
-bool DesktopRootWindowHostWin::IsMinimized() const {
+bool DesktopWindowTreeHostWin::IsMinimized() const {
return message_handler_->IsMinimized();
}
-bool DesktopRootWindowHostWin::HasCapture() const {
+bool DesktopWindowTreeHostWin::HasCapture() const {
return message_handler_->HasCapture();
}
-void DesktopRootWindowHostWin::SetAlwaysOnTop(bool always_on_top) {
+void DesktopWindowTreeHostWin::SetAlwaysOnTop(bool always_on_top) {
message_handler_->SetAlwaysOnTop(always_on_top);
}
-bool DesktopRootWindowHostWin::IsAlwaysOnTop() const {
+bool DesktopWindowTreeHostWin::IsAlwaysOnTop() const {
return message_handler_->IsAlwaysOnTop();
}
-bool DesktopRootWindowHostWin::SetWindowTitle(const base::string16& title) {
+bool DesktopWindowTreeHostWin::SetWindowTitle(const base::string16& title) {
return message_handler_->SetTitle(title);
}
-void DesktopRootWindowHostWin::ClearNativeFocus() {
+void DesktopWindowTreeHostWin::ClearNativeFocus() {
message_handler_->ClearNativeFocus();
}
-Widget::MoveLoopResult DesktopRootWindowHostWin::RunMoveLoop(
+Widget::MoveLoopResult DesktopWindowTreeHostWin::RunMoveLoop(
const gfx::Vector2d& drag_offset,
Widget::MoveLoopSource source,
Widget::MoveLoopEscapeBehavior escape_behavior) {
@@ -354,31 +354,31 @@ Widget::MoveLoopResult DesktopRootWindowHostWin::RunMoveLoop(
Widget::MOVE_LOOP_SUCCESSFUL : Widget::MOVE_LOOP_CANCELED;
}
-void DesktopRootWindowHostWin::EndMoveLoop() {
+void DesktopWindowTreeHostWin::EndMoveLoop() {
message_handler_->EndMoveLoop();
}
-void DesktopRootWindowHostWin::SetVisibilityChangedAnimationsEnabled(
+void DesktopWindowTreeHostWin::SetVisibilityChangedAnimationsEnabled(
bool value) {
message_handler_->SetVisibilityChangedAnimationsEnabled(value);
content_window_->SetProperty(aura::client::kAnimationsDisabledKey, !value);
}
-bool DesktopRootWindowHostWin::ShouldUseNativeFrame() {
+bool DesktopWindowTreeHostWin::ShouldUseNativeFrame() {
return ui::win::IsAeroGlassEnabled();
}
-void DesktopRootWindowHostWin::FrameTypeChanged() {
+void DesktopWindowTreeHostWin::FrameTypeChanged() {
message_handler_->FrameTypeChanged();
SetWindowTransparency();
}
-NonClientFrameView* DesktopRootWindowHostWin::CreateNonClientFrameView() {
+NonClientFrameView* DesktopWindowTreeHostWin::CreateNonClientFrameView() {
return GetWidget()->ShouldUseNativeFrame() ?
new NativeFrameView(GetWidget()) : NULL;
}
-void DesktopRootWindowHostWin::SetFullscreen(bool fullscreen) {
+void DesktopWindowTreeHostWin::SetFullscreen(bool fullscreen) {
message_handler_->fullscreen_handler()->SetFullscreen(fullscreen);
// TODO(sky): workaround for ScopedFullscreenVisibility showing window
// directly. Instead of this should listen for visibility changes and then
@@ -388,70 +388,70 @@ void DesktopRootWindowHostWin::SetFullscreen(bool fullscreen) {
SetWindowTransparency();
}
-bool DesktopRootWindowHostWin::IsFullscreen() const {
+bool DesktopWindowTreeHostWin::IsFullscreen() const {
return message_handler_->fullscreen_handler()->fullscreen();
}
-void DesktopRootWindowHostWin::SetOpacity(unsigned char opacity) {
+void DesktopWindowTreeHostWin::SetOpacity(unsigned char opacity) {
message_handler_->SetOpacity(static_cast<BYTE>(opacity));
content_window_->layer()->SetOpacity(opacity / 255.0);
}
-void DesktopRootWindowHostWin::SetWindowIcons(
+void DesktopWindowTreeHostWin::SetWindowIcons(
const gfx::ImageSkia& window_icon, const gfx::ImageSkia& app_icon) {
message_handler_->SetWindowIcons(window_icon, app_icon);
}
-void DesktopRootWindowHostWin::InitModalType(ui::ModalType modal_type) {
+void DesktopWindowTreeHostWin::InitModalType(ui::ModalType modal_type) {
message_handler_->InitModalType(modal_type);
}
-void DesktopRootWindowHostWin::FlashFrame(bool flash_frame) {
+void DesktopWindowTreeHostWin::FlashFrame(bool flash_frame) {
message_handler_->FlashFrame(flash_frame);
}
-void DesktopRootWindowHostWin::OnRootViewLayout() const {
+void DesktopWindowTreeHostWin::OnRootViewLayout() const {
}
-void DesktopRootWindowHostWin::OnNativeWidgetFocus() {
+void DesktopWindowTreeHostWin::OnNativeWidgetFocus() {
// HWNDMessageHandler will perform the proper updating on its own.
}
-void DesktopRootWindowHostWin::OnNativeWidgetBlur() {
+void DesktopWindowTreeHostWin::OnNativeWidgetBlur() {
}
-bool DesktopRootWindowHostWin::IsAnimatingClosed() const {
+bool DesktopWindowTreeHostWin::IsAnimatingClosed() const {
return pending_close_;
}
////////////////////////////////////////////////////////////////////////////////
-// DesktopRootWindowHostWin, RootWindowHost implementation:
+// DesktopWindowTreeHostWin, WindowTreeHost implementation:
-aura::RootWindow* DesktopRootWindowHostWin::GetRootWindow() {
+aura::RootWindow* DesktopWindowTreeHostWin::GetRootWindow() {
return root_window_;
}
-gfx::AcceleratedWidget DesktopRootWindowHostWin::GetAcceleratedWidget() {
+gfx::AcceleratedWidget DesktopWindowTreeHostWin::GetAcceleratedWidget() {
return message_handler_->hwnd();
}
-void DesktopRootWindowHostWin::Show() {
+void DesktopWindowTreeHostWin::Show() {
message_handler_->Show();
}
-void DesktopRootWindowHostWin::Hide() {
+void DesktopWindowTreeHostWin::Hide() {
if (!pending_close_)
message_handler_->Hide();
}
-void DesktopRootWindowHostWin::ToggleFullScreen() {
+void DesktopWindowTreeHostWin::ToggleFullScreen() {
SetWindowTransparency();
}
// GetBounds and SetBounds work in pixel coordinates, whereas other get/set
// methods work in DIP.
-gfx::Rect DesktopRootWindowHostWin::GetBounds() const {
+gfx::Rect DesktopWindowTreeHostWin::GetBounds() const {
// Match the logic in HWNDMessageHandler::ClientAreaSizeChanged().
if (IsMinimized())
return gfx::Rect();
@@ -473,7 +473,7 @@ gfx::Rect DesktopRootWindowHostWin::GetBounds() const {
return without_expansion;
}
-void DesktopRootWindowHostWin::SetBounds(const gfx::Rect& bounds) {
+void DesktopWindowTreeHostWin::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
@@ -493,33 +493,33 @@ void DesktopRootWindowHostWin::SetBounds(const gfx::Rect& bounds) {
message_handler_->SetBounds(new_expanded);
}
-gfx::Insets DesktopRootWindowHostWin::GetInsets() const {
+gfx::Insets DesktopWindowTreeHostWin::GetInsets() const {
return gfx::Insets();
}
-void DesktopRootWindowHostWin::SetInsets(const gfx::Insets& insets) {
+void DesktopWindowTreeHostWin::SetInsets(const gfx::Insets& insets) {
}
-gfx::Point DesktopRootWindowHostWin::GetLocationOnNativeScreen() const {
+gfx::Point DesktopWindowTreeHostWin::GetLocationOnNativeScreen() const {
return GetBounds().origin();
}
-void DesktopRootWindowHostWin::SetCapture() {
+void DesktopWindowTreeHostWin::SetCapture() {
message_handler_->SetCapture();
}
-void DesktopRootWindowHostWin::ReleaseCapture() {
+void DesktopWindowTreeHostWin::ReleaseCapture() {
message_handler_->ReleaseCapture();
}
-void DesktopRootWindowHostWin::SetCursor(gfx::NativeCursor cursor) {
+void DesktopWindowTreeHostWin::SetCursor(gfx::NativeCursor cursor) {
ui::CursorLoaderWin cursor_loader;
cursor_loader.SetPlatformCursor(&cursor);
message_handler_->SetCursor(cursor.platform());
}
-bool DesktopRootWindowHostWin::QueryMouseLocation(gfx::Point* location_return) {
+bool DesktopWindowTreeHostWin::QueryMouseLocation(gfx::Point* location_return) {
aura::client::CursorClient* cursor_client =
aura::client::GetCursorClient(root_window_->window());
if (cursor_client && !cursor_client->IsMouseEventsEnabled()) {
@@ -533,44 +533,44 @@ bool DesktopRootWindowHostWin::QueryMouseLocation(gfx::Point* location_return) {
return true;
}
-bool DesktopRootWindowHostWin::ConfineCursorToRootWindow() {
+bool DesktopWindowTreeHostWin::ConfineCursorToRootWindow() {
RECT window_rect = root_window_->window()->GetBoundsInScreen().ToRECT();
::ClipCursor(&window_rect);
return true;
}
-void DesktopRootWindowHostWin::UnConfineCursor() {
+void DesktopWindowTreeHostWin::UnConfineCursor() {
::ClipCursor(NULL);
}
-void DesktopRootWindowHostWin::OnCursorVisibilityChanged(bool show) {
+void DesktopWindowTreeHostWin::OnCursorVisibilityChanged(bool show) {
if (is_cursor_visible_ == show)
return;
is_cursor_visible_ = show;
::ShowCursor(!!show);
}
-void DesktopRootWindowHostWin::MoveCursorTo(const gfx::Point& location) {
+void DesktopWindowTreeHostWin::MoveCursorTo(const gfx::Point& location) {
POINT cursor_location = location.ToPOINT();
::ClientToScreen(GetHWND(), &cursor_location);
::SetCursorPos(cursor_location.x, cursor_location.y);
}
-void DesktopRootWindowHostWin::PostNativeEvent(
+void DesktopWindowTreeHostWin::PostNativeEvent(
const base::NativeEvent& native_event) {
}
-void DesktopRootWindowHostWin::OnDeviceScaleFactorChanged(
+void DesktopWindowTreeHostWin::OnDeviceScaleFactorChanged(
float device_scale_factor) {
}
-void DesktopRootWindowHostWin::PrepareForShutdown() {
+void DesktopWindowTreeHostWin::PrepareForShutdown() {
}
////////////////////////////////////////////////////////////////////////////////
-// DesktopRootWindowHostWin, aura::AnimationHost implementation:
+// DesktopWindowTreeHostWin, aura::AnimationHost implementation:
-void DesktopRootWindowHostWin::SetHostTransitionOffsets(
+void DesktopWindowTreeHostWin::SetHostTransitionOffsets(
const gfx::Vector2d& top_left_delta,
const gfx::Vector2d& bottom_right_delta) {
gfx::Rect bounds_without_expansion = GetBounds();
@@ -579,88 +579,88 @@ void DesktopRootWindowHostWin::SetHostTransitionOffsets(
SetBounds(bounds_without_expansion);
}
-void DesktopRootWindowHostWin::OnWindowHidingAnimationCompleted() {
+void DesktopWindowTreeHostWin::OnWindowHidingAnimationCompleted() {
if (pending_close_)
message_handler_->Close();
}
////////////////////////////////////////////////////////////////////////////////
-// DesktopRootWindowHostWin, HWNDMessageHandlerDelegate implementation:
+// DesktopWindowTreeHostWin, HWNDMessageHandlerDelegate implementation:
-bool DesktopRootWindowHostWin::IsWidgetWindow() const {
+bool DesktopWindowTreeHostWin::IsWidgetWindow() const {
return has_non_client_view_;
}
-bool DesktopRootWindowHostWin::IsUsingCustomFrame() const {
+bool DesktopWindowTreeHostWin::IsUsingCustomFrame() const {
return !GetWidget()->ShouldUseNativeFrame();
}
-void DesktopRootWindowHostWin::SchedulePaint() {
+void DesktopWindowTreeHostWin::SchedulePaint() {
GetWidget()->GetRootView()->SchedulePaint();
}
-void DesktopRootWindowHostWin::EnableInactiveRendering() {
+void DesktopWindowTreeHostWin::EnableInactiveRendering() {
native_widget_delegate_->EnableInactiveRendering();
}
-bool DesktopRootWindowHostWin::IsInactiveRenderingDisabled() {
+bool DesktopWindowTreeHostWin::IsInactiveRenderingDisabled() {
return native_widget_delegate_->IsInactiveRenderingDisabled();
}
-bool DesktopRootWindowHostWin::CanResize() const {
+bool DesktopWindowTreeHostWin::CanResize() const {
return GetWidget()->widget_delegate()->CanResize();
}
-bool DesktopRootWindowHostWin::CanMaximize() const {
+bool DesktopWindowTreeHostWin::CanMaximize() const {
return GetWidget()->widget_delegate()->CanMaximize();
}
-bool DesktopRootWindowHostWin::CanActivate() const {
+bool DesktopWindowTreeHostWin::CanActivate() const {
if (IsModalWindowActive())
return true;
return native_widget_delegate_->CanActivate();
}
-bool DesktopRootWindowHostWin::WidgetSizeIsClientSize() const {
+bool DesktopWindowTreeHostWin::WidgetSizeIsClientSize() const {
const Widget* widget = GetWidget()->GetTopLevelWidget();
return IsMaximized() || (widget && widget->ShouldUseNativeFrame());
}
-bool DesktopRootWindowHostWin::CanSaveFocus() const {
+bool DesktopWindowTreeHostWin::CanSaveFocus() const {
return GetWidget()->is_top_level();
}
-void DesktopRootWindowHostWin::SaveFocusOnDeactivate() {
+void DesktopWindowTreeHostWin::SaveFocusOnDeactivate() {
GetWidget()->GetFocusManager()->StoreFocusedView(true);
}
-void DesktopRootWindowHostWin::RestoreFocusOnActivate() {
+void DesktopWindowTreeHostWin::RestoreFocusOnActivate() {
RestoreFocusOnEnable();
}
-void DesktopRootWindowHostWin::RestoreFocusOnEnable() {
+void DesktopWindowTreeHostWin::RestoreFocusOnEnable() {
GetWidget()->GetFocusManager()->RestoreFocusedView();
}
-bool DesktopRootWindowHostWin::IsModal() const {
+bool DesktopWindowTreeHostWin::IsModal() const {
return native_widget_delegate_->IsModal();
}
-int DesktopRootWindowHostWin::GetInitialShowState() const {
+int DesktopWindowTreeHostWin::GetInitialShowState() const {
return SW_SHOWNORMAL;
}
-bool DesktopRootWindowHostWin::WillProcessWorkAreaChange() const {
+bool DesktopWindowTreeHostWin::WillProcessWorkAreaChange() const {
return GetWidget()->widget_delegate()->WillProcessWorkAreaChange();
}
-int DesktopRootWindowHostWin::GetNonClientComponent(
+int DesktopWindowTreeHostWin::GetNonClientComponent(
const gfx::Point& point) const {
gfx::Point dip_position = gfx::win::ScreenToDIPPoint(point);
return native_widget_delegate_->GetNonClientComponent(dip_position);
}
-void DesktopRootWindowHostWin::GetWindowMask(const gfx::Size& size,
+void DesktopWindowTreeHostWin::GetWindowMask(const gfx::Size& size,
gfx::Path* path) {
if (GetWidget()->non_client_view()) {
GetWidget()->non_client_view()->GetWindowMask(size, path);
@@ -673,45 +673,45 @@ void DesktopRootWindowHostWin::GetWindowMask(const gfx::Size& size,
}
}
-bool DesktopRootWindowHostWin::GetClientAreaInsets(gfx::Insets* insets) const {
+bool DesktopWindowTreeHostWin::GetClientAreaInsets(gfx::Insets* insets) const {
return false;
}
-void DesktopRootWindowHostWin::GetMinMaxSize(gfx::Size* min_size,
+void DesktopWindowTreeHostWin::GetMinMaxSize(gfx::Size* min_size,
gfx::Size* max_size) const {
*min_size = native_widget_delegate_->GetMinimumSize();
*max_size = native_widget_delegate_->GetMaximumSize();
}
-gfx::Size DesktopRootWindowHostWin::GetRootViewSize() const {
+gfx::Size DesktopWindowTreeHostWin::GetRootViewSize() const {
return GetWidget()->GetRootView()->size();
}
-void DesktopRootWindowHostWin::ResetWindowControls() {
+void DesktopWindowTreeHostWin::ResetWindowControls() {
GetWidget()->non_client_view()->ResetWindowControls();
}
-void DesktopRootWindowHostWin::PaintLayeredWindow(gfx::Canvas* canvas) {
+void DesktopWindowTreeHostWin::PaintLayeredWindow(gfx::Canvas* canvas) {
GetWidget()->GetRootView()->Paint(canvas);
}
-gfx::NativeViewAccessible DesktopRootWindowHostWin::GetNativeViewAccessible() {
+gfx::NativeViewAccessible DesktopWindowTreeHostWin::GetNativeViewAccessible() {
return GetWidget()->GetRootView()->GetNativeViewAccessible();
}
-InputMethod* DesktopRootWindowHostWin::GetInputMethod() {
+InputMethod* DesktopWindowTreeHostWin::GetInputMethod() {
return GetWidget()->GetInputMethodDirect();
}
-bool DesktopRootWindowHostWin::ShouldHandleSystemCommands() const {
+bool DesktopWindowTreeHostWin::ShouldHandleSystemCommands() const {
return GetWidget()->widget_delegate()->ShouldHandleSystemCommands();
}
-void DesktopRootWindowHostWin::HandleAppDeactivated() {
+void DesktopWindowTreeHostWin::HandleAppDeactivated() {
native_widget_delegate_->EnableInactiveRendering();
}
-void DesktopRootWindowHostWin::HandleActivationChanged(bool active) {
+void DesktopWindowTreeHostWin::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_)
@@ -722,36 +722,36 @@ void DesktopRootWindowHostWin::HandleActivationChanged(bool active) {
desktop_native_widget_aura_->HandleActivationChanged(active);
}
-bool DesktopRootWindowHostWin::HandleAppCommand(short command) {
+bool DesktopWindowTreeHostWin::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 DesktopRootWindowHostWin::HandleCancelMode() {
+void DesktopWindowTreeHostWin::HandleCancelMode() {
delegate_->OnHostCancelMode();
}
-void DesktopRootWindowHostWin::HandleCaptureLost() {
+void DesktopWindowTreeHostWin::HandleCaptureLost() {
delegate_->OnHostLostWindowCapture();
native_widget_delegate_->OnMouseCaptureLost();
}
-void DesktopRootWindowHostWin::HandleClose() {
+void DesktopWindowTreeHostWin::HandleClose() {
GetWidget()->Close();
}
-bool DesktopRootWindowHostWin::HandleCommand(int command) {
+bool DesktopWindowTreeHostWin::HandleCommand(int command) {
return GetWidget()->widget_delegate()->ExecuteWindowsCommand(command);
}
-void DesktopRootWindowHostWin::HandleAccelerator(
+void DesktopWindowTreeHostWin::HandleAccelerator(
const ui::Accelerator& accelerator) {
GetWidget()->GetFocusManager()->ProcessAccelerator(accelerator);
}
-void DesktopRootWindowHostWin::HandleCreate() {
+void DesktopWindowTreeHostWin::HandleCreate() {
// TODO(beng): moar
NOTIMPLEMENTED();
@@ -761,92 +761,92 @@ void DesktopRootWindowHostWin::HandleCreate() {
// 2. MouseWheel.
}
-void DesktopRootWindowHostWin::HandleDestroying() {
+void DesktopWindowTreeHostWin::HandleDestroying() {
drag_drop_client_->OnNativeWidgetDestroying(GetHWND());
native_widget_delegate_->OnNativeWidgetDestroying();
}
-void DesktopRootWindowHostWin::HandleDestroyed() {
+void DesktopWindowTreeHostWin::HandleDestroyed() {
desktop_native_widget_aura_->OnHostClosed();
}
-bool DesktopRootWindowHostWin::HandleInitialFocus() {
+bool DesktopWindowTreeHostWin::HandleInitialFocus() {
return GetWidget()->SetInitialFocus();
}
-void DesktopRootWindowHostWin::HandleDisplayChange() {
+void DesktopWindowTreeHostWin::HandleDisplayChange() {
GetWidget()->widget_delegate()->OnDisplayChanged();
}
-void DesktopRootWindowHostWin::HandleBeginWMSizeMove() {
+void DesktopWindowTreeHostWin::HandleBeginWMSizeMove() {
native_widget_delegate_->OnNativeWidgetBeginUserBoundsChange();
}
-void DesktopRootWindowHostWin::HandleEndWMSizeMove() {
+void DesktopWindowTreeHostWin::HandleEndWMSizeMove() {
native_widget_delegate_->OnNativeWidgetEndUserBoundsChange();
}
-void DesktopRootWindowHostWin::HandleMove() {
+void DesktopWindowTreeHostWin::HandleMove() {
native_widget_delegate_->OnNativeWidgetMove();
if (delegate_)
delegate_->OnHostMoved(GetBounds().origin());
}
-void DesktopRootWindowHostWin::HandleWorkAreaChanged() {
+void DesktopWindowTreeHostWin::HandleWorkAreaChanged() {
GetWidget()->widget_delegate()->OnWorkAreaChanged();
}
-void DesktopRootWindowHostWin::HandleVisibilityChanging(bool visible) {
+void DesktopWindowTreeHostWin::HandleVisibilityChanging(bool visible) {
native_widget_delegate_->OnNativeWidgetVisibilityChanging(visible);
}
-void DesktopRootWindowHostWin::HandleVisibilityChanged(bool visible) {
+void DesktopWindowTreeHostWin::HandleVisibilityChanged(bool visible) {
native_widget_delegate_->OnNativeWidgetVisibilityChanged(visible);
}
-void DesktopRootWindowHostWin::HandleClientSizeChanged(
+void DesktopWindowTreeHostWin::HandleClientSizeChanged(
const gfx::Size& new_size) {
if (delegate_)
NotifyHostResized(new_size);
}
-void DesktopRootWindowHostWin::HandleFrameChanged() {
+void DesktopWindowTreeHostWin::HandleFrameChanged() {
SetWindowTransparency();
// Replace the frame and layout the contents.
GetWidget()->non_client_view()->UpdateFrame();
}
-void DesktopRootWindowHostWin::HandleNativeFocus(HWND last_focused_window) {
+void DesktopWindowTreeHostWin::HandleNativeFocus(HWND last_focused_window) {
// TODO(beng): inform the native_widget_delegate_.
InputMethod* input_method = GetInputMethod();
if (input_method)
input_method->OnFocus();
}
-void DesktopRootWindowHostWin::HandleNativeBlur(HWND focused_window) {
+void DesktopWindowTreeHostWin::HandleNativeBlur(HWND focused_window) {
// TODO(beng): inform the native_widget_delegate_.
InputMethod* input_method = GetInputMethod();
if (input_method)
input_method->OnBlur();
}
-bool DesktopRootWindowHostWin::HandleMouseEvent(const ui::MouseEvent& event) {
+bool DesktopWindowTreeHostWin::HandleMouseEvent(const ui::MouseEvent& event) {
if (base::win::IsTSFAwareRequired() && event.IsAnyButton())
ui::TSFBridge::GetInstance()->CancelComposition();
return delegate_->OnHostMouseEvent(const_cast<ui::MouseEvent*>(&event));
}
-bool DesktopRootWindowHostWin::HandleKeyEvent(const ui::KeyEvent& event) {
+bool DesktopWindowTreeHostWin::HandleKeyEvent(const ui::KeyEvent& event) {
return false;
}
-bool DesktopRootWindowHostWin::HandleUntranslatedKeyEvent(
+bool DesktopWindowTreeHostWin::HandleUntranslatedKeyEvent(
const ui::KeyEvent& event) {
ui::KeyEvent duplicate_event(event);
return delegate_->OnHostKeyEvent(&duplicate_event);
}
-void DesktopRootWindowHostWin::HandleTouchEvent(
+void DesktopWindowTreeHostWin::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
@@ -858,8 +858,8 @@ void DesktopRootWindowHostWin::HandleTouchEvent(
aura::RootWindow* root =
aura::RootWindow::GetForAcceleratedWidget(GetCapture());
if (root) {
- DesktopRootWindowHostWin* target =
- root->window()->GetProperty(kDesktopRootWindowHostKey);
+ DesktopWindowTreeHostWin* target =
+ root->window()->GetProperty(kDesktopWindowTreeHostKey);
if (target && target->HasCapture() && target != this) {
POINT target_location(event.location().ToPOINT());
ClientToScreen(GetHWND(), &target_location);
@@ -876,7 +876,7 @@ void DesktopRootWindowHostWin::HandleTouchEvent(
const_cast<ui::TouchEvent*>(&event));
}
-bool DesktopRootWindowHostWin::HandleIMEMessage(UINT message,
+bool DesktopWindowTreeHostWin::HandleIMEMessage(UINT message,
WPARAM w_param,
LPARAM l_param,
LRESULT* result) {
@@ -889,36 +889,36 @@ bool DesktopRootWindowHostWin::HandleIMEMessage(UINT message,
input_method()->OnUntranslatedIMEMessage(msg, result);
}
-void DesktopRootWindowHostWin::HandleInputLanguageChange(
+void DesktopWindowTreeHostWin::HandleInputLanguageChange(
DWORD character_set,
HKL input_language_id) {
desktop_native_widget_aura_->input_method_event_filter()->
input_method()->OnInputLocaleChanged();
}
-bool DesktopRootWindowHostWin::HandlePaintAccelerated(
+bool DesktopWindowTreeHostWin::HandlePaintAccelerated(
const gfx::Rect& invalid_rect) {
return native_widget_delegate_->OnNativeWidgetPaintAccelerated(invalid_rect);
}
-void DesktopRootWindowHostWin::HandlePaint(gfx::Canvas* canvas) {
+void DesktopWindowTreeHostWin::HandlePaint(gfx::Canvas* canvas) {
compositor()->ScheduleRedrawRect(gfx::Rect());
}
-bool DesktopRootWindowHostWin::HandleTooltipNotify(int w_param,
+bool DesktopWindowTreeHostWin::HandleTooltipNotify(int w_param,
NMHDR* l_param,
LRESULT* l_result) {
return tooltip_ && tooltip_->HandleNotify(w_param, l_param, l_result);
}
-void DesktopRootWindowHostWin::HandleTooltipMouseMove(UINT message,
+void DesktopWindowTreeHostWin::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.
}
-void DesktopRootWindowHostWin::HandleMenuLoop(bool in_menu_loop) {
+void DesktopWindowTreeHostWin::HandleMenuLoop(bool in_menu_loop) {
if (in_menu_loop) {
tooltip_disabler_.reset(
new aura::client::ScopedTooltipDisabler(root_window_->window()));
@@ -927,34 +927,34 @@ void DesktopRootWindowHostWin::HandleMenuLoop(bool in_menu_loop) {
}
}
-bool DesktopRootWindowHostWin::PreHandleMSG(UINT message,
+bool DesktopWindowTreeHostWin::PreHandleMSG(UINT message,
WPARAM w_param,
LPARAM l_param,
LRESULT* result) {
return false;
}
-void DesktopRootWindowHostWin::PostHandleMSG(UINT message,
+void DesktopWindowTreeHostWin::PostHandleMSG(UINT message,
WPARAM w_param,
LPARAM l_param) {
}
////////////////////////////////////////////////////////////////////////////////
-// DesktopRootWindowHostWin, private:
+// DesktopWindowTreeHostWin, private:
-Widget* DesktopRootWindowHostWin::GetWidget() {
+Widget* DesktopWindowTreeHostWin::GetWidget() {
return native_widget_delegate_->AsWidget();
}
-const Widget* DesktopRootWindowHostWin::GetWidget() const {
+const Widget* DesktopWindowTreeHostWin::GetWidget() const {
return native_widget_delegate_->AsWidget();
}
-HWND DesktopRootWindowHostWin::GetHWND() const {
+HWND DesktopWindowTreeHostWin::GetHWND() const {
return message_handler_->hwnd();
}
-void DesktopRootWindowHostWin::SetWindowTransparency() {
+void DesktopWindowTreeHostWin::SetWindowTransparency() {
bool transparent = ShouldUseNativeFrame() && !IsFullscreen();
root_window_->host()->compositor()->SetHostHasTransparentBackground(
transparent);
@@ -962,7 +962,7 @@ void DesktopRootWindowHostWin::SetWindowTransparency() {
content_window_->SetTransparent(transparent);
}
-bool DesktopRootWindowHostWin::IsModalWindowActive() const {
+bool DesktopWindowTreeHostWin::IsModalWindowActive() const {
// This function can get called during window creation which occurs before
// root_window_ has been created.
if (!root_window_)
@@ -980,13 +980,13 @@ bool DesktopRootWindowHostWin::IsModalWindowActive() const {
}
////////////////////////////////////////////////////////////////////////////////
-// DesktopRootWindowHost, public:
+// DesktopWindowTreeHost, public:
// static
-DesktopRootWindowHost* DesktopRootWindowHost::Create(
+DesktopWindowTreeHost* DesktopWindowTreeHost::Create(
internal::NativeWidgetDelegate* native_widget_delegate,
DesktopNativeWidgetAura* desktop_native_widget_aura) {
- return new DesktopRootWindowHostWin(native_widget_delegate,
+ return new DesktopWindowTreeHostWin(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 7352eb8..e8cbf3f 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
@@ -28,22 +28,22 @@ namespace corewm {
class TooltipWin;
}
-class VIEWS_EXPORT DesktopRootWindowHostWin
- : public DesktopRootWindowHost,
+class VIEWS_EXPORT DesktopWindowTreeHostWin
+ : public DesktopWindowTreeHost,
public aura::client::AnimationHost,
- public aura::RootWindowHost,
+ public aura::WindowTreeHost,
public HWNDMessageHandlerDelegate {
public:
- DesktopRootWindowHostWin(
+ DesktopWindowTreeHostWin(
internal::NativeWidgetDelegate* native_widget_delegate,
DesktopNativeWidgetAura* desktop_native_widget_aura);
- virtual ~DesktopRootWindowHostWin();
+ virtual ~DesktopWindowTreeHostWin();
// A way of converting an HWND into a content window.
static aura::Window* GetContentWindowForHWND(HWND hwnd);
protected:
- // Overridden from DesktopRootWindowHost:
+ // Overridden from DesktopWindowTreeHost:
virtual void Init(aura::Window* content_window,
const Widget::InitParams& params,
aura::RootWindow::CreateParams* rw_create_params) OVERRIDE;
@@ -54,7 +54,7 @@ class VIEWS_EXPORT DesktopRootWindowHostWin
CreateDragDropClient(DesktopNativeCursorManager* cursor_manager) OVERRIDE;
virtual void Close() OVERRIDE;
virtual void CloseNow() OVERRIDE;
- virtual aura::RootWindowHost* AsRootWindowHost() OVERRIDE;
+ virtual aura::WindowTreeHost* AsWindowTreeHost() OVERRIDE;
virtual void ShowWindowWithState(ui::WindowShowState show_state) OVERRIDE;
virtual void ShowMaximizedWithBounds(
const gfx::Rect& restored_bounds) OVERRIDE;
@@ -104,7 +104,7 @@ class VIEWS_EXPORT DesktopRootWindowHostWin
virtual void OnNativeWidgetBlur() OVERRIDE;
virtual bool IsAnimatingClosed() const OVERRIDE;
- // Overridden from aura::RootWindowHost:
+ // Overridden from aura::WindowTreeHost:
virtual aura::RootWindow* GetRootWindow() OVERRIDE;
virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE;
virtual void Show() OVERRIDE;
@@ -273,7 +273,7 @@ class VIEWS_EXPORT DesktopRootWindowHostWin
scoped_ptr<aura::client::ScopedTooltipDisabler> tooltip_disabler_;
- DISALLOW_COPY_AND_ASSIGN(DesktopRootWindowHostWin);
+ DISALLOW_COPY_AND_ASSIGN(DesktopWindowTreeHostWin);
};
} // 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 a002f10..838d403 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 DesktopRootWindowHostWinTest;
+typedef ViewsTestBase DesktopWindowTreeHostWinTest;
namespace {
// See description above SaveFocusOnDeactivateFromHandleCreate.
-class TestDesktopRootWindowHostWin : public DesktopRootWindowHostWin {
+class TestDesktopWindowTreeHostWin : public DesktopWindowTreeHostWin {
public:
- TestDesktopRootWindowHostWin(
+ TestDesktopWindowTreeHostWin(
internal::NativeWidgetDelegate* native_widget_delegate,
DesktopNativeWidgetAura* desktop_native_widget_aura)
- : DesktopRootWindowHostWin(native_widget_delegate,
+ : DesktopWindowTreeHostWin(native_widget_delegate,
desktop_native_widget_aura) {}
- virtual ~TestDesktopRootWindowHostWin() {}
+ virtual ~TestDesktopWindowTreeHostWin() {}
- // DesktopRootWindowHostWin overrides:
+ // DesktopWindowTreeHostWin overrides:
virtual void HandleCreate() OVERRIDE {
- DesktopRootWindowHostWin::HandleCreate();
+ DesktopWindowTreeHostWin::HandleCreate();
SaveFocusOnDeactivate();
}
private:
- DISALLOW_COPY_AND_ASSIGN(TestDesktopRootWindowHostWin);
+ DISALLOW_COPY_AND_ASSIGN(TestDesktopWindowTreeHostWin);
};
} // namespace
// Verifies if SaveFocusOnDeactivate() is invoked from
-// DesktopRootWindowHostWin::HandleCreate we don't crash.
-TEST_F(DesktopRootWindowHostWinTest, SaveFocusOnDeactivateFromHandleCreate) {
+// DesktopWindowTreeHostWin::HandleCreate we don't crash.
+TEST_F(DesktopWindowTreeHostWinTest, 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(DesktopRootWindowHostWinTest, SaveFocusOnDeactivateFromHandleCreate) {
DesktopNativeWidgetAura* desktop_native_widget_aura =
new DesktopNativeWidgetAura(&widget);
params.native_widget = desktop_native_widget_aura;
- params.desktop_root_window_host = new TestDesktopRootWindowHostWin(
+ params.desktop_root_window_host = new TestDesktopWindowTreeHostWin(
&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 00e3f6d..52203d1 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
@@ -53,15 +53,15 @@
namespace views {
-DesktopRootWindowHostX11* DesktopRootWindowHostX11::g_current_capture =
+DesktopWindowTreeHostX11* DesktopWindowTreeHostX11::g_current_capture =
NULL;
-std::list<XID>* DesktopRootWindowHostX11::open_windows_ = NULL;
+std::list<XID>* DesktopWindowTreeHostX11::open_windows_ = NULL;
DEFINE_WINDOW_PROPERTY_KEY(
aura::Window*, kViewsWindowForRootWindow, NULL);
DEFINE_WINDOW_PROPERTY_KEY(
- DesktopRootWindowHostX11*, kHostForRootWindow, NULL);
+ DesktopWindowTreeHostX11*, kHostForRootWindow, NULL);
namespace {
@@ -118,9 +118,9 @@ const char* kAtomsToCache[] = {
} // namespace
////////////////////////////////////////////////////////////////////////////////
-// DesktopRootWindowHostX11, public:
+// DesktopWindowTreeHostX11, public:
-DesktopRootWindowHostX11::DesktopRootWindowHostX11(
+DesktopWindowTreeHostX11::DesktopWindowTreeHostX11(
internal::NativeWidgetDelegate* native_widget_delegate,
DesktopNativeWidgetAura* desktop_native_widget_aura)
: close_widget_factory_(this),
@@ -141,28 +141,28 @@ DesktopRootWindowHostX11::DesktopRootWindowHostX11(
custom_window_shape_(NULL) {
}
-DesktopRootWindowHostX11::~DesktopRootWindowHostX11() {
+DesktopWindowTreeHostX11::~DesktopWindowTreeHostX11() {
root_window_->window()->ClearProperty(kHostForRootWindow);
aura::client::SetWindowMoveClient(root_window_->window(), NULL);
- desktop_native_widget_aura_->OnDesktopRootWindowHostDestroyed(root_window_);
+ desktop_native_widget_aura_->OnDesktopWindowTreeHostDestroyed(root_window_);
if (custom_window_shape_)
XDestroyRegion(custom_window_shape_);
}
// static
-aura::Window* DesktopRootWindowHostX11::GetContentWindowForXID(XID xid) {
+aura::Window* DesktopWindowTreeHostX11::GetContentWindowForXID(XID xid) {
aura::RootWindow* root = aura::RootWindow::GetForAcceleratedWidget(xid);
return root ? root->window()->GetProperty(kViewsWindowForRootWindow) : NULL;
}
// static
-DesktopRootWindowHostX11* DesktopRootWindowHostX11::GetHostForXID(XID xid) {
+DesktopWindowTreeHostX11* DesktopWindowTreeHostX11::GetHostForXID(XID xid) {
aura::RootWindow* root = aura::RootWindow::GetForAcceleratedWidget(xid);
return root ? root->window()->GetProperty(kHostForRootWindow) : NULL;
}
// static
-std::vector<aura::Window*> DesktopRootWindowHostX11::GetAllOpenWindows() {
+std::vector<aura::Window*> DesktopWindowTreeHostX11::GetAllOpenWindows() {
std::vector<aura::Window*> windows(open_windows().size());
std::transform(open_windows().begin(),
open_windows().end(),
@@ -171,11 +171,11 @@ std::vector<aura::Window*> DesktopRootWindowHostX11::GetAllOpenWindows() {
return windows;
}
-gfx::Rect DesktopRootWindowHostX11::GetX11RootWindowBounds() const {
+gfx::Rect DesktopWindowTreeHostX11::GetX11RootWindowBounds() const {
return bounds_;
}
-void DesktopRootWindowHostX11::HandleNativeWidgetActivationChanged(
+void DesktopWindowTreeHostX11::HandleNativeWidgetActivationChanged(
bool active) {
if (active) {
delegate_->OnHostActivated();
@@ -188,31 +188,31 @@ void DesktopRootWindowHostX11::HandleNativeWidgetActivationChanged(
native_widget_delegate_->AsWidget()->GetRootView()->SchedulePaint();
}
-void DesktopRootWindowHostX11::AddObserver(
- views::DesktopRootWindowHostObserverX11* observer) {
+void DesktopWindowTreeHostX11::AddObserver(
+ views::DesktopWindowTreeHostObserverX11* observer) {
observer_list_.AddObserver(observer);
}
-void DesktopRootWindowHostX11::RemoveObserver(
- views::DesktopRootWindowHostObserverX11* observer) {
+void DesktopWindowTreeHostX11::RemoveObserver(
+ views::DesktopWindowTreeHostObserverX11* observer) {
observer_list_.RemoveObserver(observer);
}
-void DesktopRootWindowHostX11::CleanUpWindowList() {
+void DesktopWindowTreeHostX11::CleanUpWindowList() {
delete open_windows_;
open_windows_ = NULL;
}
////////////////////////////////////////////////////////////////////////////////
-// DesktopRootWindowHostX11, DesktopRootWindowHost implementation:
+// DesktopWindowTreeHostX11, DesktopWindowTreeHost implementation:
-void DesktopRootWindowHostX11::Init(
+void DesktopWindowTreeHostX11::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 RootWindowHost here, or
+ // TODO(erg): Check whether we *should* be building a WindowTreeHost here, or
// whether we should be proxying requests to another DRWHL.
// In some situations, views tries to make a zero sized window, and that
@@ -229,7 +229,7 @@ void DesktopRootWindowHostX11::Init(
rw_create_params->host = this;
}
-void DesktopRootWindowHostX11::OnRootWindowCreated(
+void DesktopWindowTreeHostX11::OnRootWindowCreated(
aura::RootWindow* root,
const Widget::InitParams& params) {
root_window_ = root;
@@ -263,20 +263,20 @@ void DesktopRootWindowHostX11::OnRootWindowCreated(
native_widget_delegate_->OnNativeWidgetCreated(true);
}
-scoped_ptr<corewm::Tooltip> DesktopRootWindowHostX11::CreateTooltip() {
+scoped_ptr<corewm::Tooltip> DesktopWindowTreeHostX11::CreateTooltip() {
return scoped_ptr<corewm::Tooltip>(
new corewm::TooltipAura(gfx::SCREEN_TYPE_NATIVE));
}
scoped_ptr<aura::client::DragDropClient>
-DesktopRootWindowHostX11::CreateDragDropClient(
+DesktopWindowTreeHostX11::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 DesktopRootWindowHostX11::Close() {
+void DesktopWindowTreeHostX11::Close() {
// TODO(erg): Might need to do additional hiding tasks here.
if (!close_widget_factory_.HasWeakPtrs()) {
@@ -286,12 +286,12 @@ void DesktopRootWindowHostX11::Close() {
// dereference us when the callback returns).
base::MessageLoop::current()->PostTask(
FROM_HERE,
- base::Bind(&DesktopRootWindowHostX11::CloseNow,
+ base::Bind(&DesktopWindowTreeHostX11::CloseNow,
close_widget_factory_.GetWeakPtr()));
}
}
-void DesktopRootWindowHostX11::CloseNow() {
+void DesktopWindowTreeHostX11::CloseNow() {
if (xwindow_ == None)
return;
@@ -300,8 +300,8 @@ void DesktopRootWindowHostX11::CloseNow() {
// If we have children, close them. Use a copy for iteration because they'll
// remove themselves.
- std::set<DesktopRootWindowHostX11*> window_children_copy = window_children_;
- for (std::set<DesktopRootWindowHostX11*>::iterator it =
+ std::set<DesktopWindowTreeHostX11*> window_children_copy = window_children_;
+ for (std::set<DesktopWindowTreeHostX11*>::iterator it =
window_children_copy.begin(); it != window_children_copy.end();
++it) {
(*it)->CloseNow();
@@ -328,11 +328,11 @@ void DesktopRootWindowHostX11::CloseNow() {
desktop_native_widget_aura_->OnHostClosed();
}
-aura::RootWindowHost* DesktopRootWindowHostX11::AsRootWindowHost() {
+aura::WindowTreeHost* DesktopWindowTreeHostX11::AsWindowTreeHost() {
return this;
}
-void DesktopRootWindowHostX11::ShowWindowWithState(
+void DesktopWindowTreeHostX11::ShowWindowWithState(
ui::WindowShowState show_state) {
if (show_state != ui::SHOW_STATE_DEFAULT &&
show_state != ui::SHOW_STATE_NORMAL) {
@@ -343,27 +343,27 @@ void DesktopRootWindowHostX11::ShowWindowWithState(
Show();
}
-void DesktopRootWindowHostX11::ShowMaximizedWithBounds(
+void DesktopWindowTreeHostX11::ShowMaximizedWithBounds(
const gfx::Rect& restored_bounds) {
restored_bounds_ = restored_bounds;
Maximize();
Show();
}
-bool DesktopRootWindowHostX11::IsVisible() const {
+bool DesktopWindowTreeHostX11::IsVisible() const {
return window_mapped_;
}
-void DesktopRootWindowHostX11::SetSize(const gfx::Size& size) {
+void DesktopWindowTreeHostX11::SetSize(const gfx::Size& size) {
// TODO(erg):
NOTIMPLEMENTED();
}
-void DesktopRootWindowHostX11::StackAtTop() {
+void DesktopWindowTreeHostX11::StackAtTop() {
XRaiseWindow(xdisplay_, xwindow_);
}
-void DesktopRootWindowHostX11::CenterWindow(const gfx::Size& size) {
+void DesktopWindowTreeHostX11::CenterWindow(const gfx::Size& size) {
gfx::Rect parent_bounds = GetWorkAreaBoundsInScreen();
// If |window_|'s transient parent bounds are big enough to contain |size|,
@@ -389,7 +389,7 @@ void DesktopRootWindowHostX11::CenterWindow(const gfx::Size& size) {
SetBounds(window_bounds);
}
-void DesktopRootWindowHostX11::GetWindowPlacement(
+void DesktopWindowTreeHostX11::GetWindowPlacement(
gfx::Rect* bounds,
ui::WindowShowState* show_state) const {
*bounds = bounds_;
@@ -407,14 +407,14 @@ void DesktopRootWindowHostX11::GetWindowPlacement(
}
}
-gfx::Rect DesktopRootWindowHostX11::GetWindowBoundsInScreen() const {
+gfx::Rect DesktopWindowTreeHostX11::GetWindowBoundsInScreen() const {
return bounds_;
}
-gfx::Rect DesktopRootWindowHostX11::GetClientAreaBoundsInScreen() const {
+gfx::Rect DesktopWindowTreeHostX11::GetClientAreaBoundsInScreen() const {
// TODO(erg): The NativeWidgetAura version returns |bounds_|, claiming its
// needed for View::ConvertPointToScreen() to work
- // correctly. DesktopRootWindowHostWin::GetClientAreaBoundsInScreen() just
+ // correctly. DesktopWindowTreeHostWin::GetClientAreaBoundsInScreen() just
// asks windows what it thinks the client rect is.
//
// Attempts to calculate the rect by asking the NonClientFrameView what it
@@ -423,7 +423,7 @@ gfx::Rect DesktopRootWindowHostX11::GetClientAreaBoundsInScreen() const {
return bounds_;
}
-gfx::Rect DesktopRootWindowHostX11::GetRestoredBounds() const {
+gfx::Rect DesktopWindowTreeHostX11::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
@@ -434,7 +434,7 @@ gfx::Rect DesktopRootWindowHostX11::GetRestoredBounds() const {
return GetWindowBoundsInScreen();
}
-gfx::Rect DesktopRootWindowHostX11::GetWorkAreaBoundsInScreen() const {
+gfx::Rect DesktopWindowTreeHostX11::GetWorkAreaBoundsInScreen() const {
std::vector<int> value;
if (ui::GetIntArrayProperty(x_root_window_, "_NET_WORKAREA", &value) &&
value.size() >= 4) {
@@ -455,7 +455,7 @@ gfx::Rect DesktopRootWindowHostX11::GetWorkAreaBoundsInScreen() const {
return gfx::Rect(x, y, width, height);
}
-void DesktopRootWindowHostX11::SetShape(gfx::NativeRegion native_region) {
+void DesktopWindowTreeHostX11::SetShape(gfx::NativeRegion native_region) {
if (custom_window_shape_)
XDestroyRegion(custom_window_shape_);
custom_window_shape_ = gfx::CreateRegionFromSkRegion(*native_region);
@@ -463,22 +463,22 @@ void DesktopRootWindowHostX11::SetShape(gfx::NativeRegion native_region) {
delete native_region;
}
-void DesktopRootWindowHostX11::Activate() {
+void DesktopWindowTreeHostX11::Activate() {
X11DesktopHandler::get()->ActivateWindow(xwindow_);
native_widget_delegate_->AsWidget()->SetInitialFocus();
}
-void DesktopRootWindowHostX11::Deactivate() {
+void DesktopWindowTreeHostX11::Deactivate() {
// Deactivating a window means activating nothing.
x11_capture_.reset();
X11DesktopHandler::get()->ActivateWindow(None);
}
-bool DesktopRootWindowHostX11::IsActive() const {
+bool DesktopWindowTreeHostX11::IsActive() const {
return X11DesktopHandler::get()->IsActiveWindow(xwindow_);
}
-void DesktopRootWindowHostX11::Maximize() {
+void DesktopWindowTreeHostX11::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.
@@ -489,43 +489,43 @@ void DesktopRootWindowHostX11::Maximize() {
atom_cache_.GetAtom("_NET_WM_STATE_MAXIMIZED_HORZ"));
}
-void DesktopRootWindowHostX11::Minimize() {
+void DesktopWindowTreeHostX11::Minimize() {
x11_capture_.reset();
XIconifyWindow(xdisplay_, xwindow_, 0);
}
-void DesktopRootWindowHostX11::Restore() {
+void DesktopWindowTreeHostX11::Restore() {
SetWMSpecState(false,
atom_cache_.GetAtom("_NET_WM_STATE_MAXIMIZED_VERT"),
atom_cache_.GetAtom("_NET_WM_STATE_MAXIMIZED_HORZ"));
}
-bool DesktopRootWindowHostX11::IsMaximized() const {
+bool DesktopWindowTreeHostX11::IsMaximized() const {
return (HasWMSpecProperty("_NET_WM_STATE_MAXIMIZED_VERT") &&
HasWMSpecProperty("_NET_WM_STATE_MAXIMIZED_HORZ"));
}
-bool DesktopRootWindowHostX11::IsMinimized() const {
+bool DesktopWindowTreeHostX11::IsMinimized() const {
return HasWMSpecProperty("_NET_WM_STATE_HIDDEN");
}
-bool DesktopRootWindowHostX11::HasCapture() const {
+bool DesktopWindowTreeHostX11::HasCapture() const {
return g_current_capture == this;
}
-void DesktopRootWindowHostX11::SetAlwaysOnTop(bool always_on_top) {
+void DesktopWindowTreeHostX11::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 DesktopRootWindowHostX11::IsAlwaysOnTop() const {
+bool DesktopWindowTreeHostX11::IsAlwaysOnTop() const {
return is_always_on_top_;
}
-bool DesktopRootWindowHostX11::SetWindowTitle(const base::string16& title) {
+bool DesktopWindowTreeHostX11::SetWindowTitle(const base::string16& title) {
if (window_title_ == title)
return false;
window_title_ = title;
@@ -546,7 +546,7 @@ bool DesktopRootWindowHostX11::SetWindowTitle(const base::string16& title) {
return true;
}
-void DesktopRootWindowHostX11::ClearNativeFocus() {
+void DesktopWindowTreeHostX11::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.
@@ -557,7 +557,7 @@ void DesktopRootWindowHostX11::ClearNativeFocus() {
}
}
-Widget::MoveLoopResult DesktopRootWindowHostX11::RunMoveLoop(
+Widget::MoveLoopResult DesktopWindowTreeHostX11::RunMoveLoop(
const gfx::Vector2d& drag_offset,
Widget::MoveLoopSource source,
Widget::MoveLoopEscapeBehavior escape_behavior) {
@@ -572,42 +572,42 @@ Widget::MoveLoopResult DesktopRootWindowHostX11::RunMoveLoop(
return Widget::MOVE_LOOP_CANCELED;
}
-void DesktopRootWindowHostX11::EndMoveLoop() {
+void DesktopWindowTreeHostX11::EndMoveLoop() {
x11_window_move_client_->EndMoveLoop();
}
-void DesktopRootWindowHostX11::SetVisibilityChangedAnimationsEnabled(
+void DesktopWindowTreeHostX11::SetVisibilityChangedAnimationsEnabled(
bool value) {
// Much like the previous NativeWidgetGtk, we don't have anything to do here.
}
-bool DesktopRootWindowHostX11::ShouldUseNativeFrame() {
+bool DesktopWindowTreeHostX11::ShouldUseNativeFrame() {
return false;
}
-void DesktopRootWindowHostX11::FrameTypeChanged() {
+void DesktopWindowTreeHostX11::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();
}
-NonClientFrameView* DesktopRootWindowHostX11::CreateNonClientFrameView() {
+NonClientFrameView* DesktopWindowTreeHostX11::CreateNonClientFrameView() {
return NULL;
}
-void DesktopRootWindowHostX11::SetFullscreen(bool fullscreen) {
+void DesktopWindowTreeHostX11::SetFullscreen(bool fullscreen) {
is_fullscreen_ = fullscreen;
SetWMSpecState(fullscreen,
atom_cache_.GetAtom("_NET_WM_STATE_FULLSCREEN"),
None);
}
-bool DesktopRootWindowHostX11::IsFullscreen() const {
+bool DesktopWindowTreeHostX11::IsFullscreen() const {
return is_fullscreen_;
}
-void DesktopRootWindowHostX11::SetOpacity(unsigned char opacity) {
+void DesktopWindowTreeHostX11::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.
@@ -625,7 +625,7 @@ void DesktopRootWindowHostX11::SetOpacity(unsigned char opacity) {
}
}
-void DesktopRootWindowHostX11::SetWindowIcons(
+void DesktopWindowTreeHostX11::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
@@ -649,7 +649,7 @@ void DesktopRootWindowHostX11::SetWindowIcons(
ui::SetAtomArrayProperty(xwindow_, "_NET_WM_ICON", "CARDINAL", data);
}
-void DesktopRootWindowHostX11::InitModalType(ui::ModalType modal_type) {
+void DesktopWindowTreeHostX11::InitModalType(ui::ModalType modal_type) {
switch (modal_type) {
case ui::MODAL_TYPE_NONE:
break;
@@ -661,12 +661,12 @@ void DesktopRootWindowHostX11::InitModalType(ui::ModalType modal_type) {
}
}
-void DesktopRootWindowHostX11::FlashFrame(bool flash_frame) {
+void DesktopWindowTreeHostX11::FlashFrame(bool flash_frame) {
// TODO(erg):
NOTIMPLEMENTED();
}
-void DesktopRootWindowHostX11::OnRootViewLayout() const {
+void DesktopWindowTreeHostX11::OnRootViewLayout() const {
if (!window_mapped_)
return;
@@ -695,33 +695,33 @@ void DesktopRootWindowHostX11::OnRootViewLayout() const {
XSetWMNormalHints(xdisplay_, xwindow_, &hints);
}
-void DesktopRootWindowHostX11::OnNativeWidgetFocus() {
+void DesktopWindowTreeHostX11::OnNativeWidgetFocus() {
native_widget_delegate_->AsWidget()->GetInputMethod()->OnFocus();
}
-void DesktopRootWindowHostX11::OnNativeWidgetBlur() {
+void DesktopWindowTreeHostX11::OnNativeWidgetBlur() {
if (xwindow_) {
x11_capture_.reset();
native_widget_delegate_->AsWidget()->GetInputMethod()->OnBlur();
}
}
-bool DesktopRootWindowHostX11::IsAnimatingClosed() const {
+bool DesktopWindowTreeHostX11::IsAnimatingClosed() const {
return false;
}
////////////////////////////////////////////////////////////////////////////////
-// DesktopRootWindowHostX11, aura::RootWindowHost implementation:
+// DesktopWindowTreeHostX11, aura::WindowTreeHost implementation:
-aura::RootWindow* DesktopRootWindowHostX11::GetRootWindow() {
+aura::RootWindow* DesktopWindowTreeHostX11::GetRootWindow() {
return root_window_;
}
-gfx::AcceleratedWidget DesktopRootWindowHostX11::GetAcceleratedWidget() {
+gfx::AcceleratedWidget DesktopWindowTreeHostX11::GetAcceleratedWidget() {
return xwindow_;
}
-void DesktopRootWindowHostX11::Show() {
+void DesktopWindowTreeHostX11::Show() {
if (!window_mapped_) {
// Before we map the window, set size hints. Otherwise, some window managers
// will ignore toplevel XMoveWindow commands.
@@ -743,22 +743,22 @@ void DesktopRootWindowHostX11::Show() {
native_widget_delegate_->AsWidget()->SetInitialFocus();
}
-void DesktopRootWindowHostX11::Hide() {
+void DesktopWindowTreeHostX11::Hide() {
if (window_mapped_) {
XWithdrawWindow(xdisplay_, xwindow_, 0);
window_mapped_ = false;
}
}
-void DesktopRootWindowHostX11::ToggleFullScreen() {
+void DesktopWindowTreeHostX11::ToggleFullScreen() {
NOTIMPLEMENTED();
}
-gfx::Rect DesktopRootWindowHostX11::GetBounds() const {
+gfx::Rect DesktopWindowTreeHostX11::GetBounds() const {
return bounds_;
}
-void DesktopRootWindowHostX11::SetBounds(const gfx::Rect& bounds) {
+void DesktopWindowTreeHostX11::SetBounds(const gfx::Rect& bounds) {
bool origin_changed = bounds_.origin() != bounds.origin();
bool size_changed = bounds_.size() != bounds.size();
XWindowChanges changes = {0};
@@ -797,18 +797,18 @@ void DesktopRootWindowHostX11::SetBounds(const gfx::Rect& bounds) {
compositor()->ScheduleRedrawRect(gfx::Rect(bounds.size()));
}
-gfx::Insets DesktopRootWindowHostX11::GetInsets() const {
+gfx::Insets DesktopWindowTreeHostX11::GetInsets() const {
return gfx::Insets();
}
-void DesktopRootWindowHostX11::SetInsets(const gfx::Insets& insets) {
+void DesktopWindowTreeHostX11::SetInsets(const gfx::Insets& insets) {
}
-gfx::Point DesktopRootWindowHostX11::GetLocationOnNativeScreen() const {
+gfx::Point DesktopWindowTreeHostX11::GetLocationOnNativeScreen() const {
return bounds_.origin();
}
-void DesktopRootWindowHostX11::SetCapture() {
+void DesktopWindowTreeHostX11::SetCapture() {
// This is vaguely based on the old NativeWidgetGtk implementation.
//
// X11's XPointerGrab() shouldn't be used for everything; it doesn't map
@@ -824,16 +824,16 @@ void DesktopRootWindowHostX11::SetCapture() {
x11_capture_.reset(new X11ScopedCapture(xwindow_));
}
-void DesktopRootWindowHostX11::ReleaseCapture() {
+void DesktopWindowTreeHostX11::ReleaseCapture() {
if (g_current_capture == this)
g_current_capture->OnCaptureReleased();
}
-void DesktopRootWindowHostX11::SetCursor(gfx::NativeCursor cursor) {
+void DesktopWindowTreeHostX11::SetCursor(gfx::NativeCursor cursor) {
XDefineCursor(xdisplay_, xwindow_, cursor.platform());
}
-bool DesktopRootWindowHostX11::QueryMouseLocation(
+bool DesktopWindowTreeHostX11::QueryMouseLocation(
gfx::Point* location_return) {
aura::client::CursorClient* cursor_client =
aura::client::GetCursorClient(GetRootWindow()->window());
@@ -859,26 +859,26 @@ bool DesktopRootWindowHostX11::QueryMouseLocation(
win_y_return >= 0 && win_y_return < bounds_.height());
}
-bool DesktopRootWindowHostX11::ConfineCursorToRootWindow() {
+bool DesktopWindowTreeHostX11::ConfineCursorToRootWindow() {
NOTIMPLEMENTED();
return false;
}
-void DesktopRootWindowHostX11::UnConfineCursor() {
+void DesktopWindowTreeHostX11::UnConfineCursor() {
NOTIMPLEMENTED();
}
-void DesktopRootWindowHostX11::OnCursorVisibilityChanged(bool show) {
+void DesktopWindowTreeHostX11::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 DesktopRootWindowHostX11::MoveCursorTo(const gfx::Point& location) {
+void DesktopWindowTreeHostX11::MoveCursorTo(const gfx::Point& location) {
XWarpPointer(xdisplay_, None, x_root_window_, 0, 0, 0, 0,
bounds_.x() + location.x(), bounds_.y() + location.y());
}
-void DesktopRootWindowHostX11::PostNativeEvent(
+void DesktopWindowTreeHostX11::PostNativeEvent(
const base::NativeEvent& native_event) {
DCHECK(xwindow_);
DCHECK(xdisplay_);
@@ -911,17 +911,17 @@ void DesktopRootWindowHostX11::PostNativeEvent(
XSendEvent(xdisplay_, xwindow_, False, 0, &xevent);
}
-void DesktopRootWindowHostX11::OnDeviceScaleFactorChanged(
+void DesktopWindowTreeHostX11::OnDeviceScaleFactorChanged(
float device_scale_factor) {
}
-void DesktopRootWindowHostX11::PrepareForShutdown() {
+void DesktopWindowTreeHostX11::PrepareForShutdown() {
}
////////////////////////////////////////////////////////////////////////////////
-// DesktopRootWindowHostX11, private:
+// DesktopWindowTreeHostX11, private:
-void DesktopRootWindowHostX11::InitX11Window(
+void DesktopWindowTreeHostX11::InitX11Window(
const Widget::InitParams& params) {
unsigned long attribute_mask = CWBackPixmap;
XSetWindowAttributes swa;
@@ -1071,14 +1071,14 @@ void DesktopRootWindowHostX11::InitX11Window(
CreateCompositor(GetAcceleratedWidget());
}
-bool DesktopRootWindowHostX11::IsWindowManagerPresent() {
+bool DesktopWindowTreeHostX11::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 DesktopRootWindowHostX11::SetWMSpecState(bool enabled,
+void DesktopWindowTreeHostX11::SetWMSpecState(bool enabled,
::Atom state1,
::Atom state2) {
XEvent xclient;
@@ -1099,23 +1099,23 @@ void DesktopRootWindowHostX11::SetWMSpecState(bool enabled,
&xclient);
}
-bool DesktopRootWindowHostX11::HasWMSpecProperty(const char* property) const {
+bool DesktopWindowTreeHostX11::HasWMSpecProperty(const char* property) const {
return window_properties_.find(atom_cache_.GetAtom(property)) !=
window_properties_.end();
}
-void DesktopRootWindowHostX11::OnCaptureReleased() {
+void DesktopWindowTreeHostX11::OnCaptureReleased() {
x11_capture_.reset();
g_current_capture = NULL;
delegate_->OnHostLostWindowCapture();
native_widget_delegate_->OnMouseCaptureLost();
}
-void DesktopRootWindowHostX11::DispatchMouseEvent(ui::MouseEvent* event) {
+void DesktopWindowTreeHostX11::DispatchMouseEvent(ui::MouseEvent* event) {
if (!g_current_capture || g_current_capture == this) {
delegate_->OnHostMouseEvent(event);
} else {
- // Another DesktopRootWindowHostX11 has installed itself as
+ // Another DesktopWindowTreeHostX11 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());
@@ -1123,7 +1123,7 @@ void DesktopRootWindowHostX11::DispatchMouseEvent(ui::MouseEvent* event) {
}
}
-void DesktopRootWindowHostX11::DispatchTouchEvent(ui::TouchEvent* event) {
+void DesktopWindowTreeHostX11::DispatchTouchEvent(ui::TouchEvent* event) {
if (g_current_capture && g_current_capture != this &&
event->type() == ui::ET_TOUCH_PRESSED) {
event->ConvertLocationToTarget(root_window_->window(),
@@ -1134,7 +1134,7 @@ void DesktopRootWindowHostX11::DispatchTouchEvent(ui::TouchEvent* event) {
}
}
-void DesktopRootWindowHostX11::ResetWindowRegion() {
+void DesktopWindowTreeHostX11::ResetWindowRegion() {
// If a custom window shape was supplied then apply it.
if (custom_window_shape_) {
XShapeCombineRegion(
@@ -1167,7 +1167,7 @@ void DesktopRootWindowHostX11::ResetWindowRegion() {
0, 0, &r, 1, ShapeSet, YXBanded);
}
-void DesktopRootWindowHostX11::SerializeImageRepresentation(
+void DesktopWindowTreeHostX11::SerializeImageRepresentation(
const gfx::ImageSkiaRep& rep,
std::vector<unsigned long>* data) {
int width = rep.GetWidth();
@@ -1184,19 +1184,19 @@ void DesktopRootWindowHostX11::SerializeImageRepresentation(
data->push_back(bitmap.getColor(x, y));
}
-std::list<XID>& DesktopRootWindowHostX11::open_windows() {
+std::list<XID>& DesktopWindowTreeHostX11::open_windows() {
if (!open_windows_)
open_windows_ = new std::list<XID>();
return *open_windows_;
}
////////////////////////////////////////////////////////////////////////////////
-// DesktopRootWindowHostX11, MessageLoop::Dispatcher implementation:
+// DesktopWindowTreeHostX11, MessageLoop::Dispatcher implementation:
-bool DesktopRootWindowHostX11::Dispatch(const base::NativeEvent& event) {
+bool DesktopWindowTreeHostX11::Dispatch(const base::NativeEvent& event) {
XEvent* xev = event;
- TRACE_EVENT1("views", "DesktopRootWindowHostX11::Dispatch",
+ TRACE_EVENT1("views", "DesktopWindowTreeHostX11::Dispatch",
"event->type", event->type);
// May want to factor CheckXEventForConsistency(xev); into a common location
@@ -1386,13 +1386,13 @@ bool DesktopRootWindowHostX11::Dispatch(const base::NativeEvent& event) {
break;
}
case MapNotify: {
- FOR_EACH_OBSERVER(DesktopRootWindowHostObserverX11,
+ FOR_EACH_OBSERVER(DesktopWindowTreeHostObserverX11,
observer_list_,
OnWindowMapped(xwindow_));
break;
}
case UnmapNotify: {
- FOR_EACH_OBSERVER(DesktopRootWindowHostObserverX11,
+ FOR_EACH_OBSERVER(DesktopWindowTreeHostObserverX11,
observer_list_,
OnWindowUnmapped(xwindow_));
break;
@@ -1403,7 +1403,7 @@ bool DesktopRootWindowHostX11::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_->OnRootWindowHostCloseRequested();
+ root_window_->OnWindowTreeHostCloseRequested();
} else if (protocol == atom_cache_.GetAtom("_NET_WM_PING")) {
XEvent reply_event = *xev;
reply_event.xclient.window = x_root_window_;
@@ -1526,18 +1526,18 @@ bool DesktopRootWindowHostX11::Dispatch(const base::NativeEvent& event) {
}
////////////////////////////////////////////////////////////////////////////////
-// DesktopRootWindowHost, public:
+// DesktopWindowTreeHost, public:
// static
-DesktopRootWindowHost* DesktopRootWindowHost::Create(
+DesktopWindowTreeHost* DesktopWindowTreeHost::Create(
internal::NativeWidgetDelegate* native_widget_delegate,
DesktopNativeWidgetAura* desktop_native_widget_aura) {
- return new DesktopRootWindowHostX11(native_widget_delegate,
+ return new DesktopWindowTreeHostX11(native_widget_delegate,
desktop_native_widget_aura);
}
// static
-ui::NativeTheme* DesktopRootWindowHost::GetNativeTheme(aura::Window* window) {
+ui::NativeTheme* DesktopWindowTreeHost::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 2c55162..5abbf67 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
@@ -29,26 +29,26 @@ class ImageSkiaRep;
namespace views {
class DesktopDragDropClientAuraX11;
class DesktopDispatcherClient;
-class DesktopRootWindowHostObserverX11;
+class DesktopWindowTreeHostObserverX11;
class X11DesktopWindowMoveClient;
class X11ScopedCapture;
class X11WindowEventFilter;
-class VIEWS_EXPORT DesktopRootWindowHostX11 :
- public DesktopRootWindowHost,
- public aura::RootWindowHost,
+class VIEWS_EXPORT DesktopWindowTreeHostX11 :
+ public DesktopWindowTreeHost,
+ public aura::WindowTreeHost,
public base::MessageLoop::Dispatcher {
public:
- DesktopRootWindowHostX11(
+ DesktopWindowTreeHostX11(
internal::NativeWidgetDelegate* native_widget_delegate,
DesktopNativeWidgetAura* desktop_native_widget_aura);
- virtual ~DesktopRootWindowHostX11();
+ virtual ~DesktopWindowTreeHostX11();
// 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 DesktopRootWindowHostX11* GetHostForXID(XID xid);
+ static DesktopWindowTreeHostX11* 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
@@ -62,14 +62,14 @@ class VIEWS_EXPORT DesktopRootWindowHostX11 :
// has changed our activation.
void HandleNativeWidgetActivationChanged(bool active);
- void AddObserver(views::DesktopRootWindowHostObserverX11* observer);
- void RemoveObserver(views::DesktopRootWindowHostObserverX11* observer);
+ void AddObserver(views::DesktopWindowTreeHostObserverX11* observer);
+ void RemoveObserver(views::DesktopWindowTreeHostObserverX11* observer);
// Deallocates the internal list of open windows.
static void CleanUpWindowList();
protected:
- // Overridden from DesktopRootWindowHost:
+ // Overridden from DesktopWindowTreeHost:
virtual void Init(aura::Window* content_window,
const Widget::InitParams& params,
aura::RootWindow::CreateParams* rw_create_params) OVERRIDE;
@@ -80,7 +80,7 @@ class VIEWS_EXPORT DesktopRootWindowHostX11 :
CreateDragDropClient(DesktopNativeCursorManager* cursor_manager) OVERRIDE;
virtual void Close() OVERRIDE;
virtual void CloseNow() OVERRIDE;
- virtual aura::RootWindowHost* AsRootWindowHost() OVERRIDE;
+ virtual aura::WindowTreeHost* AsWindowTreeHost() OVERRIDE;
virtual void ShowWindowWithState(ui::WindowShowState show_state) OVERRIDE;
virtual void ShowMaximizedWithBounds(
const gfx::Rect& restored_bounds) OVERRIDE;
@@ -130,7 +130,7 @@ class VIEWS_EXPORT DesktopRootWindowHostX11 :
virtual void OnNativeWidgetBlur() OVERRIDE;
virtual bool IsAnimatingClosed() const OVERRIDE;
- // Overridden from aura::RootWindowHost:
+ // Overridden from aura::WindowTreeHost:
virtual aura::RootWindow* GetRootWindow() OVERRIDE;
virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE;
virtual void Show() OVERRIDE;
@@ -201,7 +201,7 @@ private:
// Overridden from Dispatcher:
virtual bool Dispatch(const base::NativeEvent& event) OVERRIDE;
- base::WeakPtrFactory<DesktopRootWindowHostX11> close_widget_factory_;
+ base::WeakPtrFactory<DesktopWindowTreeHostX11> close_widget_factory_;
// X11 things
// The display and the native X window hosting the root window.
@@ -263,10 +263,10 @@ 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().
- DesktopRootWindowHostX11* window_parent_;
- std::set<DesktopRootWindowHostX11*> window_children_;
+ DesktopWindowTreeHostX11* window_parent_;
+ std::set<DesktopWindowTreeHostX11*> window_children_;
- ObserverList<DesktopRootWindowHostObserverX11> observer_list_;
+ ObserverList<DesktopWindowTreeHostObserverX11> observer_list_;
// Copy of custom window shape specified via SetShape(), if any.
::Region custom_window_shape_;
@@ -276,7 +276,7 @@ private:
// 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 DesktopRootWindowHostX11* g_current_capture;
+ static DesktopWindowTreeHostX11* g_current_capture;
// A list of all (top-level) windows that have been created but not yet
// destroyed.
@@ -286,7 +286,7 @@ private:
base::string16 window_title_;
- DISALLOW_COPY_AND_ASSIGN(DesktopRootWindowHostX11);
+ DISALLOW_COPY_AND_ASSIGN(DesktopWindowTreeHostX11);
};
} // namespace views
diff --git a/ui/views/widget/desktop_aura/desktop_screen.h b/ui/views/widget/desktop_aura/desktop_screen.h
index ad66bd4..2db961d 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 RootWindowHost. Caller owns the result.
+// a WindowTreeHost. 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 86823a0..99a5449 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)) ?
- DesktopRootWindowHostWin::GetContentWindowForHWND(hwnd) : NULL;
+ DesktopWindowTreeHostWin::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 332b81c..50854b9 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 =
- DesktopRootWindowHostX11::GetAllOpenWindows();
+ DesktopWindowTreeHostX11::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) {
- DesktopRootWindowHostX11* rwh = DesktopRootWindowHostX11::GetHostForXID(
+ DesktopWindowTreeHostX11* rwh = DesktopWindowTreeHostX11::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 55ce070..c8efae8 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 DesktopRootWindowHostX11 is set up
+ // Make sure the internal state of DesktopWindowTreeHostX11 is set up
// correctly.
- ASSERT_EQ(3u, DesktopRootWindowHostX11::GetAllOpenWindows().size());
+ ASSERT_EQ(3u, DesktopWindowTreeHostX11::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 0cfe040..3a14e04 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;
- DesktopRootWindowHostX11* old_host =
- views::DesktopRootWindowHostX11::GetHostForXID(current_window_);
+ DesktopWindowTreeHostX11* old_host =
+ views::DesktopWindowTreeHostX11::GetHostForXID(current_window_);
if (old_host)
old_host->HandleNativeWidgetActivationChanged(false);
- DesktopRootWindowHostX11* new_host =
- views::DesktopRootWindowHostX11::GetHostForXID(xid);
+ DesktopWindowTreeHostX11* new_host =
+ views::DesktopWindowTreeHostX11::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 a79d365..0e81528 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() {
}
////////////////////////////////////////////////////////////////////////////////
-// DesktopRootWindowHostLinux, aura::client::WindowMoveClient implementation:
+// DesktopWindowTreeHostLinux, aura::client::WindowMoveClient implementation:
aura::client::WindowMoveResult X11DesktopWindowMoveClient::RunMoveLoop(
aura::Window* source,
@@ -90,7 +90,7 @@ void X11DesktopWindowMoveClient::EndMoveLoop() {
}
////////////////////////////////////////////////////////////////////////////////
-// DesktopRootWindowHostLinux, private:
+// DesktopWindowTreeHostLinux, 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 fd4b214..452a531 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
@@ -29,7 +29,7 @@ namespace {
class ScopedCapturer {
public:
- explicit ScopedCapturer(aura::RootWindowHost* host)
+ explicit ScopedCapturer(aura::WindowTreeHost* host)
: host_(host) {
host_->SetCapture();
}
@@ -39,7 +39,7 @@ class ScopedCapturer {
}
private:
- aura::RootWindowHost* host_;
+ aura::WindowTreeHost* host_;
DISALLOW_COPY_AND_ASSIGN(ScopedCapturer);
};
@@ -57,7 +57,7 @@ X11WholeScreenMoveLoop::X11WholeScreenMoveLoop(
X11WholeScreenMoveLoop::~X11WholeScreenMoveLoop() {}
////////////////////////////////////////////////////////////////////////////////
-// DesktopRootWindowHostLinux, MessageLoop::Dispatcher implementation:
+// DesktopWindowTreeHostLinux, MessageLoop::Dispatcher implementation:
bool X11WholeScreenMoveLoop::Dispatch(const base::NativeEvent& event) {
XEvent* xev = event;
@@ -89,7 +89,7 @@ bool X11WholeScreenMoveLoop::Dispatch(const base::NativeEvent& event) {
}
////////////////////////////////////////////////////////////////////////////////
-// DesktopRootWindowHostLinux, aura::client::WindowMoveClient implementation:
+// DesktopWindowTreeHostLinux, aura::client::WindowMoveClient implementation:
bool X11WholeScreenMoveLoop::RunMoveLoop(aura::Window* source,
gfx::NativeCursor cursor) {
diff --git a/ui/views/widget/desktop_aura/x11_window_event_filter.cc b/ui/views/widget/desktop_aura/x11_window_event_filter.cc
index 3f415f0..2c490f3 100644
--- a/ui/views/widget/desktop_aura/x11_window_event_filter.cc
+++ b/ui/views/widget/desktop_aura/x11_window_event_filter.cc
@@ -61,7 +61,7 @@ namespace views {
X11WindowEventFilter::X11WindowEventFilter(
aura::RootWindow* root_window,
- DesktopRootWindowHost* root_window_host)
+ DesktopWindowTreeHost* root_window_host)
: xdisplay_(gfx::GetXDisplay()),
xwindow_(root_window->host()->GetAcceleratedWidget()),
x_root_window_(DefaultRootWindow(xdisplay_)),
diff --git a/ui/views/widget/desktop_aura/x11_window_event_filter.h b/ui/views/widget/desktop_aura/x11_window_event_filter.h
index d172958..303de83 100644
--- a/ui/views/widget/desktop_aura/x11_window_event_filter.h
+++ b/ui/views/widget/desktop_aura/x11_window_event_filter.h
@@ -26,14 +26,14 @@ class Point;
}
namespace views {
-class DesktopRootWindowHost;
+class DesktopWindowTreeHost;
class NativeWidgetAura;
// An EventFilter that sets properties on X11 windows.
class VIEWS_EXPORT X11WindowEventFilter : public ui::EventHandler {
public:
X11WindowEventFilter(aura::RootWindow* root_window,
- DesktopRootWindowHost* root_window_host);
+ DesktopWindowTreeHost* root_window_host);
virtual ~X11WindowEventFilter();
// Changes whether borders are shown on this |root_window|.
@@ -57,7 +57,7 @@ class VIEWS_EXPORT X11WindowEventFilter : public ui::EventHandler {
ui::X11AtomCache atom_cache_;
- DesktopRootWindowHost* root_window_host_;
+ DesktopWindowTreeHost* root_window_host_;
// True if |xwindow_| is the current _NET_ACTIVE_WINDOW.
bool is_active_;
diff --git a/ui/views/widget/native_widget_aura.cc b/ui/views/widget/native_widget_aura.cc
index 368b929..fbe4e46 100644
--- a/ui/views/widget/native_widget_aura.cc
+++ b/ui/views/widget/native_widget_aura.cc
@@ -679,7 +679,7 @@ void NativeWidgetAura::SetVisibilityChangedAnimationsEnabled(bool value) {
ui::NativeTheme* NativeWidgetAura::GetNativeTheme() const {
#if !defined(OS_CHROMEOS)
- return DesktopRootWindowHost::GetNativeTheme(window_);
+ return DesktopWindowTreeHost::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 =
- DesktopRootWindowHostWin::GetContentWindowForHWND(hwnd);
+ DesktopWindowTreeHostWin::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 =
- DesktopRootWindowHostX11::GetAllOpenWindows();
+ DesktopWindowTreeHostX11::GetAllOpenWindows();
std::for_each(open_windows.begin(), open_windows.end(), CloseWindow);
- DesktopRootWindowHostX11::CleanUpWindowList();
+ DesktopWindowTreeHostX11::CleanUpWindowList();
#endif
}
diff --git a/ui/views/widget/native_widget_aura_unittest.cc b/ui/views/widget/native_widget_aura_unittest.cc
index 29166d8..a32be2f 100644
--- a/ui/views/widget/native_widget_aura_unittest.cc
+++ b/ui/views/widget/native_widget_aura_unittest.cc
@@ -250,7 +250,7 @@ TEST_F(NativeWidgetAuraTest, DontCaptureOnGesture) {
ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(41, 51), 1,
base::TimeDelta());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
// Both views should get the press.
EXPECT_TRUE(view->got_gesture_event());
EXPECT_TRUE(child->got_gesture_event());
@@ -263,7 +263,7 @@ TEST_F(NativeWidgetAuraTest, DontCaptureOnGesture) {
// the press.
ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(250, 251), 1,
base::TimeDelta());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
EXPECT_TRUE(view->got_gesture_event());
EXPECT_FALSE(child->got_gesture_event());
view->clear_got_gesture_event();
@@ -286,7 +286,7 @@ TEST_F(NativeWidgetAuraTest, ReleaseCaptureOnTouchRelease) {
ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(41, 51), 1,
base::TimeDelta());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
EXPECT_TRUE(view->got_gesture_event());
view->clear_got_gesture_event();
// Set the capture.
@@ -296,7 +296,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()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsWindowTreeHostDelegate()->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 d79b695..cdcf573 100644
--- a/ui/views/widget/widget.h
+++ b/ui/views/widget/widget.h
@@ -52,7 +52,7 @@ class ThemeProvider;
namespace views {
-class DesktopRootWindowHost;
+class DesktopWindowTreeHost;
class InputMethod;
class NativeWidget;
class NonClientFrameView;
@@ -205,11 +205,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 DesktopRootWindowHost implementation to use instead
+ // Aura-only. Provides a DesktopWindowTreeHost 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.
- DesktopRootWindowHost* desktop_root_window_host;
+ DesktopWindowTreeHost* 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 202d453..3fd2509 100644
--- a/ui/views/widget/widget_interactive_uitest.cc
+++ b/ui/views/widget/widget_interactive_uitest.cc
@@ -780,7 +780,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, ui::EF_NONE);
- widget1.GetNativeWindow()->GetDispatcher()->AsRootWindowHostDelegate()->
+ widget1.GetNativeWindow()->GetDispatcher()->AsWindowTreeHostDelegate()->
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 71745d0..a19cfcd 100644
--- a/ui/views/widget/widget_unittest.cc
+++ b/ui/views/widget/widget_unittest.cc
@@ -1220,7 +1220,7 @@ TEST_F(WidgetTest, DesktopAuraTopLevelOwnedPopupTest) {
#if defined(OS_WIN)
// TODO(ananta)
// Fix this test to work on Linux Aura. Need to implement the
-// views::DesktopRootWindowHostX11::SetSize function
+// views::DesktopWindowTreeHostX11::SetSize function
// This test validates that when a top level owned popup Aura window is
// resized, the widget is resized as well.
TEST_F(WidgetTest, DesktopAuraTopLevelOwnedPopupResizeTest) {
@@ -1322,8 +1322,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, 0);
- aura::RootWindowHostDelegate* rwhd =
- widget->GetNativeWindow()->GetDispatcher()->AsRootWindowHostDelegate();
+ aura::WindowTreeHostDelegate* rwhd =
+ widget->GetNativeWindow()->GetDispatcher()->AsWindowTreeHostDelegate();
rwhd->OnHostMouseEvent(&move_event);
if (last_event_type == ui::ET_MOUSE_ENTERED)
return;
@@ -2086,7 +2086,7 @@ TEST_F(WidgetTest, WindowMouseModalityTest) {
ui::EF_NONE,
ui::EF_NONE);
top_level_widget.GetNativeView()->GetDispatcher()->
- AsRootWindowHostDelegate()->OnHostMouseEvent(&move_main);
+ AsWindowTreeHostDelegate()->OnHostMouseEvent(&move_main);
EXPECT_EQ(1, widget_view->GetEventCount(ui::ET_MOUSE_ENTERED));
widget_view->ResetCounts();
@@ -2113,7 +2113,7 @@ TEST_F(WidgetTest, WindowMouseModalityTest) {
ui::EF_NONE,
ui::EF_NONE);
top_level_widget.GetNativeView()->GetDispatcher()->
- AsRootWindowHostDelegate()->OnHostMouseEvent(&mouse_down_dialog);
+ AsWindowTreeHostDelegate()->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
@@ -2125,7 +2125,7 @@ TEST_F(WidgetTest, WindowMouseModalityTest) {
ui::EF_NONE,
ui::EF_NONE);
top_level_widget.GetNativeView()->GetDispatcher()->
- AsRootWindowHostDelegate()->OnHostMouseEvent(&mouse_down_main);
+ AsWindowTreeHostDelegate()->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 802b702..ab75a96c 100644
--- a/ui/views/win/hwnd_message_handler.h
+++ b/ui/views/win/hwnd_message_handler.h
@@ -103,7 +103,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::RootWindowHost
+// used by both a views::NativeWidget and an aura::WindowTreeHost
// implementation.
// TODO(beng): This object should eventually *become* the WindowImpl.
class VIEWS_EXPORT HWNDMessageHandler :
diff --git a/win8/metro_driver/ime/text_service.cc b/win8/metro_driver/ime/text_service.cc
index d9015ca..de82a78 100644
--- a/win8/metro_driver/ime/text_service.cc
+++ b/win8/metro_driver/ime/text_service.cc
@@ -46,7 +46,7 @@
// TextServiceImpl
// -> ChromeAppViewAsh
// -- (process boundary) --
-// -> RemoteRootWindowHostWin
+// -> RemoteWindowTreeHostWin
// -> RemoteInputMethodWin
//
// browser process -> metro_driver process
@@ -55,7 +55,7 @@
// - MetroViewerHostMsg_ImeTextInputClientUpdated
// Message Routing:
// RemoteInputMethodWin
-// -> RemoteRootWindowHostWin
+// -> RemoteWindowTreeHostWin
// -- (process boundary) --
// -> ChromeAppViewAsh
// -> TextServiceImpl
diff --git a/win8/viewer/metro_viewer_process_host.cc b/win8/viewer/metro_viewer_process_host.cc
index 6832dba..90234bd 100644
--- a/win8/viewer/metro_viewer_process_host.cc
+++ b/win8/viewer/metro_viewer_process_host.cc
@@ -102,7 +102,7 @@ bool MetroViewerProcessHost::OnMessageReceived(
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
return handled ? true :
- aura::RemoteRootWindowHostWin::Instance()->OnMessageReceived(message);
+ aura::RemoteWindowTreeHostWin::Instance()->OnMessageReceived(message);
}
void MetroViewerProcessHost::NotifyChannelConnected() {