Index: chrome/browser/automation/testing_automation_provider_mac.mm |
=================================================================== |
--- chrome/browser/automation/testing_automation_provider_mac.mm (revision 137438) |
+++ chrome/browser/automation/testing_automation_provider_mac.mm (working copy) |
@@ -17,21 +17,6 @@ |
#include "grit/generated_resources.h" |
#include "ui/base/l10n/l10n_util_mac.h" |
-void TestingAutomationProvider::ActivateWindow(int handle) { |
- NOTIMPLEMENTED(); |
-} |
- |
-void TestingAutomationProvider::IsWindowMaximized(int handle, |
- bool* is_maximized, |
- bool* success) { |
- *success = false; |
- NSWindow* window = window_tracker_->GetResource(handle); |
- if (!window) |
- return; |
- *is_maximized = [window isZoomed]; |
- *success = true; |
-} |
- |
void TestingAutomationProvider::TerminateSession(int handle, bool* success) { |
*success = false; |
NOTIMPLEMENTED(); |
@@ -83,24 +68,6 @@ |
*success = true; |
} |
-void TestingAutomationProvider::GetWindowBounds(int handle, |
- gfx::Rect* bounds, |
- bool* success) { |
- *success = false; |
- NSWindow* window = window_tracker_->GetResource(handle); |
- if (window) { |
- // Move rect to reflect flipped coordinate system. |
- if ([[NSScreen screens] count] > 0) { |
- NSRect rect = [window frame]; |
- rect.origin.y = |
- [[[NSScreen screens] objectAtIndex:0] frame].size.height - |
- rect.origin.y - rect.size.height; |
- *bounds = gfx::Rect(NSRectToCGRect(rect)); |
- *success = true; |
- } |
- } |
-} |
- |
void TestingAutomationProvider::SetWindowBounds(int handle, |
const gfx::Rect& bounds, |
bool* success) { |
@@ -119,38 +86,3 @@ |
*success = true; |
} |
} |
- |
-void TestingAutomationProvider::SetWindowVisible(int handle, |
- bool visible, |
- bool* result) { |
- *result = false; |
- NSWindow* window = window_tracker_->GetResource(handle); |
- if (window) { |
- if (visible) { |
- [window orderFront:nil]; |
- } else { |
- [window orderOut:nil]; |
- } |
- *result = true; |
- } |
-} |
- |
-void TestingAutomationProvider::GetWindowTitle(int handle, string16* text) { |
- gfx::NativeWindow window = window_tracker_->GetResource(handle); |
- NSString* title = nil; |
- if ([[window delegate] isKindOfClass:[TabWindowController class]]) { |
- TabWindowController* delegate = |
- reinterpret_cast<TabWindowController*>([window delegate]); |
- title = [delegate activeTabTitle]; |
- } else { |
- title = [window title]; |
- } |
- // If we don't yet have a title, use "Untitled". |
- if (![title length]) { |
- text->assign(l10n_util::GetStringUTF16( |
- IDS_BROWSER_WINDOW_MAC_TAB_UNTITLED)); |
- return; |
- } |
- |
- text->assign(base::SysNSStringToUTF16(title)); |
-} |