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

Side by Side Diff: chrome/test/chromedriver/chrome/devtools_http_client.cc

Issue 2304433002: [chromedriver] Do not identify extension background pages by url scheme. (Closed)
Patch Set: Created 4 years, 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/test/chromedriver/chrome/devtools_http_client.h" 5 #include "chrome/test/chromedriver/chrome/devtools_http_client.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 return &browser_info_; 153 return &browser_info_;
154 } 154 }
155 155
156 const DeviceMetrics* DevToolsHttpClient::device_metrics() { 156 const DeviceMetrics* DevToolsHttpClient::device_metrics() {
157 return device_metrics_.get(); 157 return device_metrics_.get();
158 } 158 }
159 159
160 bool DevToolsHttpClient::IsBrowserWindow(const WebViewInfo& view) const { 160 bool DevToolsHttpClient::IsBrowserWindow(const WebViewInfo& view) const {
161 return base::ContainsKey(*window_types_, view.type) || 161 return base::ContainsKey(*window_types_, view.type) ||
162 (view.type == WebViewInfo::kOther && 162 (view.type == WebViewInfo::kOther &&
163 (base::StartsWith(view.url, "chrome-extension://", 163 (view.url == "chrome://print/" ||
164 base::CompareCase::SENSITIVE) ||
165 view.url == "chrome://print/" ||
166 view.url == "chrome://media-router/")); 164 view.url == "chrome://media-router/"));
167 } 165 }
168 166
169 Status DevToolsHttpClient::CloseFrontends(const std::string& for_client_id) { 167 Status DevToolsHttpClient::CloseFrontends(const std::string& for_client_id) {
170 WebViewsInfo views_info; 168 WebViewsInfo views_info;
171 Status status = GetWebViewsInfo(&views_info); 169 Status status = GetWebViewsInfo(&views_info);
172 if (status.IsError()) 170 if (status.IsError())
173 return status; 171 return status;
174 172
175 // Close frontends. Usually frontends are docked in the same page, although 173 // Close frontends. Usually frontends are docked in the same page, although
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 Status status = ParseType(type_as_string, &type); 304 Status status = ParseType(type_as_string, &type);
307 if (status.IsError()) 305 if (status.IsError())
308 return status; 306 return status;
309 temp_views_info.push_back(WebViewInfo(id, debugger_url, url, type)); 307 temp_views_info.push_back(WebViewInfo(id, debugger_url, url, type));
310 } 308 }
311 *views_info = WebViewsInfo(temp_views_info); 309 *views_info = WebViewsInfo(temp_views_info);
312 return Status(kOk); 310 return Status(kOk);
313 } 311 }
314 312
315 } // namespace internal 313 } // namespace internal
OLDNEW
« 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