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 743 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
754 return cursor_; | 754 return cursor_; |
755 } | 755 } |
756 | 756 |
757 int NativeWidgetAura::GetNonClientComponent(const gfx::Point& point) const { | 757 int NativeWidgetAura::GetNonClientComponent(const gfx::Point& point) const { |
758 return delegate_->GetNonClientComponent(point); | 758 return delegate_->GetNonClientComponent(point); |
759 } | 759 } |
760 | 760 |
761 bool NativeWidgetAura::ShouldDescendIntoChildForEventHandling( | 761 bool NativeWidgetAura::ShouldDescendIntoChildForEventHandling( |
762 aura::Window* child, | 762 aura::Window* child, |
763 const gfx::Point& location) { | 763 const gfx::Point& location) { |
| 764 views::WidgetDelegate* widget_delegate = GetWidget()->widget_delegate(); |
| 765 if (widget_delegate && |
| 766 !widget_delegate->ShouldDescendIntoChildForEventHandling(child, location)) |
| 767 return false; |
| 768 |
764 // Don't descend into |child| if there is a view with a Layer that contains | 769 // Don't descend into |child| if there is a view with a Layer that contains |
765 // the point and is stacked above |child|s layer. | 770 // the point and is stacked above |child|s layer. |
766 typedef std::vector<ui::Layer*> Layers; | 771 typedef std::vector<ui::Layer*> Layers; |
767 const Layers& root_layers(delegate_->GetRootLayers()); | 772 const Layers& root_layers(delegate_->GetRootLayers()); |
768 if (root_layers.empty()) | 773 if (root_layers.empty()) |
769 return true; | 774 return true; |
770 | 775 |
771 Layers::const_iterator child_layer_iter( | 776 Layers::const_iterator child_layer_iter( |
772 std::find(window_->layer()->children().begin(), | 777 std::find(window_->layer()->children().begin(), |
773 window_->layer()->children().end(), child->layer())); | 778 window_->layer()->children().end(), child->layer())); |
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1043 return aura::Env::GetInstance()->is_mouse_button_down(); | 1048 return aura::Env::GetInstance()->is_mouse_button_down(); |
1044 } | 1049 } |
1045 | 1050 |
1046 // static | 1051 // static |
1047 bool NativeWidgetPrivate::IsTouchDown() { | 1052 bool NativeWidgetPrivate::IsTouchDown() { |
1048 return aura::Env::GetInstance()->is_touch_down(); | 1053 return aura::Env::GetInstance()->is_touch_down(); |
1049 } | 1054 } |
1050 | 1055 |
1051 } // namespace internal | 1056 } // namespace internal |
1052 } // namespace views | 1057 } // namespace views |
OLD | NEW |