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