Index: ash/host/ash_window_tree_host_win.cc |
diff --git a/ash/host/ash_window_tree_host_win.cc b/ash/host/ash_window_tree_host_win.cc |
index e69769ca6a55fe8e3f789ad0bfb5c5252ccd98e4..287fc56bc64b320c3b2bc06ac74ef168bd09ab82 100644 |
--- a/ash/host/ash_window_tree_host_win.cc |
+++ b/ash/host/ash_window_tree_host_win.cc |
@@ -13,7 +13,7 @@ |
#include "ash/ime/input_method_event_handler.h" |
#include "base/command_line.h" |
#include "base/win/windows_version.h" |
-#include "ui/aura/window_tree_host_win.h" |
+#include "ui/aura/window_tree_host_platform.h" |
#include "ui/events/event_processor.h" |
#include "ui/gfx/geometry/insets.h" |
#include "ui/gfx/transform.h" |
@@ -22,10 +22,10 @@ namespace ash { |
namespace { |
class AshWindowTreeHostWin : public AshWindowTreeHost, |
- public aura::WindowTreeHostWin { |
+ public aura::WindowTreeHostPlatform { |
public: |
explicit AshWindowTreeHostWin(const gfx::Rect& initial_bounds) |
- : aura::WindowTreeHostWin(initial_bounds), |
+ : aura::WindowTreeHostPlatform(initial_bounds), |
fullscreen_(false), |
saved_window_style_(0), |
saved_window_ex_style_(0), |
@@ -38,36 +38,31 @@ class AshWindowTreeHostWin : public AshWindowTreeHost, |
// AshWindowTreeHost: |
void ToggleFullScreen() override { |
gfx::Rect target_rect; |
+ gfx::AcceleratedWidget hwnd = GetAcceleratedWidget(); |
if (!fullscreen_) { |
fullscreen_ = true; |
- saved_window_style_ = GetWindowLong(hwnd(), GWL_STYLE); |
- saved_window_ex_style_ = GetWindowLong(hwnd(), GWL_EXSTYLE); |
- GetWindowRect(hwnd(), &saved_window_rect_); |
- SetWindowLong(hwnd(), |
- GWL_STYLE, |
+ saved_window_style_ = GetWindowLong(hwnd, GWL_STYLE); |
+ saved_window_ex_style_ = GetWindowLong(hwnd, GWL_EXSTYLE); |
+ GetWindowRect(hwnd, &saved_window_rect_); |
+ SetWindowLong(hwnd, GWL_STYLE, |
saved_window_style_ & ~(WS_CAPTION | WS_THICKFRAME)); |
- SetWindowLong( |
- hwnd(), |
- GWL_EXSTYLE, |
- saved_window_ex_style_ & ~(WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE | |
- WS_EX_CLIENTEDGE | WS_EX_STATICEDGE)); |
+ SetWindowLong(hwnd, GWL_EXSTYLE, |
+ saved_window_ex_style_ & |
+ ~(WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE | |
+ WS_EX_CLIENTEDGE | WS_EX_STATICEDGE)); |
MONITORINFO mi; |
mi.cbSize = sizeof(mi); |
- GetMonitorInfo(MonitorFromWindow(hwnd(), MONITOR_DEFAULTTONEAREST), &mi); |
+ GetMonitorInfo(MonitorFromWindow(hwnd, MONITOR_DEFAULTTONEAREST), &mi); |
target_rect = gfx::Rect(mi.rcMonitor); |
} else { |
fullscreen_ = false; |
- SetWindowLong(hwnd(), GWL_STYLE, saved_window_style_); |
- SetWindowLong(hwnd(), GWL_EXSTYLE, saved_window_ex_style_); |
+ SetWindowLong(hwnd, GWL_STYLE, saved_window_style_); |
+ SetWindowLong(hwnd, GWL_EXSTYLE, saved_window_ex_style_); |
target_rect = gfx::Rect(saved_window_rect_); |
} |
- SetWindowPos(hwnd(), |
- NULL, |
- target_rect.x(), |
- target_rect.y(), |
- target_rect.width(), |
- target_rect.height(), |
+ SetWindowPos(hwnd, NULL, target_rect.x(), target_rect.y(), |
+ target_rect.width(), target_rect.height(), |
SWP_NOZORDER | SWP_NOACTIVATE | SWP_FRAMECHANGED); |
} |
bool ConfineCursorToRootWindow() override { return false; } |
@@ -81,14 +76,14 @@ class AshWindowTreeHostWin : public AshWindowTreeHost, |
} |
aura::WindowTreeHost* AsWindowTreeHost() override { return this; } |
- // WindowTreeHostWin: |
+ // WindowTreeHost: |
void SetBounds(const gfx::Rect& bounds) override { |
if (fullscreen_) { |
saved_window_rect_.right = saved_window_rect_.left + bounds.width(); |
saved_window_rect_.bottom = saved_window_rect_.top + bounds.height(); |
return; |
} |
- WindowTreeHostWin::SetBounds(bounds); |
+ aura::WindowTreeHostPlatform::SetBounds(bounds); |
} |
void SetRootTransform(const gfx::Transform& transform) override { |
transformer_helper_.SetTransform(transform); |