| 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 (want_all_keys) { |
| 334 DesktopKeyboardCaptureWin::Capture(GetHWND(), |
| 335 base::MessageLoopProxy::current()); |
| 336 } else { |
| 337 DesktopKeyboardCaptureWin::Release(GetHWND()); |
| 338 } |
| 339 } |
| 340 |
| 331 bool DesktopWindowTreeHostWin::IsAlwaysOnTop() const { | 341 bool DesktopWindowTreeHostWin::IsAlwaysOnTop() const { |
| 332 return message_handler_->IsAlwaysOnTop(); | 342 return message_handler_->IsAlwaysOnTop(); |
| 333 } | 343 } |
| 334 | 344 |
| 335 void DesktopWindowTreeHostWin::SetVisibleOnAllWorkspaces(bool always_visible) { | 345 void DesktopWindowTreeHostWin::SetVisibleOnAllWorkspaces(bool always_visible) { |
| 336 // Windows does not have the concept of workspaces. | 346 // Windows does not have the concept of workspaces. |
| 337 } | 347 } |
| 338 | 348 |
| 339 bool DesktopWindowTreeHostWin::SetWindowTitle(const base::string16& title) { | 349 bool DesktopWindowTreeHostWin::SetWindowTitle(const base::string16& title) { |
| 340 return message_handler_->SetTitle(title); | 350 return message_handler_->SetTitle(title); |
| (...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 946 | 956 |
| 947 // static | 957 // static |
| 948 DesktopWindowTreeHost* DesktopWindowTreeHost::Create( | 958 DesktopWindowTreeHost* DesktopWindowTreeHost::Create( |
| 949 internal::NativeWidgetDelegate* native_widget_delegate, | 959 internal::NativeWidgetDelegate* native_widget_delegate, |
| 950 DesktopNativeWidgetAura* desktop_native_widget_aura) { | 960 DesktopNativeWidgetAura* desktop_native_widget_aura) { |
| 951 return new DesktopWindowTreeHostWin(native_widget_delegate, | 961 return new DesktopWindowTreeHostWin(native_widget_delegate, |
| 952 desktop_native_widget_aura); | 962 desktop_native_widget_aura); |
| 953 } | 963 } |
| 954 | 964 |
| 955 } // namespace views | 965 } // namespace views |
| OLD | NEW |