| 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 "ui/base/test/ui_controls_aura.h" | 5 #include "ui/base/test/ui_controls_aura.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 | 8 |
| 9 namespace ui_controls { | 9 namespace ui_controls { |
| 10 namespace { | 10 namespace { |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 return instance_->SendMouseEventsNotifyWhenDone(type, state, task); | 69 return instance_->SendMouseEventsNotifyWhenDone(type, state, task); |
| 70 } | 70 } |
| 71 | 71 |
| 72 // static | 72 // static |
| 73 bool SendMouseClick(MouseButton type) { | 73 bool SendMouseClick(MouseButton type) { |
| 74 CHECK(g_ui_controls_enabled); | 74 CHECK(g_ui_controls_enabled); |
| 75 return instance_->SendMouseClick(type); | 75 return instance_->SendMouseClick(type); |
| 76 } | 76 } |
| 77 | 77 |
| 78 // static | 78 // static |
| 79 bool SendTouchEvents(int action, int num, long x, long y) { |
| 80 CHECK(g_ui_controls_enabled); |
| 81 return instance_->SendTouchEvents(action, num, x, y); |
| 82 } |
| 83 |
| 84 // static |
| 79 void RunClosureAfterAllPendingUIEvents(const base::Closure& closure) { | 85 void RunClosureAfterAllPendingUIEvents(const base::Closure& closure) { |
| 80 instance_->RunClosureAfterAllPendingUIEvents(closure); | 86 instance_->RunClosureAfterAllPendingUIEvents(closure); |
| 81 } | 87 } |
| 82 | 88 |
| 83 UIControlsAura::UIControlsAura() { | 89 UIControlsAura::UIControlsAura() { |
| 84 } | 90 } |
| 85 | 91 |
| 86 UIControlsAura::~UIControlsAura() { | 92 UIControlsAura::~UIControlsAura() { |
| 87 } | 93 } |
| 88 | 94 |
| 89 // static. declared in ui_controls.h | 95 // static. declared in ui_controls.h |
| 90 void InstallUIControlsAura(UIControlsAura* instance) { | 96 void InstallUIControlsAura(UIControlsAura* instance) { |
| 91 delete instance_; | 97 delete instance_; |
| 92 instance_ = instance; | 98 instance_ = instance; |
| 93 } | 99 } |
| 94 | 100 |
| 95 } // namespace ui_controls | 101 } // namespace ui_controls |
| OLD | NEW |