| 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 CHECK(g_ui_controls_enabled); | 68 CHECK(g_ui_controls_enabled); |
| 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 #if defined(OS_WIN) |
| 79 // static |
| 80 bool SendTouchEvents(int action, int num, int x, int y) { |
| 81 CHECK(g_ui_controls_enabled); |
| 82 return instance_->SendTouchEvents(action, num, x, y); |
| 83 } |
| 84 #endif |
| 85 |
| 78 // static | 86 // static |
| 79 void RunClosureAfterAllPendingUIEvents(const base::Closure& closure) { | 87 void RunClosureAfterAllPendingUIEvents(const base::Closure& closure) { |
| 80 instance_->RunClosureAfterAllPendingUIEvents(closure); | 88 instance_->RunClosureAfterAllPendingUIEvents(closure); |
| 81 } | 89 } |
| 82 | 90 |
| 83 UIControlsAura::UIControlsAura() { | 91 UIControlsAura::UIControlsAura() { |
| 84 } | 92 } |
| 85 | 93 |
| 86 UIControlsAura::~UIControlsAura() { | 94 UIControlsAura::~UIControlsAura() { |
| 87 } | 95 } |
| 88 | 96 |
| 89 // static. declared in ui_controls.h | 97 // static. declared in ui_controls.h |
| 90 void InstallUIControlsAura(UIControlsAura* instance) { | 98 void InstallUIControlsAura(UIControlsAura* instance) { |
| 91 delete instance_; | 99 delete instance_; |
| 92 instance_ = instance; | 100 instance_ = instance; |
| 93 } | 101 } |
| 94 | 102 |
| 95 } // namespace ui_controls | 103 } // namespace ui_controls |
| OLD | NEW |