| 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_root_window_host_win.h" | 5 #include "ui/views/widget/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/desktop/desktop_activation_client.h" | 11 #include "ui/aura/desktop/desktop_activation_client.h" |
| 12 #include "ui/aura/desktop/desktop_cursor_client.h" | 12 #include "ui/aura/desktop/desktop_cursor_client.h" |
| 13 #include "ui/aura/desktop/desktop_dispatcher_client.h" | 13 #include "ui/aura/desktop/desktop_dispatcher_client.h" |
| 14 #include "ui/aura/focus_manager.h" | 14 #include "ui/aura/focus_manager.h" |
| 15 #include "ui/aura/root_window.h" | 15 #include "ui/aura/root_window.h" |
| 16 #include "ui/aura/shared/compound_event_filter.h" | 16 #include "ui/views/corewm/compound_event_filter.h" |
| 17 #include "ui/aura/shared/input_method_event_filter.h" | 17 #include "ui/views/corewm/input_method_event_filter.h" |
| 18 #include "ui/aura/window_property.h" | 18 #include "ui/aura/window_property.h" |
| 19 #include "ui/base/cursor/cursor_loader_win.h" | 19 #include "ui/base/cursor/cursor_loader_win.h" |
| 20 #include "ui/base/native_theme/native_theme_aura.h" | 20 #include "ui/base/native_theme/native_theme_aura.h" |
| 21 #include "ui/base/native_theme/native_theme_win.h" | 21 #include "ui/base/native_theme/native_theme_win.h" |
| 22 #include "ui/base/win/shell.h" | 22 #include "ui/base/win/shell.h" |
| 23 #include "ui/gfx/native_widget_types.h" | 23 #include "ui/gfx/native_widget_types.h" |
| 24 #include "ui/gfx/path_win.h" | 24 #include "ui/gfx/path_win.h" |
| 25 #include "ui/views/ime/input_method_win.h" | 25 #include "ui/views/ime/input_method_win.h" |
| 26 #include "ui/views/widget/desktop_native_widget_aura.h" | 26 #include "ui/views/widget/desktop_native_widget_aura.h" |
| 27 #include "ui/views/widget/desktop_screen_position_client.h" | 27 #include "ui/views/widget/desktop_screen_position_client.h" |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 aura::client::SetCursorClient(root_window_, cursor_client_.get()); | 126 aura::client::SetCursorClient(root_window_, cursor_client_.get()); |
| 127 | 127 |
| 128 | 128 |
| 129 position_client_.reset(new DesktopScreenPositionClient()); | 129 position_client_.reset(new DesktopScreenPositionClient()); |
| 130 aura::client::SetScreenPositionClient(root_window_, | 130 aura::client::SetScreenPositionClient(root_window_, |
| 131 position_client_.get()); | 131 position_client_.get()); |
| 132 | 132 |
| 133 // CEF sets focus to the window the user clicks down on. | 133 // CEF sets focus to the window the user clicks down on. |
| 134 // TODO(beng): see if we can't do this some other way. CEF seems a heavy- | 134 // TODO(beng): see if we can't do this some other way. CEF seems a heavy- |
| 135 // handed way of accomplishing focus. | 135 // handed way of accomplishing focus. |
| 136 root_window_event_filter_ = new aura::shared::CompoundEventFilter; | 136 root_window_event_filter_ = new views::corewm::CompoundEventFilter; |
| 137 root_window_->SetEventFilter(root_window_event_filter_); | 137 root_window_->SetEventFilter(root_window_event_filter_); |
| 138 | 138 |
| 139 input_method_filter_.reset(new aura::shared::InputMethodEventFilter); | 139 input_method_filter_.reset(new views::corewm::InputMethodEventFilter); |
| 140 input_method_filter_->SetInputMethodPropertyInRootWindow(root_window_); | 140 input_method_filter_->SetInputMethodPropertyInRootWindow(root_window_); |
| 141 root_window_event_filter_->AddFilter(input_method_filter_.get()); | 141 root_window_event_filter_->AddFilter(input_method_filter_.get()); |
| 142 | 142 |
| 143 focus_manager_->SetFocusedWindow(content_window_, NULL); | 143 focus_manager_->SetFocusedWindow(content_window_, NULL); |
| 144 root_window_->SetProperty(kContentWindowForRootWindow, content_window_); | 144 root_window_->SetProperty(kContentWindowForRootWindow, content_window_); |
| 145 return root_window_; | 145 return root_window_; |
| 146 } | 146 } |
| 147 | 147 |
| 148 void DesktopRootWindowHostWin::Close() { | 148 void DesktopRootWindowHostWin::Close() { |
| 149 message_handler_->Close(); | 149 message_handler_->Close(); |
| (...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 775 DesktopRootWindowHost* DesktopRootWindowHost::Create( | 775 DesktopRootWindowHost* DesktopRootWindowHost::Create( |
| 776 internal::NativeWidgetDelegate* native_widget_delegate, | 776 internal::NativeWidgetDelegate* native_widget_delegate, |
| 777 DesktopNativeWidgetAura* desktop_native_widget_aura, | 777 DesktopNativeWidgetAura* desktop_native_widget_aura, |
| 778 const gfx::Rect& initial_bounds) { | 778 const gfx::Rect& initial_bounds) { |
| 779 return new DesktopRootWindowHostWin(native_widget_delegate, | 779 return new DesktopRootWindowHostWin(native_widget_delegate, |
| 780 desktop_native_widget_aura, | 780 desktop_native_widget_aura, |
| 781 initial_bounds); | 781 initial_bounds); |
| 782 } | 782 } |
| 783 | 783 |
| 784 } // namespace views | 784 } // namespace views |
| OLD | NEW |