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

Unified Diff: chrome/test/chromedriver/chrome/chrome_impl.cc

Issue 1196663005: [chromedriver] When launching a Chrome App, automatically switch to the new window. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add copyright message to test app background.js Created 5 years, 6 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/chromedriver/chrome/chrome_impl.h ('k') | chrome/test/chromedriver/session_commands.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/chromedriver/chrome/chrome_impl.cc
diff --git a/chrome/test/chromedriver/chrome/chrome_impl.cc b/chrome/test/chromedriver/chrome/chrome_impl.cc
index aedea8df69617fab05b82a76ab56655601fba19c..10bb666492595acf889c5fd2af2d010c013cd56b 100644
--- a/chrome/test/chromedriver/chrome/chrome_impl.cc
+++ b/chrome/test/chromedriver/chrome/chrome_impl.cc
@@ -4,6 +4,7 @@
#include "chrome/test/chromedriver/chrome/chrome_impl.h"
+#include "base/bind.h"
#include "chrome/test/chromedriver/chrome/devtools_client.h"
#include "chrome/test/chromedriver/chrome/devtools_event_listener.h"
#include "chrome/test/chromedriver/chrome/devtools_http_client.h"
@@ -11,6 +12,13 @@
#include "chrome/test/chromedriver/chrome/web_view_impl.h"
#include "chrome/test/chromedriver/net/port_server.h"
+namespace {
+
+void DoNothingWithWebViewInfo(const WebViewInfo& view) {
+}
+
+} // namespace
+
ChromeImpl::~ChromeImpl() {
if (!quit_)
port_reservation_->Leak();
@@ -34,6 +42,12 @@ bool ChromeImpl::HasCrashedWebView() {
}
Status ChromeImpl::GetWebViewIds(std::list<std::string>* web_view_ids) {
+ WebViewCallback callback = base::Bind(&DoNothingWithWebViewInfo);
+ return UpdateWebViewIds(web_view_ids, callback);
+}
+
+Status ChromeImpl::UpdateWebViewIds(std::list<std::string>* web_view_ids,
+ const WebViewCallback& on_open_web_view) {
WebViewsInfo views_info;
Status status = devtools_http_client_->GetWebViewsInfo(&views_info);
if (status.IsError())
@@ -79,6 +93,7 @@ Status ChromeImpl::GetWebViewIds(std::list<std::string>* web_view_ids) {
devtools_http_client_->browser_info(),
client.Pass(),
devtools_http_client_->device_metrics())));
+ on_open_web_view.Run(view);
}
}
}
« no previous file with comments | « chrome/test/chromedriver/chrome/chrome_impl.h ('k') | chrome/test/chromedriver/session_commands.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698