| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ui/aura/root_window_host_win.h" | 5 #include "ui/aura/root_window_host_win.h" |
| 6 | 6 |
| 7 #include <windows.h> | 7 #include <windows.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 | 10 |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 } | 146 } |
| 147 | 147 |
| 148 gfx::AcceleratedWidget RootWindowHostWin::GetAcceleratedWidget() { | 148 gfx::AcceleratedWidget RootWindowHostWin::GetAcceleratedWidget() { |
| 149 return hwnd(); | 149 return hwnd(); |
| 150 } | 150 } |
| 151 | 151 |
| 152 void RootWindowHostWin::Show() { | 152 void RootWindowHostWin::Show() { |
| 153 ShowWindow(hwnd(), SW_SHOWNORMAL); | 153 ShowWindow(hwnd(), SW_SHOWNORMAL); |
| 154 } | 154 } |
| 155 | 155 |
| 156 void RootWindowHostWin::Hide() { |
| 157 NOTIMPLEMENTED(); |
| 158 } |
| 159 |
| 156 void RootWindowHostWin::ToggleFullScreen() { | 160 void RootWindowHostWin::ToggleFullScreen() { |
| 157 gfx::Rect target_rect; | 161 gfx::Rect target_rect; |
| 158 if (!fullscreen_) { | 162 if (!fullscreen_) { |
| 159 fullscreen_ = true; | 163 fullscreen_ = true; |
| 160 saved_window_style_ = GetWindowLong(hwnd(), GWL_STYLE); | 164 saved_window_style_ = GetWindowLong(hwnd(), GWL_STYLE); |
| 161 saved_window_ex_style_ = GetWindowLong(hwnd(), GWL_EXSTYLE); | 165 saved_window_ex_style_ = GetWindowLong(hwnd(), GWL_EXSTYLE); |
| 162 GetWindowRect(hwnd(), &saved_window_rect_); | 166 GetWindowRect(hwnd(), &saved_window_rect_); |
| 163 SetWindowLong(hwnd(), GWL_STYLE, | 167 SetWindowLong(hwnd(), GWL_STYLE, |
| 164 saved_window_style_ & ~(WS_CAPTION | WS_THICKFRAME)); | 168 saved_window_style_ & ~(WS_CAPTION | WS_THICKFRAME)); |
| 165 SetWindowLong(hwnd(), GWL_EXSTYLE, | 169 SetWindowLong(hwnd(), GWL_EXSTYLE, |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 343 } | 347 } |
| 344 | 348 |
| 345 void RootWindowHostWin::OnSize(UINT param, const CSize& size) { | 349 void RootWindowHostWin::OnSize(UINT param, const CSize& size) { |
| 346 // Minimizing resizes the window to 0x0 which causes our layout to go all | 350 // Minimizing resizes the window to 0x0 which causes our layout to go all |
| 347 // screwy, so we just ignore it. | 351 // screwy, so we just ignore it. |
| 348 if (param != SIZE_MINIMIZED) | 352 if (param != SIZE_MINIMIZED) |
| 349 delegate_->OnHostResized(gfx::Size(size.cx, size.cy)); | 353 delegate_->OnHostResized(gfx::Size(size.cx, size.cy)); |
| 350 } | 354 } |
| 351 | 355 |
| 352 } // namespace aura | 356 } // namespace aura |
| OLD | NEW |