| 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);
|
| }
|
| }
|
| }
|
|
|