| OLD | NEW |
| 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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 | 151 |
| 152 const BrowserInfo* DevToolsHttpClient::browser_info() { | 152 const BrowserInfo* DevToolsHttpClient::browser_info() { |
| 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 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 (base::StartsWith(view.url, "chrome-extension://", |
| 164 base::CompareCase::SENSITIVE) || | 164 base::CompareCase::SENSITIVE) || |
| 165 view.url == "chrome://print/" || | 165 view.url == "chrome://print/" || |
| 166 view.url == "chrome://media-router/")); | 166 view.url == "chrome://media-router/")); |
| 167 } | 167 } |
| 168 | 168 |
| 169 Status DevToolsHttpClient::CloseFrontends(const std::string& for_client_id) { | 169 Status DevToolsHttpClient::CloseFrontends(const std::string& for_client_id) { |
| 170 WebViewsInfo views_info; | 170 WebViewsInfo views_info; |
| 171 Status status = GetWebViewsInfo(&views_info); | 171 Status status = GetWebViewsInfo(&views_info); |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 Status status = ParseType(type_as_string, &type); | 306 Status status = ParseType(type_as_string, &type); |
| 307 if (status.IsError()) | 307 if (status.IsError()) |
| 308 return status; | 308 return status; |
| 309 temp_views_info.push_back(WebViewInfo(id, debugger_url, url, type)); | 309 temp_views_info.push_back(WebViewInfo(id, debugger_url, url, type)); |
| 310 } | 310 } |
| 311 *views_info = WebViewsInfo(temp_views_info); | 311 *views_info = WebViewsInfo(temp_views_info); |
| 312 return Status(kOk); | 312 return Status(kOk); |
| 313 } | 313 } |
| 314 | 314 |
| 315 } // namespace internal | 315 } // namespace internal |
| OLD | NEW |