| 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_native_widget_aura.h" | 5 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
| 10 #include "base/trace_event/trace_event.h" | 10 #include "base/trace_event/trace_event.h" |
| (...skipping 967 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 978 } | 978 } |
| 979 | 979 |
| 980 int DesktopNativeWidgetAura::GetNonClientComponent( | 980 int DesktopNativeWidgetAura::GetNonClientComponent( |
| 981 const gfx::Point& point) const { | 981 const gfx::Point& point) const { |
| 982 return native_widget_delegate_->GetNonClientComponent(point); | 982 return native_widget_delegate_->GetNonClientComponent(point); |
| 983 } | 983 } |
| 984 | 984 |
| 985 bool DesktopNativeWidgetAura::ShouldDescendIntoChildForEventHandling( | 985 bool DesktopNativeWidgetAura::ShouldDescendIntoChildForEventHandling( |
| 986 aura::Window* child, | 986 aura::Window* child, |
| 987 const gfx::Point& location) { | 987 const gfx::Point& location) { |
| 988 views::WidgetDelegate* widget_delegate = GetWidget()->widget_delegate(); | 988 return native_widget_delegate_->ShouldDescendIntoChildForEventHandling( |
| 989 return !widget_delegate || | 989 content_window_->layer(), child, child->layer(), location); |
| 990 widget_delegate->ShouldDescendIntoChildForEventHandling(child, location); | |
| 991 } | 990 } |
| 992 | 991 |
| 993 bool DesktopNativeWidgetAura::CanFocus() { | 992 bool DesktopNativeWidgetAura::CanFocus() { |
| 994 return true; | 993 return true; |
| 995 } | 994 } |
| 996 | 995 |
| 997 void DesktopNativeWidgetAura::OnCaptureLost() { | 996 void DesktopNativeWidgetAura::OnCaptureLost() { |
| 998 native_widget_delegate_->OnMouseCaptureLost(); | 997 native_widget_delegate_->OnMouseCaptureLost(); |
| 999 } | 998 } |
| 1000 | 999 |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1208 if (cursor_reference_count_ == 0) { | 1207 if (cursor_reference_count_ == 0) { |
| 1209 // We are the last DesktopNativeWidgetAura instance, and we are responsible | 1208 // We are the last DesktopNativeWidgetAura instance, and we are responsible |
| 1210 // for cleaning up |cursor_manager_|. | 1209 // for cleaning up |cursor_manager_|. |
| 1211 delete cursor_manager_; | 1210 delete cursor_manager_; |
| 1212 native_cursor_manager_ = NULL; | 1211 native_cursor_manager_ = NULL; |
| 1213 cursor_manager_ = NULL; | 1212 cursor_manager_ = NULL; |
| 1214 } | 1213 } |
| 1215 } | 1214 } |
| 1216 | 1215 |
| 1217 } // namespace views | 1216 } // namespace views |
| OLD | NEW |