| 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/views/widget/desktop_aura/desktop_root_window_host_win.h" | 5 #include "ui/views/widget/desktop_aura/desktop_root_window_host_win.h" |
| 6 | 6 |
| 7 #include "base/win/metro.h" | 7 #include "base/win/metro.h" |
| 8 #include "third_party/skia/include/core/SkPath.h" | 8 #include "third_party/skia/include/core/SkPath.h" |
| 9 #include "third_party/skia/include/core/SkRegion.h" | 9 #include "third_party/skia/include/core/SkRegion.h" |
| 10 #include "ui/aura/client/aura_constants.h" | 10 #include "ui/aura/client/aura_constants.h" |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 void DesktopRootWindowHostWin::SetSize(const gfx::Size& size) { | 219 void DesktopRootWindowHostWin::SetSize(const gfx::Size& size) { |
| 220 gfx::Size size_in_pixels = gfx::win::DIPToScreenSize(size); | 220 gfx::Size size_in_pixels = gfx::win::DIPToScreenSize(size); |
| 221 gfx::Size expanded = GetExpandedWindowSize( | 221 gfx::Size expanded = GetExpandedWindowSize( |
| 222 message_handler_->window_ex_style(), size_in_pixels); | 222 message_handler_->window_ex_style(), size_in_pixels); |
| 223 window_enlargement_ = | 223 window_enlargement_ = |
| 224 gfx::Vector2d(expanded.width() - size_in_pixels.width(), | 224 gfx::Vector2d(expanded.width() - size_in_pixels.width(), |
| 225 expanded.height() - size_in_pixels.height()); | 225 expanded.height() - size_in_pixels.height()); |
| 226 message_handler_->SetSize(expanded); | 226 message_handler_->SetSize(expanded); |
| 227 } | 227 } |
| 228 | 228 |
| 229 void DesktopRootWindowHostWin::StackAtTop() { |
| 230 message_handler_->StackAtTop(); |
| 231 } |
| 232 |
| 229 void DesktopRootWindowHostWin::CenterWindow(const gfx::Size& size) { | 233 void DesktopRootWindowHostWin::CenterWindow(const gfx::Size& size) { |
| 230 gfx::Size size_in_pixels = gfx::win::DIPToScreenSize(size); | 234 gfx::Size size_in_pixels = gfx::win::DIPToScreenSize(size); |
| 231 message_handler_->CenterWindow(size_in_pixels); | 235 message_handler_->CenterWindow(size_in_pixels); |
| 232 } | 236 } |
| 233 | 237 |
| 234 void DesktopRootWindowHostWin::GetWindowPlacement( | 238 void DesktopRootWindowHostWin::GetWindowPlacement( |
| 235 gfx::Rect* bounds, | 239 gfx::Rect* bounds, |
| 236 ui::WindowShowState* show_state) const { | 240 ui::WindowShowState* show_state) const { |
| 237 message_handler_->GetWindowPlacement(bounds, show_state); | 241 message_handler_->GetWindowPlacement(bounds, show_state); |
| 238 InsetBottomRight(bounds, window_enlargement_); | 242 InsetBottomRight(bounds, window_enlargement_); |
| (...skipping 715 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 954 | 958 |
| 955 // static | 959 // static |
| 956 DesktopRootWindowHost* DesktopRootWindowHost::Create( | 960 DesktopRootWindowHost* DesktopRootWindowHost::Create( |
| 957 internal::NativeWidgetDelegate* native_widget_delegate, | 961 internal::NativeWidgetDelegate* native_widget_delegate, |
| 958 DesktopNativeWidgetAura* desktop_native_widget_aura) { | 962 DesktopNativeWidgetAura* desktop_native_widget_aura) { |
| 959 return new DesktopRootWindowHostWin(native_widget_delegate, | 963 return new DesktopRootWindowHostWin(native_widget_delegate, |
| 960 desktop_native_widget_aura); | 964 desktop_native_widget_aura); |
| 961 } | 965 } |
| 962 | 966 |
| 963 } // namespace views | 967 } // namespace views |
| OLD | NEW |