diff options
Diffstat (limited to 'chrome/browser/automation/testing_automation_provider_win.cc')
-rw-r--r-- | chrome/browser/automation/testing_automation_provider_win.cc | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/chrome/browser/automation/testing_automation_provider_win.cc b/chrome/browser/automation/testing_automation_provider_win.cc index 408b226..cd0a77f 100644 --- a/chrome/browser/automation/testing_automation_provider_win.cc +++ b/chrome/browser/automation/testing_automation_provider_win.cc @@ -13,28 +13,6 @@ #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser_window.h" -void TestingAutomationProvider::ActivateWindow(int handle) { - if (window_tracker_->ContainsHandle(handle)) { - ::SetActiveWindow(window_tracker_->GetResource(handle)); - } -} - -void TestingAutomationProvider::IsWindowMaximized(int handle, - bool* is_maximized, - bool* success) { - *success = false; - - HWND hwnd = window_tracker_->GetResource(handle); - if (hwnd) { - WINDOWPLACEMENT window_placement; - window_placement.length = sizeof(window_placement); - if (GetWindowPlacement(hwnd, &window_placement)) { - *success = true; - *is_maximized = (window_placement.showCmd == SW_MAXIMIZE); - } - } -} - void TestingAutomationProvider::TerminateSession(int handle, bool* success) { *success = false; @@ -45,21 +23,6 @@ void TestingAutomationProvider::TerminateSession(int handle, bool* success) { } } -void TestingAutomationProvider::GetWindowBounds(int handle, - gfx::Rect* bounds, - bool* success) { - *success = false; - HWND hwnd = window_tracker_->GetResource(handle); - if (hwnd) { - WINDOWPLACEMENT window_placement; - window_placement.length = sizeof(window_placement); - if (GetWindowPlacement(hwnd, &window_placement)) { - *success = true; - *bounds = window_placement.rcNormalPosition; - } - } -} - void TestingAutomationProvider::SetWindowBounds(int handle, const gfx::Rect& bounds, bool* success) { @@ -72,25 +35,3 @@ void TestingAutomationProvider::SetWindowBounds(int handle, } } } - -void TestingAutomationProvider::SetWindowVisible(int handle, - bool visible, - bool* result) { - if (window_tracker_->ContainsHandle(handle)) { - HWND hwnd = window_tracker_->GetResource(handle); - ::ShowWindow(hwnd, visible ? SW_SHOW : SW_HIDE); - *result = true; - } else { - *result = false; - } -} - -void TestingAutomationProvider::GetWindowTitle(int handle, string16* text) { - gfx::NativeWindow window = window_tracker_->GetResource(handle); - int length = ::GetWindowTextLength(window) + 1; - if (length > 1) - ::GetWindowText(window, WriteInto(text, length), length); - else - text->clear(); -} - |