Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(126)

Side by Side Diff: ui/ui_controls/ui_controls_aura.cc

Issue 9390038: Move automation/ui_controls to ui/ui_controls (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/ui_controls/ui_controls_aura.h ('k') | ui/ui_controls/ui_controls_gtk.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "ui/ui_controls/ui_controls_aura.h"
6
7 #include "base/logging.h"
8
9 namespace ui_controls {
10 namespace {
11 UIControlsAura* instance_ = NULL;
12 } // namespace
13
14 // An interface to provide Aura implementation of UI control.
15 bool SendKeyPress(gfx::NativeWindow window,
16 ui::KeyboardCode key,
17 bool control,
18 bool shift,
19 bool alt,
20 bool command) {
21 return instance_->SendKeyPress(
22 window, key, control, shift, alt, command);
23 }
24
25 // static
26 bool SendKeyPressNotifyWhenDone(gfx::NativeWindow window,
27 ui::KeyboardCode key,
28 bool control,
29 bool shift,
30 bool alt,
31 bool command,
32 const base::Closure& task) {
33 return instance_->SendKeyPressNotifyWhenDone(
34 window, key, control, shift, alt, command, task);
35 }
36
37 // static
38 bool SendMouseMove(long x, long y) {
39 return instance_->SendMouseMove(x, y);
40 }
41
42 // static
43 bool SendMouseMoveNotifyWhenDone(long x,
44 long y,
45 const base::Closure& task) {
46 return instance_->SendMouseMoveNotifyWhenDone(x, y, task);
47 }
48
49 // static
50 bool SendMouseEvents(MouseButton type, int state) {
51 return instance_->SendMouseEvents(type, state);
52 }
53
54 // static
55 bool SendMouseEventsNotifyWhenDone(MouseButton type, int state,
sky 2012/03/15 15:04:36 nit: state on next line.
56 const base::Closure& task) {
57 return instance_->SendMouseEventsNotifyWhenDone(type, state, task);
58 }
59
60 // static
61 bool SendMouseClick(MouseButton type) {
62 return instance_->SendMouseClick(type);
63 }
64
65 // static
66 void RunClosureAfterAllPendingUIEvents(const base::Closure& closure) {
67 instance_->RunClosureAfterAllPendingUIEvents(closure);
68 }
69
70 UIControlsAura::UIControlsAura() {
71 }
72 UIControlsAura::~UIControlsAura() {
73 }
74
75 // static
76 void InstallUIControlsAura(UIControlsAura* instance) {
77 delete instance_;
78 instance_ = instance;
79 }
80
81 } // namespace ui_controls
OLDNEW
« no previous file with comments | « ui/ui_controls/ui_controls_aura.h ('k') | ui/ui_controls/ui_controls_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698