| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 | 8 |
| 9 #include "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
| 10 #include "app/l10n_util_mac.h" | 10 #include "app/l10n_util_mac.h" |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 coords = [window convertBaseToScreen:[tab convertPoint:NSZeroPoint | 82 coords = [window convertBaseToScreen:[tab convertPoint:NSZeroPoint |
| 83 toView:nil]]; | 83 toView:nil]]; |
| 84 } else { | 84 } else { |
| 85 coords = [tab convertPoint:NSZeroPoint toView:[window contentView]]; | 85 coords = [tab convertPoint:NSZeroPoint toView:[window contentView]]; |
| 86 } | 86 } |
| 87 // Flip coordinate system | 87 // Flip coordinate system |
| 88 coords.y = [[window screen] frame].size.height - coords.y; | 88 coords.y = [[window screen] frame].size.height - coords.y; |
| 89 *success = true; | 89 *success = true; |
| 90 } | 90 } |
| 91 | 91 |
| 92 void AutomationProvider::ActivateWindow(int handle) { NOTIMPLEMENTED(); } | |
| 93 | |
| 94 void AutomationProvider::IsWindowMaximized(int handle, bool* is_maximized, | |
| 95 bool* success) { | |
| 96 *success = false; | |
| 97 NOTIMPLEMENTED(); | |
| 98 } | |
| 99 | |
| 100 void AutomationProvider::PrintAsync(int tab_handle) { | 92 void AutomationProvider::PrintAsync(int tab_handle) { |
| 101 NOTIMPLEMENTED(); | 93 NOTIMPLEMENTED(); |
| 102 } | 94 } |
| 103 | 95 |
| 104 void AutomationProvider::WindowSimulateDrag(int handle, | 96 void AutomationProvider::WindowSimulateDrag(int handle, |
| 105 std::vector<gfx::Point> drag_path, | 97 std::vector<gfx::Point> drag_path, |
| 106 int flags, | 98 int flags, |
| 107 bool press_escape_en_route, | 99 bool press_escape_en_route, |
| 108 IPC::Message* reply_message) { | 100 IPC::Message* reply_message) { |
| 109 NOTIMPLEMENTED(); | 101 NOTIMPLEMENTED(); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 134 } | 126 } |
| 135 // If we don't yet have a title, use "Untitled". | 127 // If we don't yet have a title, use "Untitled". |
| 136 if (![title length]) { | 128 if (![title length]) { |
| 137 text->assign(l10n_util::GetStringUTF16( | 129 text->assign(l10n_util::GetStringUTF16( |
| 138 IDS_BROWSER_WINDOW_MAC_TAB_UNTITLED)); | 130 IDS_BROWSER_WINDOW_MAC_TAB_UNTITLED)); |
| 139 return; | 131 return; |
| 140 } | 132 } |
| 141 | 133 |
| 142 text->assign(base::SysNSStringToUTF16(title)); | 134 text->assign(base::SysNSStringToUTF16(title)); |
| 143 } | 135 } |
| OLD | NEW |