OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "chrome/browser/automation/ui_controls.h" | 5 #include "chrome/browser/automation/ui_controls.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "base/ref_counted.h" | 9 #include "base/ref_counted.h" |
10 #include "base/task.h" | 10 #include "base/task.h" |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
293 | 293 |
294 } // namespace | 294 } // namespace |
295 | 295 |
296 // public functions ----------------------------------------------------------- | 296 // public functions ----------------------------------------------------------- |
297 | 297 |
298 bool SendKeyPress(gfx::NativeWindow window, wchar_t key, bool control, | 298 bool SendKeyPress(gfx::NativeWindow window, wchar_t key, bool control, |
299 bool shift, bool alt) { | 299 bool shift, bool alt) { |
300 return SendKeyPressImpl(key, control, shift, alt, NULL); | 300 return SendKeyPressImpl(key, control, shift, alt, NULL); |
301 } | 301 } |
302 | 302 |
303 bool SendKeyPressNotifyWhenDone(wchar_t key, bool control, bool shift, | 303 bool SendKeyPressNotifyWhenDone(gfx::NativeWindow window, wchar_t key, |
| 304 bool control, bool shift, |
304 bool alt, Task* task) { | 305 bool alt, Task* task) { |
305 return SendKeyPressImpl(key, control, shift, alt, task); | 306 return SendKeyPressImpl(key, control, shift, alt, task); |
306 } | 307 } |
307 | 308 |
308 bool SendKeyDown(wchar_t key) { | 309 bool SendKeyDown(wchar_t key) { |
309 return SendKeyEvent(key, false); | 310 return SendKeyEvent(key, false); |
310 } | 311 } |
311 | 312 |
312 bool SendKeyUp(wchar_t key) { | 313 bool SendKeyUp(wchar_t key) { |
313 return SendKeyEvent(key, true); | 314 return SendKeyEvent(key, true); |
(...skipping 24 matching lines...) Expand all Loading... |
338 int state, Task* task) { | 339 int state, Task* task) { |
339 DCHECK(view); | 340 DCHECK(view); |
340 DCHECK(view->GetWidget()); | 341 DCHECK(view->GetWidget()); |
341 gfx::Point view_center(view->width() / 2, view->height() / 2); | 342 gfx::Point view_center(view->width() / 2, view->height() / 2); |
342 views::View::ConvertPointToScreen(view, &view_center); | 343 views::View::ConvertPointToScreen(view, &view_center); |
343 SendMouseMove(view_center.x(), view_center.y()); | 344 SendMouseMove(view_center.x(), view_center.y()); |
344 SendMouseEventsNotifyWhenDone(button, state, task); | 345 SendMouseEventsNotifyWhenDone(button, state, task); |
345 } | 346 } |
346 | 347 |
347 } // ui_controls | 348 } // ui_controls |
OLD | NEW |