| 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_client.h" | 10 #include "ui/aura/client/activation_client.h" |
| (...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 629 // NativeWidgetAura, aura::WindowDelegate implementation: | 629 // NativeWidgetAura, aura::WindowDelegate implementation: |
| 630 | 630 |
| 631 gfx::Size NativeWidgetAura::GetMinimumSize() const { | 631 gfx::Size NativeWidgetAura::GetMinimumSize() const { |
| 632 return delegate_->GetMinimumSize(); | 632 return delegate_->GetMinimumSize(); |
| 633 } | 633 } |
| 634 | 634 |
| 635 gfx::Size NativeWidgetAura::GetMaximumSize() const { | 635 gfx::Size NativeWidgetAura::GetMaximumSize() const { |
| 636 return delegate_->GetMaximumSize(); | 636 return delegate_->GetMaximumSize(); |
| 637 } | 637 } |
| 638 | 638 |
| 639 void NativeWidgetAura::SetHostTransitionBounds(const gfx::Rect& bounds) { |
| 640 } |
| 641 |
| 639 void NativeWidgetAura::OnBoundsChanged(const gfx::Rect& old_bounds, | 642 void NativeWidgetAura::OnBoundsChanged(const gfx::Rect& old_bounds, |
| 640 const gfx::Rect& new_bounds) { | 643 const gfx::Rect& new_bounds) { |
| 641 if (old_bounds.origin() != new_bounds.origin()) | 644 if (old_bounds.origin() != new_bounds.origin()) |
| 642 delegate_->OnNativeWidgetMove(); | 645 delegate_->OnNativeWidgetMove(); |
| 643 if (old_bounds.size() != new_bounds.size()) | 646 if (old_bounds.size() != new_bounds.size()) |
| 644 delegate_->OnNativeWidgetSizeChanged(new_bounds.size()); | 647 delegate_->OnNativeWidgetSizeChanged(new_bounds.size()); |
| 645 } | 648 } |
| 646 | 649 |
| 647 gfx::NativeCursor NativeWidgetAura::GetCursor(const gfx::Point& point) { | 650 gfx::NativeCursor NativeWidgetAura::GetCursor(const gfx::Point& point) { |
| 648 return cursor_; | 651 return cursor_; |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 710 tooltip_manager_.reset(); | 713 tooltip_manager_.reset(); |
| 711 } | 714 } |
| 712 | 715 |
| 713 void NativeWidgetAura::OnWindowDestroyed() { | 716 void NativeWidgetAura::OnWindowDestroyed() { |
| 714 window_ = NULL; | 717 window_ = NULL; |
| 715 delegate_->OnNativeWidgetDestroyed(); | 718 delegate_->OnNativeWidgetDestroyed(); |
| 716 if (ownership_ == Widget::InitParams::NATIVE_WIDGET_OWNS_WIDGET) | 719 if (ownership_ == Widget::InitParams::NATIVE_WIDGET_OWNS_WIDGET) |
| 717 delete this; | 720 delete this; |
| 718 } | 721 } |
| 719 | 722 |
| 723 void NativeWidgetAura::OnWindowHidingAnimationCompleted() { |
| 724 } |
| 725 |
| 720 void NativeWidgetAura::OnWindowTargetVisibilityChanged(bool visible) { | 726 void NativeWidgetAura::OnWindowTargetVisibilityChanged(bool visible) { |
| 721 delegate_->OnNativeWidgetVisibilityChanged(visible); | 727 delegate_->OnNativeWidgetVisibilityChanged(visible); |
| 722 } | 728 } |
| 723 | 729 |
| 724 bool NativeWidgetAura::HasHitTestMask() const { | 730 bool NativeWidgetAura::HasHitTestMask() const { |
| 725 return delegate_->HasHitTestMask(); | 731 return delegate_->HasHitTestMask(); |
| 726 } | 732 } |
| 727 | 733 |
| 728 void NativeWidgetAura::GetHitTestMask(gfx::Path* mask) const { | 734 void NativeWidgetAura::GetHitTestMask(gfx::Path* mask) const { |
| 729 DCHECK(mask); | 735 DCHECK(mask); |
| (...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1030 return aura::Env::GetInstance()->is_mouse_button_down(); | 1036 return aura::Env::GetInstance()->is_mouse_button_down(); |
| 1031 } | 1037 } |
| 1032 | 1038 |
| 1033 // static | 1039 // static |
| 1034 bool NativeWidgetPrivate::IsTouchDown() { | 1040 bool NativeWidgetPrivate::IsTouchDown() { |
| 1035 return aura::Env::GetInstance()->is_touch_down(); | 1041 return aura::Env::GetInstance()->is_touch_down(); |
| 1036 } | 1042 } |
| 1037 | 1043 |
| 1038 } // namespace internal | 1044 } // namespace internal |
| 1039 } // namespace views | 1045 } // namespace views |
| OLD | NEW |