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_root_window_host_win.h" | 5 #include "ui/views/widget/desktop_aura/desktop_root_window_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 802 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
813 ui::TSFBridge::GetInstance()->CancelComposition(); | 813 ui::TSFBridge::GetInstance()->CancelComposition(); |
814 return delegate_->OnHostMouseEvent(const_cast<ui::MouseEvent*>(&event)); | 814 return delegate_->OnHostMouseEvent(const_cast<ui::MouseEvent*>(&event)); |
815 } | 815 } |
816 | 816 |
817 bool DesktopRootWindowHostWin::HandleKeyEvent(const ui::KeyEvent& event) { | 817 bool DesktopRootWindowHostWin::HandleKeyEvent(const ui::KeyEvent& event) { |
818 return false; | 818 return false; |
819 } | 819 } |
820 | 820 |
821 bool DesktopRootWindowHostWin::HandleUntranslatedKeyEvent( | 821 bool DesktopRootWindowHostWin::HandleUntranslatedKeyEvent( |
822 const ui::KeyEvent& event) { | 822 const ui::KeyEvent& event) { |
823 scoped_ptr<ui::KeyEvent> duplicate_event(event.Copy()); | 823 ui::KeyEvent duplicate_event(event); |
824 return delegate_->OnHostKeyEvent(duplicate_event.get()); | 824 return delegate_->OnHostKeyEvent(&duplicate_event); |
825 } | 825 } |
826 | 826 |
827 void DesktopRootWindowHostWin::HandleTouchEvent( | 827 void DesktopRootWindowHostWin::HandleTouchEvent( |
828 const ui::TouchEvent& event) { | 828 const ui::TouchEvent& event) { |
829 // HWNDMessageHandler asynchronously processes touch events. Because of this | 829 // HWNDMessageHandler asynchronously processes touch events. Because of this |
830 // it's possible for the aura::RootWindow to have been destroyed by the time | 830 // it's possible for the aura::RootWindow to have been destroyed by the time |
831 // we attempt to process them. | 831 // we attempt to process them. |
832 if (!GetWidget()->GetNativeView()) | 832 if (!GetWidget()->GetNativeView()) |
833 return; | 833 return; |
834 | 834 |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
952 | 952 |
953 // static | 953 // static |
954 DesktopRootWindowHost* DesktopRootWindowHost::Create( | 954 DesktopRootWindowHost* DesktopRootWindowHost::Create( |
955 internal::NativeWidgetDelegate* native_widget_delegate, | 955 internal::NativeWidgetDelegate* native_widget_delegate, |
956 DesktopNativeWidgetAura* desktop_native_widget_aura) { | 956 DesktopNativeWidgetAura* desktop_native_widget_aura) { |
957 return new DesktopRootWindowHostWin(native_widget_delegate, | 957 return new DesktopRootWindowHostWin(native_widget_delegate, |
958 desktop_native_widget_aura); | 958 desktop_native_widget_aura); |
959 } | 959 } |
960 | 960 |
961 } // namespace views | 961 } // namespace views |
OLD | NEW |