| 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/chrome_desktop_impl.h" | 5 #include "chrome/test/chromedriver/chrome/chrome_desktop_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 if (type == WebViewInfo::Type::kApp || | 140 if (type == WebViewInfo::Type::kApp || |
| 141 type == WebViewInfo::Type::kBackgroundPage) { | 141 type == WebViewInfo::Type::kBackgroundPage) { |
| 142 // Apps and extensions don't work on Android, so it doesn't make sense to | 142 // Apps and extensions don't work on Android, so it doesn't make sense to |
| 143 // provide override device metrics in mobile emulation mode, and can also | 143 // provide override device metrics in mobile emulation mode, and can also |
| 144 // potentially crash the renderer, for more details see: | 144 // potentially crash the renderer, for more details see: |
| 145 // https://code.google.com/p/chromedriver/issues/detail?id=1205 | 145 // https://code.google.com/p/chromedriver/issues/detail?id=1205 |
| 146 device_metrics = nullptr; | 146 device_metrics = nullptr; |
| 147 } | 147 } |
| 148 std::unique_ptr<WebView> web_view_tmp( | 148 std::unique_ptr<WebView> web_view_tmp( |
| 149 new WebViewImpl(id, devtools_http_client_->browser_info(), | 149 new WebViewImpl(id, devtools_http_client_->browser_info(), |
| 150 devtools_http_client_->CreateClient(id), device_metrics)); | 150 devtools_http_client_->CreateClient(id), device_metrics, |
| 151 page_load_strategy())); |
| 151 Status status = web_view_tmp->ConnectIfNecessary(); | 152 Status status = web_view_tmp->ConnectIfNecessary(); |
| 152 if (status.IsError()) | 153 if (status.IsError()) |
| 153 return status; | 154 return status; |
| 154 | 155 |
| 155 status = web_view_tmp->WaitForPendingNavigations( | 156 status = web_view_tmp->WaitForPendingNavigations( |
| 156 std::string(), timeout, false); | 157 std::string(), timeout, false); |
| 157 if (status.IsOk()) | 158 if (status.IsOk()) |
| 158 *web_view = std::move(web_view_tmp); | 159 *web_view = std::move(web_view_tmp); |
| 159 return status; | 160 return status; |
| 160 } | 161 } |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 } | 215 } |
| 215 | 216 |
| 216 int ChromeDesktopImpl::GetNetworkConnection() const { | 217 int ChromeDesktopImpl::GetNetworkConnection() const { |
| 217 return network_connection_; | 218 return network_connection_; |
| 218 } | 219 } |
| 219 | 220 |
| 220 void ChromeDesktopImpl::SetNetworkConnection( | 221 void ChromeDesktopImpl::SetNetworkConnection( |
| 221 int network_connection) { | 222 int network_connection) { |
| 222 network_connection_ = network_connection; | 223 network_connection_ = network_connection; |
| 223 } | 224 } |
| OLD | NEW |