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" |
11 #include "build/build_config.h" | 11 #include "build/build_config.h" |
12 #include "services/ui/public/interfaces/window_manager_constants.mojom.h" | 12 #include "services/ui/public/interfaces/window_manager_constants.mojom.h" |
13 #include "ui/aura/client/aura_constants.h" | 13 #include "ui/aura/client/aura_constants.h" |
14 #include "ui/aura/client/cursor_client.h" | 14 #include "ui/aura/client/cursor_client.h" |
15 #include "ui/aura/client/drag_drop_client.h" | 15 #include "ui/aura/client/drag_drop_client.h" |
16 #include "ui/aura/client/focus_client.h" | 16 #include "ui/aura/client/focus_client.h" |
17 #include "ui/aura/client/window_parenting_client.h" | 17 #include "ui/aura/client/window_parenting_client.h" |
18 #include "ui/aura/window.h" | 18 #include "ui/aura/window.h" |
19 #include "ui/aura/window_observer.h" | 19 #include "ui/aura/window_observer.h" |
20 #include "ui/aura/window_property.h" | |
21 #include "ui/aura/window_tree_host.h" | 20 #include "ui/aura/window_tree_host.h" |
| 21 #include "ui/base/class_property.h" |
22 #include "ui/base/hit_test.h" | 22 #include "ui/base/hit_test.h" |
23 #include "ui/base/ime/input_method.h" | 23 #include "ui/base/ime/input_method.h" |
24 #include "ui/compositor/layer.h" | 24 #include "ui/compositor/layer.h" |
25 #include "ui/display/screen.h" | 25 #include "ui/display/screen.h" |
26 #include "ui/gfx/canvas.h" | 26 #include "ui/gfx/canvas.h" |
27 #include "ui/gfx/geometry/point_conversions.h" | 27 #include "ui/gfx/geometry/point_conversions.h" |
28 #include "ui/gfx/geometry/rect.h" | 28 #include "ui/gfx/geometry/rect.h" |
29 #include "ui/gfx/geometry/size_conversions.h" | 29 #include "ui/gfx/geometry/size_conversions.h" |
30 #include "ui/views/corewm/tooltip.h" | 30 #include "ui/views/corewm/tooltip.h" |
31 #include "ui/views/corewm/tooltip_controller.h" | 31 #include "ui/views/corewm/tooltip_controller.h" |
(...skipping 22 matching lines...) Expand all Loading... |
54 #include "ui/wm/core/shadow_types.h" | 54 #include "ui/wm/core/shadow_types.h" |
55 #include "ui/wm/core/visibility_controller.h" | 55 #include "ui/wm/core/visibility_controller.h" |
56 #include "ui/wm/core/window_animations.h" | 56 #include "ui/wm/core/window_animations.h" |
57 #include "ui/wm/core/window_modality_controller.h" | 57 #include "ui/wm/core/window_modality_controller.h" |
58 #include "ui/wm/public/activation_client.h" | 58 #include "ui/wm/public/activation_client.h" |
59 | 59 |
60 #if defined(OS_WIN) | 60 #if defined(OS_WIN) |
61 #include "ui/base/win/shell.h" | 61 #include "ui/base/win/shell.h" |
62 #endif | 62 #endif |
63 | 63 |
64 DECLARE_EXPORTED_WINDOW_PROPERTY_TYPE(VIEWS_EXPORT, | 64 DECLARE_EXPORTED_UI_CLASS_PROPERTY_TYPE(VIEWS_EXPORT, |
65 views::DesktopNativeWidgetAura*); | 65 views::DesktopNativeWidgetAura*); |
66 | 66 |
67 namespace views { | 67 namespace views { |
68 | 68 |
69 DEFINE_WINDOW_PROPERTY_KEY(DesktopNativeWidgetAura*, | 69 DEFINE_UI_CLASS_PROPERTY_KEY(DesktopNativeWidgetAura*, |
70 kDesktopNativeWidgetAuraKey, NULL); | 70 kDesktopNativeWidgetAuraKey, NULL); |
71 | 71 |
72 namespace { | 72 namespace { |
73 | 73 |
74 // This class provides functionality to create a top level widget to host a | 74 // This class provides functionality to create a top level widget to host a |
75 // child window. | 75 // child window. |
76 class DesktopNativeWidgetTopLevelHandler : public aura::WindowObserver { | 76 class DesktopNativeWidgetTopLevelHandler : public aura::WindowObserver { |
77 public: | 77 public: |
78 // This function creates a widget with the bounds passed in which eventually | 78 // This function creates a widget with the bounds passed in which eventually |
79 // becomes the parent of the child window passed in. | 79 // becomes the parent of the child window passed in. |
(...skipping 1127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1207 if (cursor_reference_count_ == 0) { | 1207 if (cursor_reference_count_ == 0) { |
1208 // We are the last DesktopNativeWidgetAura instance, and we are responsible | 1208 // We are the last DesktopNativeWidgetAura instance, and we are responsible |
1209 // for cleaning up |cursor_manager_|. | 1209 // for cleaning up |cursor_manager_|. |
1210 delete cursor_manager_; | 1210 delete cursor_manager_; |
1211 native_cursor_manager_ = NULL; | 1211 native_cursor_manager_ = NULL; |
1212 cursor_manager_ = NULL; | 1212 cursor_manager_ = NULL; |
1213 } | 1213 } |
1214 } | 1214 } |
1215 | 1215 |
1216 } // namespace views | 1216 } // namespace views |
OLD | NEW |