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); |
sky
2014/05/27 17:33:06
You want the logic to be that even if SetBounds()
mohsen
2014/05/27 18:24:29
Yep. Done.
| |
490 | 490 |
491 // The client area size may have changed even though the window bounds have | 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. | 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()) | 493 if (old_hwnd_size == new_expanded.size() && old_content_size != bounds.size()) |
494 HandleClientSizeChanged(new_expanded.size()); | 494 message_handler_->ForceWindowResized(); |
495 } | 495 } |
496 | 496 |
497 gfx::Point DesktopWindowTreeHostWin::GetLocationOnNativeScreen() const { | 497 gfx::Point DesktopWindowTreeHostWin::GetLocationOnNativeScreen() const { |
498 return GetBounds().origin(); | 498 return GetBounds().origin(); |
499 } | 499 } |
500 | 500 |
501 void DesktopWindowTreeHostWin::SetCapture() { | 501 void DesktopWindowTreeHostWin::SetCapture() { |
502 message_handler_->SetCapture(); | 502 message_handler_->SetCapture(); |
503 } | 503 } |
504 | 504 |
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
952 | 952 |
953 // static | 953 // static |
954 DesktopWindowTreeHost* DesktopWindowTreeHost::Create( | 954 DesktopWindowTreeHost* DesktopWindowTreeHost::Create( |
955 internal::NativeWidgetDelegate* native_widget_delegate, | 955 internal::NativeWidgetDelegate* native_widget_delegate, |
956 DesktopNativeWidgetAura* desktop_native_widget_aura) { | 956 DesktopNativeWidgetAura* desktop_native_widget_aura) { |
957 return new DesktopWindowTreeHostWin(native_widget_delegate, | 957 return new DesktopWindowTreeHostWin(native_widget_delegate, |
958 desktop_native_widget_aura); | 958 desktop_native_widget_aura); |
959 } | 959 } |
960 | 960 |
961 } // namespace views | 961 } // namespace views |
OLD | NEW |