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_root_window_host_win.h" | 5 #include "ui/views/widget/desktop_aura/desktop_root_window_host_win.h" |
6 | 6 |
7 #include "third_party/skia/include/core/SkPath.h" | 7 #include "third_party/skia/include/core/SkPath.h" |
8 #include "third_party/skia/include/core/SkRegion.h" | 8 #include "third_party/skia/include/core/SkRegion.h" |
9 #include "ui/aura/client/aura_constants.h" | 9 #include "ui/aura/client/aura_constants.h" |
10 #include "ui/aura/client/default_capture_client.h" | 10 #include "ui/aura/client/default_capture_client.h" |
11 #include "ui/aura/focus_manager.h" | 11 #include "ui/aura/focus_manager.h" |
12 #include "ui/aura/root_window.h" | 12 #include "ui/aura/root_window.h" |
13 #include "ui/aura/window_property.h" | 13 #include "ui/aura/window_property.h" |
14 #include "ui/base/cursor/cursor_loader_win.h" | 14 #include "ui/base/cursor/cursor_loader_win.h" |
15 #include "ui/base/ime/input_method_win.h" | 15 #include "ui/base/ime/input_method_win.h" |
16 #include "ui/base/win/shell.h" | 16 #include "ui/base/win/shell.h" |
17 #include "ui/gfx/native_widget_types.h" | 17 #include "ui/gfx/native_widget_types.h" |
18 #include "ui/gfx/path_win.h" | 18 #include "ui/gfx/path_win.h" |
19 #include "ui/native_theme/native_theme_aura.h" | 19 #include "ui/native_theme/native_theme_aura.h" |
20 #include "ui/native_theme/native_theme_win.h" | 20 #include "ui/native_theme/native_theme_win.h" |
21 #include "ui/views/corewm/compound_event_filter.h" | 21 #include "ui/views/corewm/compound_event_filter.h" |
22 #include "ui/views/corewm/corewm_switches.h" | 22 #include "ui/views/corewm/corewm_switches.h" |
| 23 #include "ui/views/corewm/cursor_manager.h" |
23 #include "ui/views/corewm/focus_controller.h" | 24 #include "ui/views/corewm/focus_controller.h" |
24 #include "ui/views/corewm/input_method_event_filter.h" | 25 #include "ui/views/corewm/input_method_event_filter.h" |
25 #include "ui/views/ime/input_method_bridge.h" | 26 #include "ui/views/ime/input_method_bridge.h" |
26 #include "ui/views/widget/desktop_aura/desktop_activation_client.h" | 27 #include "ui/views/widget/desktop_aura/desktop_activation_client.h" |
27 #include "ui/views/widget/desktop_aura/desktop_cursor_client.h" | |
28 #include "ui/views/widget/desktop_aura/desktop_dispatcher_client.h" | 28 #include "ui/views/widget/desktop_aura/desktop_dispatcher_client.h" |
29 #include "ui/views/widget/desktop_aura/desktop_drag_drop_client_win.h" | 29 #include "ui/views/widget/desktop_aura/desktop_drag_drop_client_win.h" |
30 #include "ui/views/widget/desktop_aura/desktop_focus_rules.h" | 30 #include "ui/views/widget/desktop_aura/desktop_focus_rules.h" |
| 31 #include "ui/views/widget/desktop_aura/desktop_native_cursor_manager.h" |
31 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h" | 32 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h" |
32 #include "ui/views/widget/desktop_aura/desktop_screen_position_client.h" | 33 #include "ui/views/widget/desktop_aura/desktop_screen_position_client.h" |
33 #include "ui/views/widget/root_view.h" | 34 #include "ui/views/widget/root_view.h" |
34 #include "ui/views/widget/widget_delegate.h" | 35 #include "ui/views/widget/widget_delegate.h" |
35 #include "ui/views/widget/widget_hwnd_utils.h" | 36 #include "ui/views/widget/widget_hwnd_utils.h" |
36 #include "ui/views/win/fullscreen_handler.h" | 37 #include "ui/views/win/fullscreen_handler.h" |
37 #include "ui/views/win/hwnd_message_handler.h" | 38 #include "ui/views/win/hwnd_message_handler.h" |
38 #include "ui/views/window/native_frame_view.h" | 39 #include "ui/views/window/native_frame_view.h" |
39 | 40 |
40 namespace views { | 41 namespace views { |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 } else { | 136 } else { |
136 focus_client_.reset(new aura::FocusManager); | 137 focus_client_.reset(new aura::FocusManager); |
137 aura::client::SetFocusClient(root_window_, focus_client_.get()); | 138 aura::client::SetFocusClient(root_window_, focus_client_.get()); |
138 activation_client_.reset(new DesktopActivationClient(root_window_)); | 139 activation_client_.reset(new DesktopActivationClient(root_window_)); |
139 } | 140 } |
140 | 141 |
141 dispatcher_client_.reset(new DesktopDispatcherClient); | 142 dispatcher_client_.reset(new DesktopDispatcherClient); |
142 aura::client::SetDispatcherClient(root_window_, | 143 aura::client::SetDispatcherClient(root_window_, |
143 dispatcher_client_.get()); | 144 dispatcher_client_.get()); |
144 | 145 |
145 cursor_client_.reset(new DesktopCursorClient(root_window_)); | 146 cursor_client_.reset( |
146 aura::client::SetCursorClient(root_window_, cursor_client_.get()); | 147 new views::corewm::CursorManager( |
| 148 scoped_ptr<corewm::NativeCursorManager>( |
| 149 new views::DesktopNativeCursorManager(root_window_)))); |
| 150 aura::client::SetCursorClient(root_window_, |
| 151 cursor_client_.get()); |
147 | 152 |
148 position_client_.reset(new DesktopScreenPositionClient()); | 153 position_client_.reset(new DesktopScreenPositionClient()); |
149 aura::client::SetScreenPositionClient(root_window_, | 154 aura::client::SetScreenPositionClient(root_window_, |
150 position_client_.get()); | 155 position_client_.get()); |
151 | 156 |
152 desktop_native_widget_aura_->InstallInputMethodEventFilter(root_window_); | 157 desktop_native_widget_aura_->InstallInputMethodEventFilter(root_window_); |
153 | 158 |
154 drag_drop_client_.reset(new DesktopDragDropClientWin(root_window_, | 159 drag_drop_client_.reset(new DesktopDragDropClientWin(root_window_, |
155 GetHWND())); | 160 GetHWND())); |
156 aura::client::SetDragDropClient(root_window_, drag_drop_client_.get()); | 161 aura::client::SetDragDropClient(root_window_, drag_drop_client_.get()); |
(...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
784 DesktopRootWindowHost* DesktopRootWindowHost::Create( | 789 DesktopRootWindowHost* DesktopRootWindowHost::Create( |
785 internal::NativeWidgetDelegate* native_widget_delegate, | 790 internal::NativeWidgetDelegate* native_widget_delegate, |
786 DesktopNativeWidgetAura* desktop_native_widget_aura, | 791 DesktopNativeWidgetAura* desktop_native_widget_aura, |
787 const gfx::Rect& initial_bounds) { | 792 const gfx::Rect& initial_bounds) { |
788 return new DesktopRootWindowHostWin(native_widget_delegate, | 793 return new DesktopRootWindowHostWin(native_widget_delegate, |
789 desktop_native_widget_aura, | 794 desktop_native_widget_aura, |
790 initial_bounds); | 795 initial_bounds); |
791 } | 796 } |
792 | 797 |
793 } // namespace views | 798 } // namespace views |
OLD | NEW |