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

Unified Diff: chrome/browser/automation/testing_automation_provider_win.cc

Issue 3191015: GTTF: next batch of automation separation. (Closed)
Patch Set: tryservers Created 10 years, 4 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
« no previous file with comments | « chrome/browser/automation/testing_automation_provider_mac.mm ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/automation/testing_automation_provider_win.cc
diff --git a/chrome/browser/automation/testing_automation_provider_win.cc b/chrome/browser/automation/testing_automation_provider_win.cc
new file mode 100644
index 0000000000000000000000000000000000000000..dcb8b1c76c0e0c1bae8bd0ffd95dfd206c2622dd
--- /dev/null
+++ b/chrome/browser/automation/testing_automation_provider_win.cc
@@ -0,0 +1,30 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/automation/testing_automation_provider.h"
+
+#include <windows.h>
+
+#include "chrome/browser/automation/automation_window_tracker.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) {
+ *success = true;
+ WINDOWPLACEMENT window_placement;
+ GetWindowPlacement(hwnd, &window_placement);
+ *is_maximized = (window_placement.showCmd == SW_MAXIMIZE);
+ }
+}
+
« no previous file with comments | « chrome/browser/automation/testing_automation_provider_mac.mm ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698