| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "ash/host/ash_window_tree_host_win.h" | 5 #include "ash/host/ash_window_tree_host_win.h" |
| 6 | 6 |
| 7 #include "base/win/windows_version.h" | 7 #include "base/win/windows_version.h" |
| 8 | 8 |
| 9 namespace ash { | 9 namespace ash { |
| 10 | 10 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 fullscreen_ = false; | 39 fullscreen_ = false; |
| 40 SetWindowLong(hwnd, GWL_STYLE, saved_window_style_); | 40 SetWindowLong(hwnd, GWL_STYLE, saved_window_style_); |
| 41 SetWindowLong(hwnd, GWL_EXSTYLE, saved_window_ex_style_); | 41 SetWindowLong(hwnd, GWL_EXSTYLE, saved_window_ex_style_); |
| 42 target_rect = gfx::Rect(saved_window_rect_); | 42 target_rect = gfx::Rect(saved_window_rect_); |
| 43 } | 43 } |
| 44 SetWindowPos(hwnd, NULL, target_rect.x(), target_rect.y(), | 44 SetWindowPos(hwnd, NULL, target_rect.x(), target_rect.y(), |
| 45 target_rect.width(), target_rect.height(), | 45 target_rect.width(), target_rect.height(), |
| 46 SWP_NOZORDER | SWP_NOACTIVATE | SWP_FRAMECHANGED); | 46 SWP_NOZORDER | SWP_NOACTIVATE | SWP_FRAMECHANGED); |
| 47 } | 47 } |
| 48 | 48 |
| 49 void AshWindowTreeHostWin::SetBounds(const gfx::Rect& bounds) { | 49 void AshWindowTreeHostWin::SetBoundsInPixels(const gfx::Rect& bounds) { |
| 50 if (fullscreen_) { | 50 if (fullscreen_) { |
| 51 saved_window_rect_.right = saved_window_rect_.left + bounds.width(); | 51 saved_window_rect_.right = saved_window_rect_.left + bounds.width(); |
| 52 saved_window_rect_.bottom = saved_window_rect_.top + bounds.height(); | 52 saved_window_rect_.bottom = saved_window_rect_.top + bounds.height(); |
| 53 return; | 53 return; |
| 54 } | 54 } |
| 55 AshWindowTreeHostPlatform::SetBounds(bounds); | 55 AshWindowTreeHostPlatform::SetBoundsInPixels(bounds); |
| 56 } | 56 } |
| 57 | 57 |
| 58 } // namespace ash | 58 } // namespace ash |
| OLD | NEW |