summaryrefslogtreecommitdiffstats
path: root/ui/views
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-19 21:51:26 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-19 21:51:26 +0000
commita657d1a593cbdde72d67d38c640fb1e7fc29c681 (patch)
treecc9bea090289bc4a04c3df57858ffa781ed29fc8 /ui/views
parent30103b3e9b7a9211c1d705d3899060888f03e801 (diff)
downloadchromium_src-a657d1a593cbdde72d67d38c640fb1e7fc29c681.zip
chromium_src-a657d1a593cbdde72d67d38c640fb1e7fc29c681.tar.gz
chromium_src-a657d1a593cbdde72d67d38c640fb1e7fc29c681.tar.bz2
Rename RootWindowHost* to WindowTreeHost*
TBR=sky@chromium.org http://crbug.com/308843 Review URL: https://codereview.chromium.org/76583003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@236048 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/views')
-rw-r--r--ui/views/corewm/capture_controller_unittest.cc2
-rw-r--r--ui/views/corewm/compound_event_filter_unittest.cc24
-rw-r--r--ui/views/corewm/input_method_event_filter.cc4
-rw-r--r--ui/views/corewm/tooltip_win.h2
-rw-r--r--ui/views/test/ui_controls_factory_desktop_aurax11.cc4
-rw-r--r--ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.h2
-rw-r--r--ui/views/widget/desktop_aura/desktop_drop_target_win.h2
-rw-r--r--ui/views/widget/desktop_aura/desktop_factory_ozone.h6
-rw-r--r--ui/views/widget/desktop_aura/desktop_native_widget_aura.cc34
-rw-r--r--ui/views/widget/desktop_aura/desktop_native_widget_aura.h18
-rw-r--r--ui/views/widget/desktop_aura/desktop_root_window_host.h14
-rw-r--r--ui/views/widget/desktop_aura/desktop_root_window_host_observer_x11.h4
-rw-r--r--ui/views/widget/desktop_aura/desktop_root_window_host_ozone.cc4
-rw-r--r--ui/views/widget/desktop_aura/desktop_root_window_host_win.cc312
-rw-r--r--ui/views/widget/desktop_aura/desktop_root_window_host_win.h18
-rw-r--r--ui/views/widget/desktop_aura/desktop_root_window_host_win_unittest.cc22
-rw-r--r--ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc226
-rw-r--r--ui/views/widget/desktop_aura/desktop_root_window_host_x11.h36
-rw-r--r--ui/views/widget/desktop_aura/desktop_screen.h2
-rw-r--r--ui/views/widget/desktop_aura/desktop_screen_win.cc2
-rw-r--r--ui/views/widget/desktop_aura/desktop_screen_x11.cc4
-rw-r--r--ui/views/widget/desktop_aura/desktop_screen_x11_unittest.cc4
-rw-r--r--ui/views/widget/desktop_aura/x11_desktop_handler.cc8
-rw-r--r--ui/views/widget/desktop_aura/x11_desktop_window_move_client.cc4
-rw-r--r--ui/views/widget/desktop_aura/x11_whole_screen_move_loop.cc4
-rw-r--r--ui/views/widget/native_widget_aura.cc8
-rw-r--r--ui/views/widget/native_widget_aura_unittest.cc8
-rw-r--r--ui/views/widget/widget.h6
-rw-r--r--ui/views/widget/widget_interactive_uitest.cc2
-rw-r--r--ui/views/widget/widget_unittest.cc10
-rw-r--r--ui/views/win/hwnd_message_handler.h2
31 files changed, 399 insertions, 399 deletions
diff --git a/ui/views/corewm/capture_controller_unittest.cc b/ui/views/corewm/capture_controller_unittest.cc
index f6ac7b3..a32e56e 100644
--- a/ui/views/corewm/capture_controller_unittest.cc
+++ b/ui/views/corewm/capture_controller_unittest.cc
@@ -103,7 +103,7 @@ TEST_F(CaptureControllerTest, ResetMouseEventHandlerOnCapture) {
// dispatch further mouse events to |w1|.
ui::MouseEvent mouse_pressed_event(ui::ET_MOUSE_PRESSED, gfx::Point(5, 5),
gfx::Point(5, 5), 0);
- dispatcher()->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 6b852e4..b094d74 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);
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);
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);
- 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);
exit.set_flags(enter.flags() | ui::EF_IS_SYNTHESIZED);
- dispatcher()->AsRootWindowHostDelegate()->OnHostMouseEvent(&exit);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostMouseEvent(&exit);
EXPECT_FALSE(cursor_client.IsCursorVisible());
}
@@ -111,29 +111,29 @@ TEST_F(CompoundEventFilterTest, TouchHidesCursor) {
ui::MouseEvent mouse0(ui::ET_MOUSE_MOVED, gfx::Point(10, 10),
gfx::Point(10, 10), 0);
- dispatcher()->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);
// 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.
@@ -141,7 +141,7 @@ TEST_F(CompoundEventFilterTest, TouchHidesCursor) {
ui::ET_TOUCH_PRESSED, gfx::Point(90, 90), 1, GetTime());
aura::client::GetActivationClient(
root_window())->ActivateWindow(window.get());
- dispatcher()->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 ab01728..394b7a8 100644
--- a/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
+++ b/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
@@ -239,7 +239,7 @@ DesktopNativeWidgetAura* DesktopNativeWidgetAura::ForWindow(
void DesktopNativeWidgetAura::OnHostClosed() {
// Don't invoke Widget::OnNativeWidgetDestroying(), its done by
- // DesktopRootWindowHost.
+ // DesktopWindowTreeHost.
// The WindowModalityController is at the front of the event pretarget
// handler list. We destroy it first to preserve order symantics.
@@ -254,7 +254,7 @@ void DesktopNativeWidgetAura::OnHostClosed() {
capture_window->ReleaseCapture();
}
- // 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();
@@ -279,10 +279,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();
@@ -361,7 +361,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);
@@ -377,7 +377,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-
@@ -427,7 +427,7 @@ void DesktopNativeWidgetAura::InitNativeWidget(
focus_client_->FocusWindow(content_window_);
- OnRootWindowHostResized(root_window_.get());
+ OnWindowTreeHostResized(root_window_.get());
root_window_->AddRootWindowObserver(this);
@@ -625,7 +625,7 @@ void DesktopNativeWidgetAura::SetBounds(const gfx::Rect& bounds) {
// TODO(ananta)
// This code by default scales the bounds rectangle by 1.
// We could probably get rid of this and similar logic from
- // the DesktopNativeWidgetAura::OnRootWindowHostResized function.
+ // the DesktopNativeWidgetAura::OnWindowTreeHostResized function.
float scale = 1;
aura::Window* root = root_window_->window();
if (root) {
@@ -635,7 +635,7 @@ void DesktopNativeWidgetAura::SetBounds(const gfx::Rect& bounds) {
gfx::Rect bounds_in_pixels(
gfx::ToCeiledPoint(gfx::ScalePoint(bounds.origin(), scale)),
gfx::ToFlooredSize(gfx::ScaleSize(bounds.size(), scale)));
- desktop_root_window_host_->AsRootWindowHost()->SetBounds(bounds_in_pixels);
+ desktop_root_window_host_->AsWindowTreeHost()->SetBounds(bounds_in_pixels);
}
void DesktopNativeWidgetAura::SetSize(const gfx::Size& size) {
@@ -675,14 +675,14 @@ void DesktopNativeWidgetAura::CloseNow() {
void DesktopNativeWidgetAura::Show() {
if (!content_window_)
return;
- desktop_root_window_host_->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();
}
@@ -839,7 +839,7 @@ void DesktopNativeWidgetAura::SetVisibilityChangedAnimationsEnabled(
}
ui::NativeTheme* DesktopNativeWidgetAura::GetNativeTheme() const {
- return DesktopRootWindowHost::GetNativeTheme(content_window_);
+ return DesktopWindowTreeHost::GetNativeTheme(content_window_);
}
void DesktopNativeWidgetAura::OnRootViewLayout() const {
@@ -1067,12 +1067,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
@@ -1088,10 +1088,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 9fe207a..a7ebd96 100644
--- a/ui/views/widget/desktop_aura/desktop_native_widget_aura.h
+++ b/ui/views/widget/desktop_aura/desktop_native_widget_aura.h
@@ -41,7 +41,7 @@ class WindowModalityController;
class DesktopCaptureClient;
class DesktopDispatcherClient;
class DesktopEventClient;
-class DesktopRootWindowHost;
+class DesktopWindowTreeHost;
class DropHelper;
class FocusManagerEventHandler;
class TooltipManagerAura;
@@ -63,13 +63,13 @@ class VIEWS_EXPORT DesktopNativeWidgetAura
// Maps from window to DesktopNativeWidgetAura.
static DesktopNativeWidgetAura* ForWindow(aura::Window* window);
- // Called by our 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();
@@ -218,10 +218,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:
@@ -240,7 +240,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
@@ -251,7 +251,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 77c6150..8c2704a 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 b1969b3..f96207c 100644
--- a/ui/views/widget/desktop_aura/desktop_root_window_host_win.cc
+++ b/ui/views/widget/desktop_aura/desktop_root_window_host_win.cc
@@ -63,14 +63,14 @@ void InsetBottomRight(gfx::Rect* rect, gfx::Vector2d vector) {
DEFINE_WINDOW_PROPERTY_KEY(aura::Window*, kContentWindowForRootWindow, NULL);
-// Identifies the 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),
@@ -86,20 +86,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 =
@@ -107,7 +107,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();
}
}
@@ -115,9 +115,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) {
@@ -147,14 +147,14 @@ void DesktopRootWindowHostWin::Init(
rw_create_params->host = this;
}
-void DesktopRootWindowHostWin::OnRootWindowCreated(
+void DesktopWindowTreeHostWin::OnRootWindowCreated(
aura::RootWindow* root,
const Widget::InitParams& params) {
root_window_ = root;
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() != aura::client::WINDOW_TYPE_NORMAL &&
@@ -164,21 +164,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;
@@ -194,30 +194,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);
@@ -227,12 +227,12 @@ void DesktopRootWindowHostWin::SetSize(const gfx::Size& size) {
message_handler_->SetSize(expanded);
}
-void DesktopRootWindowHostWin::CenterWindow(const gfx::Size& size) {
+void DesktopWindowTreeHostWin::CenterWindow(const gfx::Size& size) {
gfx::Size size_in_pixels = gfx::win::DIPToScreenSize(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);
@@ -240,25 +240,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(),
@@ -268,7 +268,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 {
@@ -278,59 +278,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();
}
-void DesktopRootWindowHostWin::SetWindowTitle(const string16& title) {
+void DesktopWindowTreeHostWin::SetWindowTitle(const string16& title) {
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) {
@@ -340,99 +340,99 @@ 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);
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().
gfx::Rect bounds(WidgetSizeIsClientSize() ?
message_handler_->GetClientAreaBoundsInScreen() :
@@ -452,7 +452,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
@@ -472,33 +472,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()) {
@@ -512,44 +512,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();
@@ -558,88 +558,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);
@@ -652,45 +652,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_)
@@ -701,36 +701,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();
@@ -740,92 +740,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(true);
}
-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) {
scoped_ptr<ui::KeyEvent> duplicate_event(event.Copy());
return delegate_->OnHostKeyEvent(duplicate_event.get());
}
-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
@@ -837,8 +837,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);
@@ -855,7 +855,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) {
@@ -868,63 +868,63 @@ 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.
}
-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);
@@ -932,7 +932,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_)
@@ -950,13 +950,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 6ac7f6f9..c5c9489 100644
--- a/ui/views/widget/desktop_aura/desktop_root_window_host_win.h
+++ b/ui/views/widget/desktop_aura/desktop_root_window_host_win.h
@@ -27,22 +27,22 @@ namespace corewm {
class TooltipWin;
}
-class VIEWS_EXPORT 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;
@@ -53,7 +53,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;
@@ -102,7 +102,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;
@@ -268,7 +268,7 @@ class VIEWS_EXPORT DesktopRootWindowHostWin
// State of the cursor.
bool is_cursor_visible_;
- 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 f958123..126008a 100644
--- a/ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc
+++ b/ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc
@@ -51,15 +51,15 @@
namespace views {
-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 {
@@ -115,9 +115,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),
@@ -138,26 +138,26 @@ DesktopRootWindowHostX11::DesktopRootWindowHostX11(
window_parent_(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_);
}
// 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(),
@@ -166,11 +166,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();
@@ -183,31 +183,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
@@ -224,7 +224,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;
@@ -257,20 +257,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()) {
@@ -280,12 +280,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;
@@ -293,8 +293,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();
@@ -321,11 +321,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) {
@@ -336,23 +336,23 @@ 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::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|,
@@ -378,7 +378,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_;
@@ -396,14 +396,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
@@ -412,7 +412,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
@@ -423,7 +423,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) {
@@ -444,7 +444,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 (native_region) {
Region region = gfx::CreateRegionFromSkRegion(*native_region);
XShapeCombineRegion(
@@ -457,20 +457,20 @@ void DesktopRootWindowHostX11::SetShape(gfx::NativeRegion native_region) {
delete native_region;
}
-void DesktopRootWindowHostX11::Activate() {
+void DesktopWindowTreeHostX11::Activate() {
X11DesktopHandler::get()->ActivateWindow(xwindow_);
}
-void DesktopRootWindowHostX11::Deactivate() {
+void DesktopWindowTreeHostX11::Deactivate() {
// Deactivating a window means activating nothing.
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.
@@ -481,42 +481,42 @@ void DesktopRootWindowHostX11::Maximize() {
atom_cache_.GetAtom("_NET_WM_STATE_MAXIMIZED_HORZ"));
}
-void DesktopRootWindowHostX11::Minimize() {
+void DesktopWindowTreeHostX11::Minimize() {
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_;
}
-void DesktopRootWindowHostX11::SetWindowTitle(const string16& title) {
+void DesktopWindowTreeHostX11::SetWindowTitle(const string16& title) {
std::string utf8str = UTF16ToUTF8(title);
XChangeProperty(xdisplay_,
@@ -535,7 +535,7 @@ void DesktopRootWindowHostX11::SetWindowTitle(const string16& title) {
XStoreName(xdisplay_, xwindow_, utf8str.c_str());
}
-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.
@@ -546,7 +546,7 @@ void DesktopRootWindowHostX11::ClearNativeFocus() {
}
}
-Widget::MoveLoopResult DesktopRootWindowHostX11::RunMoveLoop(
+Widget::MoveLoopResult DesktopWindowTreeHostX11::RunMoveLoop(
const gfx::Vector2d& drag_offset,
Widget::MoveLoopSource source,
Widget::MoveLoopEscapeBehavior escape_behavior) {
@@ -563,42 +563,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(true);
}
-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.
@@ -616,7 +616,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
@@ -640,7 +640,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;
@@ -652,12 +652,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;
@@ -686,31 +686,31 @@ 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_)
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.
@@ -730,22 +730,22 @@ void DesktopRootWindowHostX11::Show() {
}
}
-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};
@@ -784,18 +784,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
@@ -817,16 +817,16 @@ void DesktopRootWindowHostX11::SetCapture() {
// to skip this for now.
}
-void DesktopRootWindowHostX11::ReleaseCapture() {
+void DesktopWindowTreeHostX11::ReleaseCapture() {
if (g_current_capture)
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());
@@ -852,26 +852,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_);
@@ -904,17 +904,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;
@@ -1060,14 +1060,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;
@@ -1088,22 +1088,22 @@ 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() {
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());
@@ -1111,7 +1111,7 @@ void DesktopRootWindowHostX11::DispatchMouseEvent(ui::MouseEvent* event) {
}
}
-void DesktopRootWindowHostX11::ResetWindowRegion() {
+void DesktopWindowTreeHostX11::ResetWindowRegion() {
if (!IsMaximized()) {
gfx::Path window_mask;
views::Widget* widget = native_widget_delegate_->AsWidget();
@@ -1137,7 +1137,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();
@@ -1154,19 +1154,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
@@ -1361,13 +1361,13 @@ bool DesktopRootWindowHostX11::Dispatch(const base::NativeEvent& event) {
if (!IsWindowManagerPresent() && focus_when_shown_)
XSetInputFocus(xdisplay_, xwindow_, RevertToNone, CurrentTime);
- 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;
@@ -1378,7 +1378,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_;
@@ -1498,18 +1498,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 8309cfc..c1308bfd 100644
--- a/ui/views/widget/desktop_aura/desktop_root_window_host_x11.h
+++ b/ui/views/widget/desktop_aura/desktop_root_window_host_x11.h
@@ -28,25 +28,25 @@ class ImageSkiaRep;
namespace views {
class DesktopDragDropClientAuraX11;
class DesktopDispatcherClient;
-class DesktopRootWindowHostObserverX11;
+class DesktopWindowTreeHostObserverX11;
class X11DesktopWindowMoveClient;
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
@@ -60,14 +60,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;
@@ -78,7 +78,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;
@@ -127,7 +127,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;
@@ -193,7 +193,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.
@@ -258,23 +258,23 @@ private:
// We can optionally have a parent which can order us to close, or own
// children who we're responsible for closing when we CloseNow().
- DesktopRootWindowHostX11* window_parent_;
- std::set<DesktopRootWindowHostX11*> window_children_;
+ DesktopWindowTreeHostX11* window_parent_;
+ std::set<DesktopWindowTreeHostX11*> window_children_;
- ObserverList<DesktopRootWindowHostObserverX11> observer_list_;
+ ObserverList<DesktopWindowTreeHostObserverX11> observer_list_;
// The current root window host that has capture. While X11 has something
// like Windows SetCapture()/ReleaseCapture(), it is entirely implicit and
// there are no notifications when this changes. We need to track this so we
// can notify widgets when they have lost capture, which controls a bunch of
// things in views like hiding menus.
- static DesktopRootWindowHostX11* g_current_capture;
+ static DesktopWindowTreeHostX11* g_current_capture;
// A list of all (top-level) windows that have been created but not yet
// destroyed.
static std::list<XID>* open_windows_;
- DISALLOW_COPY_AND_ASSIGN(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 f17c3f2..754d204 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 a88fdce..30a44bf 100644
--- a/ui/views/widget/desktop_aura/x11_whole_screen_move_loop.cc
+++ b/ui/views/widget/desktop_aura/x11_whole_screen_move_loop.cc
@@ -31,7 +31,7 @@ X11WholeScreenMoveLoop::X11WholeScreenMoveLoop(
X11WholeScreenMoveLoop::~X11WholeScreenMoveLoop() {}
////////////////////////////////////////////////////////////////////////////////
-// DesktopRootWindowHostLinux, MessageLoop::Dispatcher implementation:
+// DesktopWindowTreeHostLinux, MessageLoop::Dispatcher implementation:
bool X11WholeScreenMoveLoop::Dispatch(const base::NativeEvent& event) {
XEvent* xev = event;
@@ -57,7 +57,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/native_widget_aura.cc b/ui/views/widget/native_widget_aura.cc
index ba6954d..a1c79d7 100644
--- a/ui/views/widget/native_widget_aura.cc
+++ b/ui/views/widget/native_widget_aura.cc
@@ -674,7 +674,7 @@ void NativeWidgetAura::SetVisibilityChangedAnimationsEnabled(bool value) {
ui::NativeTheme* NativeWidgetAura::GetNativeTheme() const {
#if !defined(OS_CHROMEOS)
- return 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 f0f34c7..83474d7 100644
--- a/ui/views/widget/native_widget_aura_unittest.cc
+++ b/ui/views/widget/native_widget_aura_unittest.cc
@@ -258,7 +258,7 @@ TEST_F(NativeWidgetAuraTest, DontCaptureOnGesture) {
ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(41, 51), 1,
base::TimeDelta());
- dispatcher()->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());
@@ -271,7 +271,7 @@ TEST_F(NativeWidgetAuraTest, DontCaptureOnGesture) {
// the press.
ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(250, 251), 1,
base::TimeDelta());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
EXPECT_TRUE(view->got_gesture_event());
EXPECT_FALSE(child->got_gesture_event());
view->clear_got_gesture_event();
@@ -294,7 +294,7 @@ TEST_F(NativeWidgetAuraTest, ReleaseCaptureOnTouchRelease) {
ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(41, 51), 1,
base::TimeDelta());
- dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
EXPECT_TRUE(view->got_gesture_event());
view->clear_got_gesture_event();
// Set the capture.
@@ -304,7 +304,7 @@ TEST_F(NativeWidgetAuraTest, ReleaseCaptureOnTouchRelease) {
// Generate a release, this should trigger releasing capture.
ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(41, 51), 1,
base::TimeDelta());
- dispatcher()->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 69aa998..57c79cb 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;
@@ -207,11 +207,11 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
// When set, this value is used as the Widget's NativeWidget implementation.
// The Widget will not construct a default one. Default is NULL.
NativeWidget* native_widget;
- // Aura-only. Provides a 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 889ee6b..12c4570 100644
--- a/ui/views/widget/widget_interactive_uitest.cc
+++ b/ui/views/widget/widget_interactive_uitest.cc
@@ -776,7 +776,7 @@ TEST_F(WidgetCaptureTest, MAYBE_MouseEventDispatchedToRightWindow) {
// |widget2| has capture, |widget1| should still get the event.
ui::MouseEvent mouse_event(ui::ET_MOUSE_EXITED, gfx::Point(), gfx::Point(),
ui::EF_NONE);
- widget1.GetNativeWindow()->GetDispatcher()->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 67887b1..ca5c649 100644
--- a/ui/views/widget/widget_unittest.cc
+++ b/ui/views/widget/widget_unittest.cc
@@ -1309,8 +1309,8 @@ void GenerateMouseEvents(Widget* widget, ui::EventType last_event_type) {
const gfx::Rect screen_bounds(widget->GetWindowBoundsInScreen());
ui::MouseEvent move_event(ui::ET_MOUSE_MOVED, screen_bounds.CenterPoint(),
screen_bounds.CenterPoint(), 0);
- aura::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;
@@ -2014,7 +2014,7 @@ TEST_F(WidgetTest, WindowMouseModalityTest) {
cursor_location_main,
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();
@@ -2040,7 +2040,7 @@ TEST_F(WidgetTest, WindowMouseModalityTest) {
cursor_location_dialog,
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
@@ -2051,7 +2051,7 @@ TEST_F(WidgetTest, WindowMouseModalityTest) {
cursor_location_main2,
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 d08fbd8..c610223 100644
--- a/ui/views/win/hwnd_message_handler.h
+++ b/ui/views/win/hwnd_message_handler.h
@@ -102,7 +102,7 @@ const int WM_NCUAHDRAWFRAME = 0xAF;
// An object that handles messages for a HWND that implements the views
// "Custom Frame" look. The purpose of this class is to isolate the windows-
// specific message handling from the code that wraps it. It is intended to be
-// used by both a views::NativeWidget and an aura::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 :