Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(562)

Unified Diff: ui/aura/window_tree_host_win.cc

Issue 201573015: Introdcue AshWindowTreeHost and move ash/chrome specific code in WTH to ash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/aura/window_tree_host_win.cc
diff --git a/ui/aura/window_tree_host_win.cc b/ui/aura/window_tree_host_win.cc
index 28bd77d6f06531e4658105858d145e7d4376aee9..5f1dc00a69127f2bdfd40dd0f30dd649a9d4b3eb 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)

Powered by Google App Engine
This is Rietveld 408576698