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

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

Issue 802803002: [chromedriver] Include extension popups in list of windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 | « no previous file | no next file » | 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 d81d7d3e49e28e3a792aa5f8b2e3e07fb1f8b437..71ac288a821ff7f7675b95bf25c576548e75ed10 100644
--- a/chrome/test/chromedriver/chrome/chrome_impl.cc
+++ b/chrome/test/chromedriver/chrome/chrome_impl.cc
@@ -52,31 +52,33 @@ Status ChromeImpl::GetWebViewIds(std::list<std::string>* web_view_ids) {
// Check for newly-opened web views.
for (size_t i = 0; i < views_info.GetSize(); ++i) {
const WebViewInfo& view = views_info.Get(i);
- if (view.type != WebViewInfo::kPage && view.type != WebViewInfo::kApp)
- continue;
-
- bool found = false;
- for (WebViewList::const_iterator web_view_iter = web_views_.begin();
- web_view_iter != web_views_.end(); ++web_view_iter) {
- if ((*web_view_iter)->GetId() == view.id) {
- found = true;
- break;
+ if (view.type == WebViewInfo::kPage ||
+ view.type == WebViewInfo::kApp ||
+ (view.type == WebViewInfo::kOther &&
+ view.url.find("chrome-extension://") == 0)) {
+ bool found = false;
+ for (WebViewList::const_iterator web_view_iter = web_views_.begin();
+ web_view_iter != web_views_.end(); ++web_view_iter) {
+ if ((*web_view_iter)->GetId() == view.id) {
+ found = true;
+ break;
+ }
}
- }
- if (!found) {
- scoped_ptr<DevToolsClient> client(
- devtools_http_client_->CreateClient(view.id));
- for (ScopedVector<DevToolsEventListener>::const_iterator listener =
- devtools_event_listeners_.begin();
- listener != devtools_event_listeners_.end(); ++listener) {
- client->AddListener(*listener);
- // OnConnected will fire when DevToolsClient connects later.
+ if (!found) {
+ scoped_ptr<DevToolsClient> client(
+ devtools_http_client_->CreateClient(view.id));
+ for (ScopedVector<DevToolsEventListener>::const_iterator listener =
+ devtools_event_listeners_.begin();
+ listener != devtools_event_listeners_.end(); ++listener) {
+ client->AddListener(*listener);
+ // OnConnected will fire when DevToolsClient connects later.
+ }
+ web_views_.push_back(make_linked_ptr(new WebViewImpl(
+ view.id,
+ devtools_http_client_->browser_info(),
+ client.Pass(),
+ devtools_http_client_->device_metrics())));
}
- web_views_.push_back(make_linked_ptr(new WebViewImpl(
- view.id,
- devtools_http_client_->browser_info(),
- client.Pass(),
- devtools_http_client_->device_metrics())));
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698