| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "base/basictypes.h" | 5 #include "base/basictypes.h" |
| 6 #include "base/logging.h" | 6 #include "base/logging.h" |
| 7 #include "base/message_loop/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
| 8 #include "ui/aura/root_window.h" | 8 #include "ui/aura/root_window.h" |
| 9 #include "ui/aura/test/ui_controls_factory_aura.h" | 9 #include "ui/aura/test/ui_controls_factory_aura.h" |
| 10 #include "ui/aura/window.h" | 10 #include "ui/aura/window.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 UIControlsWin() {} | 30 UIControlsWin() {} |
| 31 | 31 |
| 32 // UIControlsAura overrides: | 32 // UIControlsAura overrides: |
| 33 virtual bool SendKeyPress(gfx::NativeWindow native_window, | 33 virtual bool SendKeyPress(gfx::NativeWindow native_window, |
| 34 ui::KeyboardCode key, | 34 ui::KeyboardCode key, |
| 35 bool control, | 35 bool control, |
| 36 bool shift, | 36 bool shift, |
| 37 bool alt, | 37 bool alt, |
| 38 bool command) { | 38 bool command) { |
| 39 DCHECK(!command); // No command key on Aura | 39 DCHECK(!command); // No command key on Aura |
| 40 HWND window = native_window->GetDispatcher()->GetAcceleratedWidget(); | 40 HWND window = |
| 41 native_window->GetDispatcher()->host()->GetAcceleratedWidget(); |
| 41 return SendKeyPressImpl( | 42 return SendKeyPressImpl( |
| 42 window, key, control, shift, alt, base::Closure()); | 43 window, key, control, shift, alt, base::Closure()); |
| 43 } | 44 } |
| 44 virtual bool SendKeyPressNotifyWhenDone(gfx::NativeWindow native_window, | 45 virtual bool SendKeyPressNotifyWhenDone(gfx::NativeWindow native_window, |
| 45 ui::KeyboardCode key, | 46 ui::KeyboardCode key, |
| 46 bool control, | 47 bool control, |
| 47 bool shift, | 48 bool shift, |
| 48 bool alt, | 49 bool alt, |
| 49 bool command, | 50 bool command, |
| 50 const base::Closure& task) { | 51 const base::Closure& task) { |
| 51 DCHECK(!command); // No command key on Aura | 52 DCHECK(!command); // No command key on Aura |
| 52 HWND window = native_window->GetDispatcher()->GetAcceleratedWidget(); | 53 HWND window = |
| 54 native_window->GetDispatcher()->host()->GetAcceleratedWidget(); |
| 53 return SendKeyPressImpl(window, key, control, shift, alt, task); | 55 return SendKeyPressImpl(window, key, control, shift, alt, task); |
| 54 } | 56 } |
| 55 virtual bool SendMouseMove(long x, long y) { | 57 virtual bool SendMouseMove(long x, long y) { |
| 56 gfx::Point point(x, y); | 58 gfx::Point point(x, y); |
| 57 return SendMouseMoveImpl(point.x(), point.y(), base::Closure()); | 59 return SendMouseMoveImpl(point.x(), point.y(), base::Closure()); |
| 58 } | 60 } |
| 59 virtual bool SendMouseMoveNotifyWhenDone(long x, | 61 virtual bool SendMouseMoveNotifyWhenDone(long x, |
| 60 long y, | 62 long y, |
| 61 const base::Closure& task) { | 63 const base::Closure& task) { |
| 62 gfx::Point point(x, y); | 64 gfx::Point point(x, y); |
| (...skipping 20 matching lines...) Expand all Loading... |
| 83 }; | 85 }; |
| 84 | 86 |
| 85 } // namespace | 87 } // namespace |
| 86 | 88 |
| 87 UIControlsAura* CreateUIControlsAura(aura::RootWindow* root_window) { | 89 UIControlsAura* CreateUIControlsAura(aura::RootWindow* root_window) { |
| 88 return new UIControlsWin(); | 90 return new UIControlsWin(); |
| 89 } | 91 } |
| 90 | 92 |
| 91 } // namespace test | 93 } // namespace test |
| 92 } // namespace aura | 94 } // namespace aura |
| OLD | NEW |