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_window_tree_host_win.h" | 5 #include "ui/views/widget/desktop_aura/desktop_window_tree_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 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
479 bounds.width() + window_expansion_bottom_right_delta_.x(), | 479 bounds.width() + window_expansion_bottom_right_delta_.x(), |
480 bounds.height() + window_expansion_bottom_right_delta_.y()); | 480 bounds.height() + window_expansion_bottom_right_delta_.y()); |
481 | 481 |
482 gfx::Rect new_expanded( | 482 gfx::Rect new_expanded( |
483 expanded.origin(), | 483 expanded.origin(), |
484 GetExpandedWindowSize(message_handler_->window_ex_style(), | 484 GetExpandedWindowSize(message_handler_->window_ex_style(), |
485 expanded.size())); | 485 expanded.size())); |
486 window_enlargement_ = | 486 window_enlargement_ = |
487 gfx::Vector2d(new_expanded.width() - expanded.width(), | 487 gfx::Vector2d(new_expanded.width() - expanded.width(), |
488 new_expanded.height() - expanded.height()); | 488 new_expanded.height() - expanded.height()); |
489 message_handler_->SetBounds(new_expanded); | 489 message_handler_->SetBounds(new_expanded, old_content_size != bounds.size()); |
490 | |
491 // The client area size may have changed even though the window bounds have | |
492 // not, if the window bounds were expanded to 64 pixels both times. | |
493 if (old_hwnd_size == new_expanded.size() && old_content_size != bounds.size()) | |
494 HandleClientSizeChanged(new_expanded.size()); | |
495 } | 490 } |
496 | 491 |
497 gfx::Point DesktopWindowTreeHostWin::GetLocationOnNativeScreen() const { | 492 gfx::Point DesktopWindowTreeHostWin::GetLocationOnNativeScreen() const { |
498 return GetBounds().origin(); | 493 return GetBounds().origin(); |
499 } | 494 } |
500 | 495 |
501 void DesktopWindowTreeHostWin::SetCapture() { | 496 void DesktopWindowTreeHostWin::SetCapture() { |
502 message_handler_->SetCapture(); | 497 message_handler_->SetCapture(); |
503 } | 498 } |
504 | 499 |
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
952 | 947 |
953 // static | 948 // static |
954 DesktopWindowTreeHost* DesktopWindowTreeHost::Create( | 949 DesktopWindowTreeHost* DesktopWindowTreeHost::Create( |
955 internal::NativeWidgetDelegate* native_widget_delegate, | 950 internal::NativeWidgetDelegate* native_widget_delegate, |
956 DesktopNativeWidgetAura* desktop_native_widget_aura) { | 951 DesktopNativeWidgetAura* desktop_native_widget_aura) { |
957 return new DesktopWindowTreeHostWin(native_widget_delegate, | 952 return new DesktopWindowTreeHostWin(native_widget_delegate, |
958 desktop_native_widget_aura); | 953 desktop_native_widget_aura); |
959 } | 954 } |
960 | 955 |
961 } // namespace views | 956 } // namespace views |
OLD | NEW |