OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/automation_provider.h" | 5 #include "chrome/browser/automation/automation_provider.h" |
6 | 6 |
7 #import <Cocoa/Cocoa.h> | 7 #import <Cocoa/Cocoa.h> |
8 #include "base/gfx/point.h" | 8 #include "base/gfx/point.h" |
9 #include "base/gfx/rect.h" | 9 #include "base/gfx/rect.h" |
| 10 #include "chrome/test/automation/automation_messages.h" |
10 | 11 |
11 void AutomationProvider::SetWindowBounds(int handle, const gfx::Rect& bounds, | 12 void AutomationProvider::SetWindowBounds(int handle, const gfx::Rect& bounds, |
12 bool* success) { | 13 bool* success) { |
13 *success = false; | 14 *success = false; |
14 NSWindow* window = window_tracker_->GetResource(handle); | 15 NSWindow* window = window_tracker_->GetResource(handle); |
15 if (window) { | 16 if (window) { |
16 NSRect new_bounds = NSRectFromCGRect(bounds.ToCGRect()); | 17 NSRect new_bounds = NSRectFromCGRect(bounds.ToCGRect()); |
17 | 18 |
18 // This is likely incorrect for a multiple-monitor setup; OK because this is | 19 // This is likely incorrect for a multiple-monitor setup; OK because this is |
19 // used only for testing purposes. | 20 // used only for testing purposes. |
(...skipping 25 matching lines...) Expand all Loading... |
45 gfx::Rect* bounds) { | 46 gfx::Rect* bounds) { |
46 // AutomationProxyVisibleTest claims that this is used only by Chrome Views | 47 // AutomationProxyVisibleTest claims that this is used only by Chrome Views |
47 // which we don't use on the Mac. Is this true? | 48 // which we don't use on the Mac. Is this true? |
48 | 49 |
49 *success = false; | 50 *success = false; |
50 NOTIMPLEMENTED(); | 51 NOTIMPLEMENTED(); |
51 } | 52 } |
52 | 53 |
53 void AutomationProvider::ActivateWindow(int handle) { NOTIMPLEMENTED(); } | 54 void AutomationProvider::ActivateWindow(int handle) { NOTIMPLEMENTED(); } |
54 | 55 |
| 56 void AutomationProvider::IsWindowMaximized(int handle, bool* is_maximized, |
| 57 bool* success) { |
| 58 *success = false; |
| 59 NOTIMPLEMENTED(); |
| 60 } |
| 61 |
55 void AutomationProvider::GetFocusedViewID(int handle, int* view_id) { | 62 void AutomationProvider::GetFocusedViewID(int handle, int* view_id) { |
56 NOTIMPLEMENTED(); | 63 NOTIMPLEMENTED(); |
57 } | 64 } |
58 | 65 |
59 void AutomationProvider::PrintAsync(int tab_handle) { | 66 void AutomationProvider::PrintAsync(int tab_handle) { |
60 NOTIMPLEMENTED(); | 67 NOTIMPLEMENTED(); |
61 } | 68 } |
62 | 69 |
63 void AutomationProvider::SetInitialFocus(const IPC::Message& message, | 70 void AutomationProvider::SetInitialFocus(const IPC::Message& message, |
64 int handle, bool reverse) { | 71 int handle, bool reverse) { |
65 NOTIMPLEMENTED(); | 72 NOTIMPLEMENTED(); |
66 } | 73 } |
67 | 74 |
68 void AutomationProvider::GetBookmarkBarVisibility(int handle, bool* visible, | 75 void AutomationProvider::GetBookmarkBarVisibility(int handle, bool* visible, |
69 bool* animating) { | 76 bool* animating) { |
70 *visible = false; | 77 *visible = false; |
71 *animating = false; | 78 *animating = false; |
72 NOTIMPLEMENTED(); | 79 NOTIMPLEMENTED(); |
73 } | 80 } |
| 81 |
| 82 void AutomationProvider::WindowSimulateDrag(int handle, |
| 83 std::vector<gfx::Point> drag_path, |
| 84 int flags, |
| 85 bool press_escape_en_route, |
| 86 IPC::Message* reply_message) { |
| 87 NOTIMPLEMENTED(); |
| 88 AutomationMsg_WindowDrag::WriteReplyParams(reply_message, false); |
| 89 Send(reply_message); |
| 90 } |
| 91 |
| 92 void AutomationProvider::TerminateSession(int handle, bool* success) { |
| 93 *success = false; |
| 94 NOTIMPLEMENTED(); |
| 95 } |
| 96 |
| 97 void AutomationProvider::GetWindowBounds(int handle, gfx::Rect* bounds, |
| 98 bool* result) { |
| 99 *result = false; |
| 100 NOTIMPLEMENTED(); |
| 101 } |
OLD | NEW |