| 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 944 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 955 } | 955 } |
| 956 | 956 |
| 957 void DesktopNativeWidgetAura::RepostNativeEvent(gfx::NativeEvent native_event) { | 957 void DesktopNativeWidgetAura::RepostNativeEvent(gfx::NativeEvent native_event) { |
| 958 OnEvent(native_event); | 958 OnEvent(native_event); |
| 959 } | 959 } |
| 960 | 960 |
| 961 std::string DesktopNativeWidgetAura::GetName() const { | 961 std::string DesktopNativeWidgetAura::GetName() const { |
| 962 return name_; | 962 return name_; |
| 963 } | 963 } |
| 964 | 964 |
| 965 Widget::Widgets DesktopNativeWidgetAura::GetAllOwnedTopLevelWidgets() const { |
| 966 Widget::Widgets owned; |
| 967 for (DesktopWindowTreeHost* owned_host : |
| 968 desktop_window_tree_host_->GetOwnedTopLevelHosts()) { |
| 969 DesktopNativeWidgetAura* child = |
| 970 ForWindow(owned_host->AsWindowTreeHost()->window()); |
| 971 DCHECK(child); |
| 972 owned.insert(child->GetWidget()); |
| 973 } |
| 974 return owned; |
| 975 } |
| 976 |
| 965 //////////////////////////////////////////////////////////////////////////////// | 977 //////////////////////////////////////////////////////////////////////////////// |
| 966 // DesktopNativeWidgetAura, aura::WindowDelegate implementation: | 978 // DesktopNativeWidgetAura, aura::WindowDelegate implementation: |
| 967 | 979 |
| 968 gfx::Size DesktopNativeWidgetAura::GetMinimumSize() const { | 980 gfx::Size DesktopNativeWidgetAura::GetMinimumSize() const { |
| 969 return native_widget_delegate_->GetMinimumSize(); | 981 return native_widget_delegate_->GetMinimumSize(); |
| 970 } | 982 } |
| 971 | 983 |
| 972 gfx::Size DesktopNativeWidgetAura::GetMaximumSize() const { | 984 gfx::Size DesktopNativeWidgetAura::GetMaximumSize() const { |
| 973 return native_widget_delegate_->GetMaximumSize(); | 985 return native_widget_delegate_->GetMaximumSize(); |
| 974 } | 986 } |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1208 if (cursor_reference_count_ == 0) { | 1220 if (cursor_reference_count_ == 0) { |
| 1209 // We are the last DesktopNativeWidgetAura instance, and we are responsible | 1221 // We are the last DesktopNativeWidgetAura instance, and we are responsible |
| 1210 // for cleaning up |cursor_manager_|. | 1222 // for cleaning up |cursor_manager_|. |
| 1211 delete cursor_manager_; | 1223 delete cursor_manager_; |
| 1212 native_cursor_manager_ = NULL; | 1224 native_cursor_manager_ = NULL; |
| 1213 cursor_manager_ = NULL; | 1225 cursor_manager_ = NULL; |
| 1214 } | 1226 } |
| 1215 } | 1227 } |
| 1216 | 1228 |
| 1217 } // namespace views | 1229 } // namespace views |
| OLD | NEW |