summaryrefslogtreecommitdiffstats
path: root/ui/aura/window_tree_host_win.cc
diff options
context:
space:
mode:
authoroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-11 08:13:45 +0000
committeroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-11 08:13:45 +0000
commitf5c9dbcb852de1cd6ce1bd293920c8c64a7ad9d9 (patch)
tree57061cf0622e2b9edee2428ac332de8967bccdea /ui/aura/window_tree_host_win.cc
parent728f28f2dfd7e22a414a8657229af008a19d7a9d (diff)
downloadchromium_src-f5c9dbcb852de1cd6ce1bd293920c8c64a7ad9d9.zip
chromium_src-f5c9dbcb852de1cd6ce1bd293920c8c64a7ad9d9.tar.gz
chromium_src-f5c9dbcb852de1cd6ce1bd293920c8c64a7ad9d9.tar.bz2
Introdcue AshWindowTreeHost and move ash/chrome specific code in WTH to ash.
Other notable changes: * Removed WindowTreeHostFactory as this is no longer necessary. * Moved RootWindowTransformer to ash/host * Removed Set/GetInsets which are no longer necessary (a code in SetInsets is now a part of SetRootWindowTransformer) * Added TransformerHelper that implements common behavior to transform root window for AshWindowTreeHost * Added DEPS files * Updated metro_viewer code to make sure it creates ash::AshRemoteWindowHostTree A few more simplifications to come: * Simplify RootWindowTransformer * Eliminate EnvObserver in AshWindowTreeHostX11 I'll also work on DEPS reorg to make it more explicit under ash/ BUG=355771 TEST=No functional change. ui/aura/window_tree_host_x11_unittests has been moved to ash/host/ash_window_tree_host_x11_unittests Review URL: https://codereview.chromium.org/201573015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@263192 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/aura/window_tree_host_win.cc')
-rw-r--r--ui/aura/window_tree_host_win.cc59
1 files changed, 1 insertions, 58 deletions
diff --git a/ui/aura/window_tree_host_win.cc b/ui/aura/window_tree_host_win.cc
index 28bd77d..5f1dc00 100644
--- a/ui/aura/window_tree_host_win.cc
+++ b/ui/aura/window_tree_host_win.cc
@@ -41,10 +41,7 @@ gfx::Size WindowTreeHost::GetNativeScreenSize() {
}
WindowTreeHostWin::WindowTreeHostWin(const gfx::Rect& bounds)
- : fullscreen_(false),
- has_capture_(false),
- saved_window_style_(0),
- saved_window_ex_style_(0) {
+ : has_capture_(false) {
if (use_popup_as_root_window_for_test)
set_window_style(WS_POPUP);
Init(NULL, bounds);
@@ -70,38 +67,6 @@ void WindowTreeHostWin::Hide() {
NOTIMPLEMENTED();
}
-void WindowTreeHostWin::ToggleFullScreen() {
- gfx::Rect target_rect;
- 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_ & ~(WS_CAPTION | WS_THICKFRAME));
- 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);
- target_rect = gfx::Rect(mi.rcMonitor);
- } else {
- fullscreen_ = false;
- 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(),
- SWP_NOZORDER | SWP_NOACTIVATE | SWP_FRAMECHANGED);
-}
-
gfx::Rect WindowTreeHostWin::GetBounds() const {
RECT r;
GetClientRect(hwnd(), &r);
@@ -109,11 +74,6 @@ gfx::Rect WindowTreeHostWin::GetBounds() const {
}
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();
- return;
- }
RECT window_rect;
window_rect.left = bounds.x();
window_rect.top = bounds.y();
@@ -141,13 +101,6 @@ void WindowTreeHostWin::SetBounds(const gfx::Rect& bounds) {
OnHostResized(bounds.size());
}
-gfx::Insets WindowTreeHostWin::GetInsets() const {
- return gfx::Insets();
-}
-
-void WindowTreeHostWin::SetInsets(const gfx::Insets& insets) {
-}
-
gfx::Point WindowTreeHostWin::GetLocationOnNativeScreen() const {
RECT r;
GetClientRect(hwnd(), &r);
@@ -187,16 +140,6 @@ bool WindowTreeHostWin::QueryMouseLocation(gfx::Point* location_return) {
pt.y >= 0 && static_cast<int>(pt.y) < size.height());
}
-bool WindowTreeHostWin::ConfineCursorToRootWindow() {
- RECT window_rect;
- GetWindowRect(hwnd(), &window_rect);
- return ClipCursor(&window_rect) != 0;
-}
-
-void WindowTreeHostWin::UnConfineCursor() {
- ClipCursor(NULL);
-}
-
void WindowTreeHostWin::SetCursorNative(gfx::NativeCursor native_cursor) {
// Custom web cursors are handled directly.
if (native_cursor == ui::kCursorCustom)