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 786 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
797 | 797 |
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 bool DesktopWindowTreeHostWin::HandleKeyEvent(const ui::KeyEvent& event) { | 807 void DesktopWindowTreeHostWin::HandleKeyEvent(ui::KeyEvent* event) { |
808 return false; | 808 GetInputMethod()->DispatchKeyEvent(*event); |
809 } | 809 event->StopPropagation(); |
810 | |
811 bool DesktopWindowTreeHostWin::HandleUntranslatedKeyEvent( | |
812 const ui::KeyEvent& event) { | |
813 ui::KeyEvent duplicate_event(event); | |
814 SendEventToProcessor(&duplicate_event); | |
815 return duplicate_event.handled(); | |
816 } | 810 } |
817 | 811 |
818 void DesktopWindowTreeHostWin::HandleTouchEvent( | 812 void DesktopWindowTreeHostWin::HandleTouchEvent( |
819 const ui::TouchEvent& event) { | 813 const ui::TouchEvent& event) { |
820 // HWNDMessageHandler asynchronously processes touch events. Because of this | 814 // HWNDMessageHandler asynchronously processes touch events. Because of this |
821 // it's possible for the aura::WindowEventDispatcher to have been destroyed | 815 // it's possible for the aura::WindowEventDispatcher to have been destroyed |
822 // by the time we attempt to process them. | 816 // by the time we attempt to process them. |
823 if (!GetWidget()->GetNativeView()) | 817 if (!GetWidget()->GetNativeView()) |
824 return; | 818 return; |
825 | 819 |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
950 | 944 |
951 // static | 945 // static |
952 DesktopWindowTreeHost* DesktopWindowTreeHost::Create( | 946 DesktopWindowTreeHost* DesktopWindowTreeHost::Create( |
953 internal::NativeWidgetDelegate* native_widget_delegate, | 947 internal::NativeWidgetDelegate* native_widget_delegate, |
954 DesktopNativeWidgetAura* desktop_native_widget_aura) { | 948 DesktopNativeWidgetAura* desktop_native_widget_aura) { |
955 return new DesktopWindowTreeHostWin(native_widget_delegate, | 949 return new DesktopWindowTreeHostWin(native_widget_delegate, |
956 desktop_native_widget_aura); | 950 desktop_native_widget_aura); |
957 } | 951 } |
958 | 952 |
959 } // namespace views | 953 } // namespace views |
OLD | NEW |