Index: ui/aura/root_window_host_win.cc |
diff --git a/ui/aura/root_window_host_win.cc b/ui/aura/root_window_host_win.cc |
index 7bf4284ca4bb8b89f91d7e04740f9eb90d79f7ab..e4ae7f6ec812909693b2406d1245922b7a3f8118 100644 |
--- a/ui/aura/root_window_host_win.cc |
+++ b/ui/aura/root_window_host_win.cc |
@@ -29,17 +29,17 @@ bool use_popup_as_root_window_for_test = false; |
} // namespace |
// static |
-RootWindowHost* RootWindowHost::Create(const gfx::Rect& bounds) { |
- return new RootWindowHostWin(bounds); |
+WindowTreeHost* WindowTreeHost::Create(const gfx::Rect& bounds) { |
+ return new WindowTreeHostWin(bounds); |
} |
// static |
-gfx::Size RootWindowHost::GetNativeScreenSize() { |
+gfx::Size WindowTreeHost::GetNativeScreenSize() { |
return gfx::Size(GetSystemMetrics(SM_CXSCREEN), |
GetSystemMetrics(SM_CYSCREEN)); |
} |
-RootWindowHostWin::RootWindowHostWin(const gfx::Rect& bounds) |
+WindowTreeHostWin::WindowTreeHostWin(const gfx::Rect& bounds) |
: fullscreen_(false), |
has_capture_(false), |
saved_window_style_(0), |
@@ -51,27 +51,27 @@ RootWindowHostWin::RootWindowHostWin(const gfx::Rect& bounds) |
CreateCompositor(GetAcceleratedWidget()); |
} |
-RootWindowHostWin::~RootWindowHostWin() { |
+WindowTreeHostWin::~WindowTreeHostWin() { |
DestroyWindow(hwnd()); |
} |
-RootWindow* RootWindowHostWin::GetRootWindow() { |
+RootWindow* WindowTreeHostWin::GetRootWindow() { |
return delegate_->AsRootWindow(); |
} |
-gfx::AcceleratedWidget RootWindowHostWin::GetAcceleratedWidget() { |
+gfx::AcceleratedWidget WindowTreeHostWin::GetAcceleratedWidget() { |
return hwnd(); |
} |
-void RootWindowHostWin::Show() { |
+void WindowTreeHostWin::Show() { |
ShowWindow(hwnd(), SW_SHOWNORMAL); |
} |
-void RootWindowHostWin::Hide() { |
+void WindowTreeHostWin::Hide() { |
NOTIMPLEMENTED(); |
} |
-void RootWindowHostWin::ToggleFullScreen() { |
+void WindowTreeHostWin::ToggleFullScreen() { |
gfx::Rect target_rect; |
if (!fullscreen_) { |
fullscreen_ = true; |
@@ -103,13 +103,13 @@ void RootWindowHostWin::ToggleFullScreen() { |
SWP_NOZORDER | SWP_NOACTIVATE | SWP_FRAMECHANGED); |
} |
-gfx::Rect RootWindowHostWin::GetBounds() const { |
+gfx::Rect WindowTreeHostWin::GetBounds() const { |
RECT r; |
GetClientRect(hwnd(), &r); |
return gfx::Rect(r); |
} |
-void RootWindowHostWin::SetBounds(const gfx::Rect& bounds) { |
+void WindowTreeHostWin::SetBounds(const gfx::Rect& bounds) { |
if (fullscreen_) { |
saved_window_rect_.right = saved_window_rect_.left + bounds.width(); |
saved_window_rect_.bottom = saved_window_rect_.top + bounds.height(); |
@@ -143,21 +143,21 @@ void RootWindowHostWin::SetBounds(const gfx::Rect& bounds) { |
NotifyHostResized(bounds.size()); |
} |
-gfx::Insets RootWindowHostWin::GetInsets() const { |
+gfx::Insets WindowTreeHostWin::GetInsets() const { |
return gfx::Insets(); |
} |
-void RootWindowHostWin::SetInsets(const gfx::Insets& insets) { |
+void WindowTreeHostWin::SetInsets(const gfx::Insets& insets) { |
} |
-gfx::Point RootWindowHostWin::GetLocationOnNativeScreen() const { |
+gfx::Point WindowTreeHostWin::GetLocationOnNativeScreen() const { |
RECT r; |
GetClientRect(hwnd(), &r); |
return gfx::Point(r.left, r.top); |
} |
-void RootWindowHostWin::SetCursor(gfx::NativeCursor native_cursor) { |
+void WindowTreeHostWin::SetCursor(gfx::NativeCursor native_cursor) { |
// Custom web cursors are handled directly. |
if (native_cursor == ui::kCursorCustom) |
return; |
@@ -167,21 +167,21 @@ void RootWindowHostWin::SetCursor(gfx::NativeCursor native_cursor) { |
::SetCursor(native_cursor.platform()); |
} |
-void RootWindowHostWin::SetCapture() { |
+void WindowTreeHostWin::SetCapture() { |
if (!has_capture_) { |
has_capture_ = true; |
::SetCapture(hwnd()); |
} |
} |
-void RootWindowHostWin::ReleaseCapture() { |
+void WindowTreeHostWin::ReleaseCapture() { |
if (has_capture_) { |
has_capture_ = false; |
::ReleaseCapture(); |
} |
} |
-bool RootWindowHostWin::QueryMouseLocation(gfx::Point* location_return) { |
+bool WindowTreeHostWin::QueryMouseLocation(gfx::Point* location_return) { |
client::CursorClient* cursor_client = |
client::GetCursorClient(GetRootWindow()->window()); |
if (cursor_client && !cursor_client->IsMouseEventsEnabled()) { |
@@ -200,44 +200,44 @@ bool RootWindowHostWin::QueryMouseLocation(gfx::Point* location_return) { |
pt.y >= 0 && static_cast<int>(pt.y) < size.height()); |
} |
-bool RootWindowHostWin::ConfineCursorToRootWindow() { |
+bool WindowTreeHostWin::ConfineCursorToRootWindow() { |
RECT window_rect; |
GetWindowRect(hwnd(), &window_rect); |
return ClipCursor(&window_rect) != 0; |
} |
-void RootWindowHostWin::UnConfineCursor() { |
+void WindowTreeHostWin::UnConfineCursor() { |
ClipCursor(NULL); |
} |
-void RootWindowHostWin::OnCursorVisibilityChanged(bool show) { |
+void WindowTreeHostWin::OnCursorVisibilityChanged(bool show) { |
NOTIMPLEMENTED(); |
} |
-void RootWindowHostWin::MoveCursorTo(const gfx::Point& location) { |
+void WindowTreeHostWin::MoveCursorTo(const gfx::Point& location) { |
// Deliberately not implemented. |
} |
-void RootWindowHostWin::PostNativeEvent(const base::NativeEvent& native_event) { |
+void WindowTreeHostWin::PostNativeEvent(const base::NativeEvent& native_event) { |
::PostMessage( |
hwnd(), native_event.message, native_event.wParam, native_event.lParam); |
} |
-void RootWindowHostWin::OnDeviceScaleFactorChanged( |
+void WindowTreeHostWin::OnDeviceScaleFactorChanged( |
float device_scale_factor) { |
NOTIMPLEMENTED(); |
} |
-void RootWindowHostWin::PrepareForShutdown() { |
+void WindowTreeHostWin::PrepareForShutdown() { |
NOTIMPLEMENTED(); |
} |
-void RootWindowHostWin::OnClose() { |
+void WindowTreeHostWin::OnClose() { |
// TODO: this obviously shouldn't be here. |
base::MessageLoopForUI::current()->Quit(); |
} |
-LRESULT RootWindowHostWin::OnKeyEvent(UINT message, |
+LRESULT WindowTreeHostWin::OnKeyEvent(UINT message, |
WPARAM w_param, |
LPARAM l_param) { |
MSG msg = { hwnd(), message, w_param, l_param }; |
@@ -246,7 +246,7 @@ LRESULT RootWindowHostWin::OnKeyEvent(UINT message, |
return 0; |
} |
-LRESULT RootWindowHostWin::OnMouseRange(UINT message, |
+LRESULT WindowTreeHostWin::OnMouseRange(UINT message, |
WPARAM w_param, |
LPARAM l_param) { |
MSG msg = { hwnd(), message, w_param, l_param, 0, |
@@ -259,7 +259,7 @@ LRESULT RootWindowHostWin::OnMouseRange(UINT message, |
return 0; |
} |
-LRESULT RootWindowHostWin::OnCaptureChanged(UINT message, |
+LRESULT WindowTreeHostWin::OnCaptureChanged(UINT message, |
WPARAM w_param, |
LPARAM l_param) { |
if (has_capture_) { |
@@ -269,7 +269,7 @@ LRESULT RootWindowHostWin::OnCaptureChanged(UINT message, |
return 0; |
} |
-LRESULT RootWindowHostWin::OnNCActivate(UINT message, |
+LRESULT WindowTreeHostWin::OnNCActivate(UINT message, |
WPARAM w_param, |
LPARAM l_param) { |
if (!!w_param) |
@@ -277,12 +277,12 @@ LRESULT RootWindowHostWin::OnNCActivate(UINT message, |
return DefWindowProc(hwnd(), message, w_param, l_param); |
} |
-void RootWindowHostWin::OnMove(const CPoint& point) { |
+void WindowTreeHostWin::OnMove(const CPoint& point) { |
if (delegate_) |
delegate_->OnHostMoved(gfx::Point(point.x, point.y)); |
} |
-void RootWindowHostWin::OnPaint(HDC dc) { |
+void WindowTreeHostWin::OnPaint(HDC dc) { |
gfx::Rect damage_rect; |
RECT update_rect = {0}; |
if (GetUpdateRect(hwnd(), &update_rect, FALSE)) |
@@ -291,7 +291,7 @@ void RootWindowHostWin::OnPaint(HDC dc) { |
ValidateRect(hwnd(), NULL); |
} |
-void RootWindowHostWin::OnSize(UINT param, const CSize& size) { |
+void WindowTreeHostWin::OnSize(UINT param, const CSize& size) { |
// Minimizing resizes the window to 0x0 which causes our layout to go all |
// screwy, so we just ignore it. |
if (delegate_ && param != SIZE_MINIMIZED) |