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

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

Issue 288193004: [Chromedriver] Add Device Metrics override support to ChromeDriver via Capabilities (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/web_view_impl.cc
diff --git a/chrome/test/chromedriver/chrome/web_view_impl.cc b/chrome/test/chromedriver/chrome/web_view_impl.cc
index 052ceb45b8fe886bbe7d2d459ca5a78d468b63da..eb5b04e6d94e96178f68be97a26b1b32daafa0fb 100644
--- a/chrome/test/chromedriver/chrome/web_view_impl.cc
+++ b/chrome/test/chromedriver/chrome/web_view_impl.cc
@@ -21,6 +21,7 @@
#include "chrome/test/chromedriver/chrome/heap_snapshot_taker.h"
#include "chrome/test/chromedriver/chrome/javascript_dialog_manager.h"
#include "chrome/test/chromedriver/chrome/js.h"
+#include "chrome/test/chromedriver/chrome/mobile_emulation_override_manager.h"
#include "chrome/test/chromedriver/chrome/navigation_tracker.h"
#include "chrome/test/chromedriver/chrome/status.h"
#include "chrome/test/chromedriver/chrome/ui_events.h"
@@ -114,13 +115,16 @@ const char* GetAsString(KeyEventType type) {
WebViewImpl::WebViewImpl(const std::string& id,
const BrowserInfo* browser_info,
- scoped_ptr<DevToolsClient> client)
+ scoped_ptr<DevToolsClient> client,
+ const DeviceMetrics* device_metrics)
: id_(id),
browser_info_(browser_info),
dom_tracker_(new DomTracker(client.get())),
frame_tracker_(new FrameTracker(client.get())),
navigation_tracker_(new NavigationTracker(client.get(), browser_info)),
dialog_manager_(new JavaScriptDialogManager(client.get())),
+ mobile_emulation_override_manager_(
+ new MobileEmulationOverrideManager(client.get(), device_metrics)),
geolocation_override_manager_(
new GeolocationOverrideManager(client.get())),
heap_snapshot_taker_(new HeapSnapshotTaker(client.get())),

Powered by Google App Engine
This is Rietveld 408576698