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

Unified Diff: ui/ui_controls/ui_controls.h

Issue 9390038: Move automation/ui_controls to ui/ui_controls (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: win_aura fix, 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/ui.gyp ('k') | ui/ui_controls/ui_controls_aura.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ui_controls/ui_controls.h
diff --git a/chrome/browser/automation/ui_controls.h b/ui/ui_controls/ui_controls.h
similarity index 52%
rename from chrome/browser/automation/ui_controls.h
rename to ui/ui_controls/ui_controls.h
index 270e18d4b18bbc77cb67df5cd6a314ad92d447db..cbbeaba2707c8d0bdabf5c04ce8749fb4b965b6b 100644
--- a/chrome/browser/automation/ui_controls.h
+++ b/ui/ui_controls/ui_controls.h
@@ -1,9 +1,9 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_AUTOMATION_UI_CONTROLS_H_
-#define CHROME_BROWSER_AUTOMATION_UI_CONTROLS_H_
+#ifndef UI_UI_CONTROLS_UI_CONTROLS_H_
+#define UI_UI_CONTROLS_UI_CONTROLS_H_
#pragma once
#include "build/build_config.h"
@@ -15,13 +15,7 @@
#include "base/callback_forward.h"
#include "ui/base/keycodes/keyboard_codes.h"
#include "ui/gfx/native_widget_types.h"
-#include "ui/gfx/point.h"
-
-#if defined(TOOLKIT_VIEWS)
-namespace views {
-class View;
-}
-#endif
+#include "ui/base/ui_export.h"
namespace ui_controls {
@@ -44,23 +38,25 @@ namespace ui_controls {
//
// If you're writing a test chances are you want the variant in ui_test_utils.
// See it for details.
-bool SendKeyPress(gfx::NativeWindow window,
- ui::KeyboardCode key,
- bool control,
- bool shift,
- bool alt,
- bool command);
-bool SendKeyPressNotifyWhenDone(gfx::NativeWindow window,
- ui::KeyboardCode key,
- bool control,
- bool shift,
- bool alt,
- bool command,
- const base::Closure& task);
+UI_EXPORT bool SendKeyPress(gfx::NativeWindow window,
+ ui::KeyboardCode key,
+ bool control,
+ bool shift,
+ bool alt,
+ bool command);
+UI_EXPORT bool SendKeyPressNotifyWhenDone(gfx::NativeWindow window,
+ ui::KeyboardCode key,
+ bool control,
+ bool shift,
+ bool alt,
+ bool command,
+ const base::Closure& task);
// Simulate a mouse move. (x,y) are absolute screen coordinates.
-bool SendMouseMove(long x, long y);
-bool SendMouseMoveNotifyWhenDone(long x, long y, const base::Closure& task);
+UI_EXPORT bool SendMouseMove(long x, long y);
+UI_EXPORT bool SendMouseMoveNotifyWhenDone(long x,
+ long y,
+ const base::Closure& task);
enum MouseButton {
LEFT = 0,
@@ -77,31 +73,24 @@ enum MouseButtonState {
// Sends a mouse down and/or up message. The click will be sent to wherever
// the cursor currently is, so be sure to move the cursor before calling this
// (and be sure the cursor has arrived!).
-bool SendMouseEvents(MouseButton type, int state);
-bool SendMouseEventsNotifyWhenDone(MouseButton type, int state,
- const base::Closure& task);
+UI_EXPORT bool SendMouseEvents(MouseButton type, int state);
+UI_EXPORT bool SendMouseEventsNotifyWhenDone(
+ MouseButton type, int state,
+ const base::Closure& task);
// Same as SendMouseEvents with UP | DOWN.
-bool SendMouseClick(MouseButton type);
+UI_EXPORT bool SendMouseClick(MouseButton type);
-// A combination of SendMouseMove to the middle of the view followed by
-// SendMouseEvents.
-void MoveMouseToCenterAndPress(
#if defined(TOOLKIT_VIEWS)
- views::View* view,
-#elif defined(TOOLKIT_GTK)
- GtkWidget* widget,
-#elif defined(OS_MACOSX)
- NSView* view,
+// Runs |closure| after processing all pending ui events.
+UI_EXPORT void RunClosureAfterAllPendingUIEvents(
+ const base::Closure& closure);
#endif
- MouseButton button,
- int state,
- const base::Closure& task);
-#if defined(TOOLKIT_VIEWS)
-// Runs |closure| after processing all pending ui events.
-void RunClosureAfterAllPendingUIEvents(const base::Closure& closure);
+#if defined(USE_AURA)
+class UIControlsAura;
+UI_EXPORT void InstallUIControlsAura(UIControlsAura* instance);
#endif
-} // ui_controls
+} // namespace ui_controls
-#endif // CHROME_BROWSER_AUTOMATION_UI_CONTROLS_H_
+#endif // UI_UI_CONTROLS_UI_CONTROLS_H_
« no previous file with comments | « ui/ui.gyp ('k') | ui/ui_controls/ui_controls_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698