Index: chrome/browser/automation/ui_controls_internal_win.cc |
diff --git a/chrome/browser/automation/ui_controls_win.cc b/chrome/browser/automation/ui_controls_internal_win.cc |
similarity index 81% |
copy from chrome/browser/automation/ui_controls_win.cc |
copy to chrome/browser/automation/ui_controls_internal_win.cc |
index 9385df5eb3591a3befbada2c7e26845d61550c74..76be27f6abaa0813dbf7f1ee81c91a32cf0ae685 100644 |
--- a/chrome/browser/automation/ui_controls_win.cc |
+++ b/chrome/browser/automation/ui_controls_internal_win.cc |
@@ -2,7 +2,7 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#include "chrome/browser/automation/ui_controls.h" |
+#include "chrome/browser/automation/ui_controls_internal.h" |
#include "base/bind.h" |
#include "base/callback.h" |
@@ -12,9 +12,6 @@ |
#include "base/task.h" |
#include "ui/base/keycodes/keyboard_codes.h" |
#include "ui/base/keycodes/keyboard_code_conversion_win.h" |
-#include "views/view.h" |
- |
-namespace ui_controls { |
namespace { |
@@ -165,6 +162,11 @@ bool SendKeyEvent(ui::KeyboardCode key, bool up) { |
return true; |
} |
+} // namespace |
+ |
+namespace ui_controls { |
+namespace internal { |
+ |
bool SendKeyPressImpl(ui::KeyboardCode key, |
bool control, bool shift, bool alt, |
const base::Closure& task) { |
@@ -325,62 +327,5 @@ bool SendMouseEventsImpl(MouseButton type, int state, |
return true; |
} |
-} // namespace |
- |
-// public functions ----------------------------------------------------------- |
- |
-bool SendKeyPress(gfx::NativeWindow window, |
- ui::KeyboardCode key, |
- bool control, |
- bool shift, |
- bool alt, |
- bool command) { |
- DCHECK(!command); // No command key on Windows |
- return SendKeyPressImpl(key, control, shift, alt, base::Closure()); |
-} |
- |
-bool SendKeyPressNotifyWhenDone(gfx::NativeWindow window, |
- ui::KeyboardCode key, |
- bool control, |
- bool shift, |
- bool alt, |
- bool command, |
- const base::Closure& task) { |
- DCHECK(!command); // No command key on Windows |
- return SendKeyPressImpl(key, control, shift, alt, task); |
-} |
- |
-bool SendMouseMove(long x, long y) { |
- return SendMouseMoveImpl(x, y, base::Closure()); |
-} |
- |
-bool SendMouseMoveNotifyWhenDone(long x, long y, const base::Closure& task) { |
- return SendMouseMoveImpl(x, y, task); |
-} |
- |
-bool SendMouseEvents(MouseButton type, int state) { |
- return SendMouseEventsImpl(type, state, base::Closure()); |
-} |
- |
-bool SendMouseEventsNotifyWhenDone(MouseButton type, int state, |
- const base::Closure& task) { |
- return SendMouseEventsImpl(type, state, task); |
-} |
- |
-bool SendMouseClick(MouseButton type) { |
- return SendMouseEventsImpl(type, UP | DOWN, base::Closure()); |
-} |
- |
-void MoveMouseToCenterAndPress(views::View* view, |
- MouseButton button, |
- int state, |
- const base::Closure& task) { |
- DCHECK(view); |
- DCHECK(view->GetWidget()); |
- gfx::Point view_center(view->width() / 2, view->height() / 2); |
- views::View::ConvertPointToScreen(view, &view_center); |
- SendMouseMove(view_center.x(), view_center.y()); |
- SendMouseEventsNotifyWhenDone(button, state, task); |
-} |
- |
-} // ui_controls |
+} // namespace internal |
+} // namespace ui_controls |