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 787 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
798 void DesktopWindowTreeHostWin::HandleNativeBlur(HWND focused_window) { | 798 void DesktopWindowTreeHostWin::HandleNativeBlur(HWND focused_window) { |
799 // TODO(beng): inform the native_widget_delegate_. | 799 // TODO(beng): inform the native_widget_delegate_. |
800 } | 800 } |
801 | 801 |
802 bool DesktopWindowTreeHostWin::HandleMouseEvent(const ui::MouseEvent& event) { | 802 bool DesktopWindowTreeHostWin::HandleMouseEvent(const ui::MouseEvent& event) { |
803 SendEventToProcessor(const_cast<ui::MouseEvent*>(&event)); | 803 SendEventToProcessor(const_cast<ui::MouseEvent*>(&event)); |
804 return event.handled(); | 804 return event.handled(); |
805 } | 805 } |
806 | 806 |
807 void DesktopWindowTreeHostWin::HandleKeyEvent(ui::KeyEvent* event) { | 807 void DesktopWindowTreeHostWin::HandleKeyEvent(ui::KeyEvent* event) { |
808 GetInputMethod()->DispatchKeyEvent(*event); | 808 GetInputMethod()->DispatchKeyEvent(event); |
809 event->StopPropagation(); | |
810 } | 809 } |
811 | 810 |
812 void DesktopWindowTreeHostWin::HandleTouchEvent( | 811 void DesktopWindowTreeHostWin::HandleTouchEvent( |
813 const ui::TouchEvent& event) { | 812 const ui::TouchEvent& event) { |
814 // HWNDMessageHandler asynchronously processes touch events. Because of this | 813 // HWNDMessageHandler asynchronously processes touch events. Because of this |
815 // it's possible for the aura::WindowEventDispatcher to have been destroyed | 814 // it's possible for the aura::WindowEventDispatcher to have been destroyed |
816 // by the time we attempt to process them. | 815 // by the time we attempt to process them. |
817 if (!GetWidget()->GetNativeView()) | 816 if (!GetWidget()->GetNativeView()) |
818 return; | 817 return; |
819 | 818 |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
944 | 943 |
945 // static | 944 // static |
946 DesktopWindowTreeHost* DesktopWindowTreeHost::Create( | 945 DesktopWindowTreeHost* DesktopWindowTreeHost::Create( |
947 internal::NativeWidgetDelegate* native_widget_delegate, | 946 internal::NativeWidgetDelegate* native_widget_delegate, |
948 DesktopNativeWidgetAura* desktop_native_widget_aura) { | 947 DesktopNativeWidgetAura* desktop_native_widget_aura) { |
949 return new DesktopWindowTreeHostWin(native_widget_delegate, | 948 return new DesktopWindowTreeHostWin(native_widget_delegate, |
950 desktop_native_widget_aura); | 949 desktop_native_widget_aura); |
951 } | 950 } |
952 | 951 |
953 } // namespace views | 952 } // namespace views |
OLD | NEW |