Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(570)

Unified Diff: chrome/browser/automation/testing_automation_provider_mac.mm

Issue 10388175: Remove all the unnused automation IPCs. These were used by UI tests that have been converted to bro… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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));
-}

Powered by Google App Engine
This is Rietveld 408576698