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

Unified Diff: chrome/test/automation/browser_proxy.cc

Issue 329040: Take 2 at this. The only change between this and the first is to add the GetT... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 2 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/test/automation/browser_proxy.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/automation/browser_proxy.cc
===================================================================
--- chrome/test/automation/browser_proxy.cc (revision 30237)
+++ chrome/test/automation/browser_proxy.cc (working copy)
@@ -175,6 +175,39 @@
return succeeded;
}
+bool BrowserProxy::GetType(Type* type) const {
+ if (!is_valid())
+ return false;
+
+ if (!type) {
+ NOTREACHED();
+ return false;
+ }
+
+ int type_as_int;
+ bool succeeded = sender_->SendWithTimeout(new AutomationMsg_Type(
+ 0, handle_, &type_as_int), base::kNoTimeout, NULL);
+
+ switch (type_as_int) {
+ case 0:
+ *type = TYPE_NORMAL;
+ break;
+ case 1:
+ *type = TYPE_POPUP;
+ break;
+ case 2:
+ *type = TYPE_APP;
+ break;
+ case 3:
+ *type = TYPE_APP_POPUP;
+ break;
+ default:
+ return false;
+ }
+
+ return succeeded;
+}
+
bool BrowserProxy::ApplyAccelerator(int id) {
return RunCommandAsync(id);
}
« no previous file with comments | « chrome/test/automation/browser_proxy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698