OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #import <Cocoa/Cocoa.h> | 7 #import <Cocoa/Cocoa.h> |
8 #include <mach/mach_time.h> | 8 #include <mach/mach_time.h> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
374 // Converts the center position of the view into the coordinates accepted | 374 // Converts the center position of the view into the coordinates accepted |
375 // by SendMouseMoveNotifyWhenDone() method. | 375 // by SendMouseMoveNotifyWhenDone() method. |
376 NSRect bounds = [view bounds]; | 376 NSRect bounds = [view bounds]; |
377 NSPoint center = NSMakePoint(NSMidX(bounds), NSMidY(bounds)); | 377 NSPoint center = NSMakePoint(NSMidX(bounds), NSMidY(bounds)); |
378 center = [view convertPoint:center toView:nil]; | 378 center = [view convertPoint:center toView:nil]; |
379 center = [window convertBaseToScreen:center]; | 379 center = [window convertBaseToScreen:center]; |
380 center = NSMakePoint(center.x, [screen frame].size.height - center.y); | 380 center = NSMakePoint(center.x, [screen frame].size.height - center.y); |
381 | 381 |
382 SendMouseMoveNotifyWhenDone( | 382 SendMouseMoveNotifyWhenDone( |
383 center.x, center.y, | 383 center.x, center.y, |
384 base::Bind(&ui_controls::ClickTask, button, state, task)); | 384 base::Bind(&ui_controls::internal::ClickTask, button, state, task)); |
385 } | 385 } |
386 | 386 |
387 } // ui_controls | 387 } // ui_controls |
OLD | NEW |