| 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_window_tree_host_win.h" | 5 #include "ui/views/widget/desktop_aura/desktop_window_tree_host_win.h" |
| 6 | 6 |
| 7 #include "base/win/metro.h" | 7 #include "base/win/metro.h" |
| 8 #include "third_party/skia/include/core/SkPath.h" | 8 #include "third_party/skia/include/core/SkPath.h" |
| 9 #include "third_party/skia/include/core/SkRegion.h" | 9 #include "third_party/skia/include/core/SkRegion.h" |
| 10 #include "ui/aura/client/aura_constants.h" | 10 #include "ui/aura/client/aura_constants.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 #include "ui/gfx/path.h" | 21 #include "ui/gfx/path.h" |
| 22 #include "ui/gfx/path_win.h" | 22 #include "ui/gfx/path_win.h" |
| 23 #include "ui/gfx/vector2d.h" | 23 #include "ui/gfx/vector2d.h" |
| 24 #include "ui/gfx/win/dpi.h" | 24 #include "ui/gfx/win/dpi.h" |
| 25 #include "ui/native_theme/native_theme_aura.h" | 25 #include "ui/native_theme/native_theme_aura.h" |
| 26 #include "ui/native_theme/native_theme_win.h" | 26 #include "ui/native_theme/native_theme_win.h" |
| 27 #include "ui/views/corewm/tooltip_win.h" | 27 #include "ui/views/corewm/tooltip_win.h" |
| 28 #include "ui/views/ime/input_method_bridge.h" | 28 #include "ui/views/ime/input_method_bridge.h" |
| 29 #include "ui/views/widget/desktop_aura/desktop_cursor_loader_updater.h" | 29 #include "ui/views/widget/desktop_aura/desktop_cursor_loader_updater.h" |
| 30 #include "ui/views/widget/desktop_aura/desktop_drag_drop_client_win.h" | 30 #include "ui/views/widget/desktop_aura/desktop_drag_drop_client_win.h" |
| 31 #include "ui/views/widget/desktop_aura/desktop_keyboard_capture_win.h" |
| 31 #include "ui/views/widget/desktop_aura/desktop_native_cursor_manager.h" | 32 #include "ui/views/widget/desktop_aura/desktop_native_cursor_manager.h" |
| 32 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h" | 33 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.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/wm/core/compound_event_filter.h" | 39 #include "ui/wm/core/compound_event_filter.h" |
| 39 #include "ui/wm/core/input_method_event_filter.h" | 40 #include "ui/wm/core/input_method_event_filter.h" |
| 40 #include "ui/wm/core/window_animations.h" | 41 #include "ui/wm/core/window_animations.h" |
| (...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 } | 322 } |
| 322 | 323 |
| 323 bool DesktopWindowTreeHostWin::HasCapture() const { | 324 bool DesktopWindowTreeHostWin::HasCapture() const { |
| 324 return message_handler_->HasCapture(); | 325 return message_handler_->HasCapture(); |
| 325 } | 326 } |
| 326 | 327 |
| 327 void DesktopWindowTreeHostWin::SetAlwaysOnTop(bool always_on_top) { | 328 void DesktopWindowTreeHostWin::SetAlwaysOnTop(bool always_on_top) { |
| 328 message_handler_->SetAlwaysOnTop(always_on_top); | 329 message_handler_->SetAlwaysOnTop(always_on_top); |
| 329 } | 330 } |
| 330 | 331 |
| 332 void DesktopWindowTreeHostWin::SetInterceptAllKeys(bool want_all_keys) { |
| 333 if ((keyboard_capture_.get() == NULL) && want_all_keys) { |
| 334 keyboard_capture_.reset(new DesktopKeyboardCaptureWin(GetHWND())); |
| 335 } else if (!want_all_keys) { |
| 336 keyboard_capture_.reset(NULL); |
| 337 } |
| 338 } |
| 339 |
| 331 bool DesktopWindowTreeHostWin::IsAlwaysOnTop() const { | 340 bool DesktopWindowTreeHostWin::IsAlwaysOnTop() const { |
| 332 return message_handler_->IsAlwaysOnTop(); | 341 return message_handler_->IsAlwaysOnTop(); |
| 333 } | 342 } |
| 334 | 343 |
| 335 void DesktopWindowTreeHostWin::SetVisibleOnAllWorkspaces(bool always_visible) { | 344 void DesktopWindowTreeHostWin::SetVisibleOnAllWorkspaces(bool always_visible) { |
| 336 // Windows does not have the concept of workspaces. | 345 // Windows does not have the concept of workspaces. |
| 337 } | 346 } |
| 338 | 347 |
| 339 bool DesktopWindowTreeHostWin::SetWindowTitle(const base::string16& title) { | 348 bool DesktopWindowTreeHostWin::SetWindowTitle(const base::string16& title) { |
| 340 return message_handler_->SetTitle(title); | 349 return message_handler_->SetTitle(title); |
| (...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 946 | 955 |
| 947 // static | 956 // static |
| 948 DesktopWindowTreeHost* DesktopWindowTreeHost::Create( | 957 DesktopWindowTreeHost* DesktopWindowTreeHost::Create( |
| 949 internal::NativeWidgetDelegate* native_widget_delegate, | 958 internal::NativeWidgetDelegate* native_widget_delegate, |
| 950 DesktopNativeWidgetAura* desktop_native_widget_aura) { | 959 DesktopNativeWidgetAura* desktop_native_widget_aura) { |
| 951 return new DesktopWindowTreeHostWin(native_widget_delegate, | 960 return new DesktopWindowTreeHostWin(native_widget_delegate, |
| 952 desktop_native_widget_aura); | 961 desktop_native_widget_aura); |
| 953 } | 962 } |
| 954 | 963 |
| 955 } // namespace views | 964 } // namespace views |
| OLD | NEW |