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

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

Issue 251933005: [ChromeDriver] Support mobile emulation on desktop Chrome. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Convert Capability to mobileEmulation; add integration- and unit-tests Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/test/chromedriver/chrome/chrome_desktop_impl.cc
diff --git a/chrome/test/chromedriver/chrome/chrome_desktop_impl.cc b/chrome/test/chromedriver/chrome/chrome_desktop_impl.cc
index 8cdd130114b43668f60e315487e0c682c3a70c4a..6582d1c7a7c5031d68f065f21f177e639a33e1ec 100644
--- a/chrome/test/chromedriver/chrome/chrome_desktop_impl.cc
+++ b/chrome/test/chromedriver/chrome/chrome_desktop_impl.cc
@@ -12,6 +12,7 @@
#include "base/threading/platform_thread.h"
#include "base/time/time.h"
#include "chrome/test/chromedriver/chrome/automation_extension.h"
+#include "chrome/test/chromedriver/chrome/device_metrics.h"
#include "chrome/test/chromedriver/chrome/devtools_client.h"
#include "chrome/test/chromedriver/chrome/devtools_http_client.h"
#include "chrome/test/chromedriver/chrome/status.h"
@@ -67,11 +68,13 @@ ChromeDesktopImpl::ChromeDesktopImpl(
scoped_ptr<PortReservation> port_reservation,
base::ProcessHandle process,
const CommandLine& command,
+ scoped_ptr<DeviceMetrics> device_metrics,
base::ScopedTempDir* user_data_dir,
base::ScopedTempDir* extension_dir)
: ChromeImpl(client.Pass(),
devtools_event_listeners,
- port_reservation.Pass()),
+ port_reservation.Pass(),
+ device_metrics.Pass()),
process_(process),
command_(command) {
if (user_data_dir->IsValid())
@@ -117,7 +120,8 @@ Status ChromeDesktopImpl::WaitForPageToLoad(const std::string& url,
scoped_ptr<WebView> web_view_tmp(
new WebViewImpl(id,
devtools_http_client_->browser_info(),
- devtools_http_client_->CreateClient(id)));
+ devtools_http_client_->CreateClient(id),
+ device_metrics_.get()));
Status status = web_view_tmp->ConnectIfNecessary();
if (status.IsError())
return status;

Powered by Google App Engine
This is Rietveld 408576698