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/native_widget_aura.h" | 5 #include "ui/views/widget/native_widget_aura.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
9 #include "third_party/skia/include/core/SkRegion.h" | 9 #include "third_party/skia/include/core/SkRegion.h" |
10 #include "ui/aura/client/activation_change_observer.h" | 10 #include "ui/aura/client/activation_change_observer.h" |
(...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
641 focus_manager->OnKeyEvent(key); | 641 focus_manager->OnKeyEvent(key); |
642 } | 642 } |
643 | 643 |
644 //////////////////////////////////////////////////////////////////////////////// | 644 //////////////////////////////////////////////////////////////////////////////// |
645 // NativeWidgetAura, aura::WindowDelegate implementation: | 645 // NativeWidgetAura, aura::WindowDelegate implementation: |
646 | 646 |
647 gfx::Size NativeWidgetAura::GetMinimumSize() const { | 647 gfx::Size NativeWidgetAura::GetMinimumSize() const { |
648 return delegate_->GetMinimumSize(); | 648 return delegate_->GetMinimumSize(); |
649 } | 649 } |
650 | 650 |
| 651 gfx::Size NativeWidgetAura::GetMaximumSize() const { |
| 652 return delegate_->GetMaximumSize(); |
| 653 } |
| 654 |
651 void NativeWidgetAura::OnBoundsChanged(const gfx::Rect& old_bounds, | 655 void NativeWidgetAura::OnBoundsChanged(const gfx::Rect& old_bounds, |
652 const gfx::Rect& new_bounds) { | 656 const gfx::Rect& new_bounds) { |
653 if (old_bounds.origin() != new_bounds.origin()) | 657 if (old_bounds.origin() != new_bounds.origin()) |
654 delegate_->OnNativeWidgetMove(); | 658 delegate_->OnNativeWidgetMove(); |
655 if (old_bounds.size() != new_bounds.size()) | 659 if (old_bounds.size() != new_bounds.size()) |
656 delegate_->OnNativeWidgetSizeChanged(new_bounds.size()); | 660 delegate_->OnNativeWidgetSizeChanged(new_bounds.size()); |
657 } | 661 } |
658 | 662 |
659 void NativeWidgetAura::OnFocus(aura::Window* old_focused_window) { | 663 void NativeWidgetAura::OnFocus(aura::Window* old_focused_window) { |
660 // In aura, it is possible for child native widgets to take input and focus, | 664 // In aura, it is possible for child native widgets to take input and focus, |
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1036 return aura::Env::GetInstance()->is_mouse_button_down(); | 1040 return aura::Env::GetInstance()->is_mouse_button_down(); |
1037 } | 1041 } |
1038 | 1042 |
1039 // static | 1043 // static |
1040 bool NativeWidgetPrivate::IsTouchDown() { | 1044 bool NativeWidgetPrivate::IsTouchDown() { |
1041 return aura::Env::GetInstance()->is_touch_down(); | 1045 return aura::Env::GetInstance()->is_touch_down(); |
1042 } | 1046 } |
1043 | 1047 |
1044 } // namespace internal | 1048 } // namespace internal |
1045 } // namespace views | 1049 } // namespace views |
OLD | NEW |