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

Side by Side Diff: chrome/test/chromedriver/chrome/web_view_impl.h

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 unified diff | Download patch
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 #ifndef CHROME_TEST_CHROMEDRIVER_CHROME_WEB_VIEW_IMPL_H_ 5 #ifndef CHROME_TEST_CHROMEDRIVER_CHROME_WEB_VIEW_IMPL_H_
6 #define CHROME_TEST_CHROMEDRIVER_CHROME_WEB_VIEW_IMPL_H_ 6 #define CHROME_TEST_CHROMEDRIVER_CHROME_WEB_VIEW_IMPL_H_
7 7
8 #include <list> 8 #include <list>
9 #include <string> 9 #include <string>
10 10
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "chrome/test/chromedriver/chrome/web_view.h" 14 #include "chrome/test/chromedriver/chrome/web_view.h"
15 15
16 namespace base { 16 namespace base {
17 class DictionaryValue; 17 class DictionaryValue;
18 class ListValue; 18 class ListValue;
19 class Value; 19 class Value;
20 } 20 }
21 21
22 struct BrowserInfo; 22 struct BrowserInfo;
23 class DebuggerTracker; 23 class DebuggerTracker;
24 struct DeviceMetrics;
24 class DevToolsClient; 25 class DevToolsClient;
25 class DomTracker; 26 class DomTracker;
26 class FrameTracker; 27 class FrameTracker;
27 class GeolocationOverrideManager; 28 class GeolocationOverrideManager;
29 class MobileEmulationOverrideManager;
28 class HeapSnapshotTaker; 30 class HeapSnapshotTaker;
29 struct KeyEvent; 31 struct KeyEvent;
30 struct MouseEvent; 32 struct MouseEvent;
31 class NavigationTracker; 33 class NavigationTracker;
32 class Status; 34 class Status;
33 35
34 class WebViewImpl : public WebView { 36 class WebViewImpl : public WebView {
35 public: 37 public:
36 WebViewImpl(const std::string& id, 38 WebViewImpl(const std::string& id,
37 const BrowserInfo* browser_info, 39 const BrowserInfo* browser_info,
38 scoped_ptr<DevToolsClient> client); 40 scoped_ptr<DevToolsClient> client);
41 WebViewImpl(const std::string& id,
42 const BrowserInfo* browser_info,
43 scoped_ptr<DevToolsClient> client,
44 const DeviceMetrics* device_metrics);
39 virtual ~WebViewImpl(); 45 virtual ~WebViewImpl();
40 46
41 // Overridden from WebView: 47 // Overridden from WebView:
42 virtual std::string GetId() OVERRIDE; 48 virtual std::string GetId() OVERRIDE;
43 virtual bool WasCrashed() OVERRIDE; 49 virtual bool WasCrashed() OVERRIDE;
44 virtual Status ConnectIfNecessary() OVERRIDE; 50 virtual Status ConnectIfNecessary() OVERRIDE;
45 virtual Status HandleReceivedEvents() OVERRIDE; 51 virtual Status HandleReceivedEvents() OVERRIDE;
46 virtual Status Load(const std::string& url) OVERRIDE; 52 virtual Status Load(const std::string& url) OVERRIDE;
47 virtual Status Reload() OVERRIDE; 53 virtual Status Reload() OVERRIDE;
48 virtual Status EvaluateScript(const std::string& frame, 54 virtual Status EvaluateScript(const std::string& frame,
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 const base::TimeDelta& timeout, 104 const base::TimeDelta& timeout,
99 scoped_ptr<base::Value>* result); 105 scoped_ptr<base::Value>* result);
100 Status IsNotPendingNavigation(const std::string& frame_id, 106 Status IsNotPendingNavigation(const std::string& frame_id,
101 bool* is_not_pending); 107 bool* is_not_pending);
102 std::string id_; 108 std::string id_;
103 const BrowserInfo* browser_info_; 109 const BrowserInfo* browser_info_;
104 scoped_ptr<DomTracker> dom_tracker_; 110 scoped_ptr<DomTracker> dom_tracker_;
105 scoped_ptr<FrameTracker> frame_tracker_; 111 scoped_ptr<FrameTracker> frame_tracker_;
106 scoped_ptr<NavigationTracker> navigation_tracker_; 112 scoped_ptr<NavigationTracker> navigation_tracker_;
107 scoped_ptr<JavaScriptDialogManager> dialog_manager_; 113 scoped_ptr<JavaScriptDialogManager> dialog_manager_;
114 scoped_ptr<MobileEmulationOverrideManager> mobile_emulation_override_manager_;
108 scoped_ptr<GeolocationOverrideManager> geolocation_override_manager_; 115 scoped_ptr<GeolocationOverrideManager> geolocation_override_manager_;
109 scoped_ptr<HeapSnapshotTaker> heap_snapshot_taker_; 116 scoped_ptr<HeapSnapshotTaker> heap_snapshot_taker_;
110 scoped_ptr<DebuggerTracker> debugger_; 117 scoped_ptr<DebuggerTracker> debugger_;
111 scoped_ptr<DevToolsClient> client_; 118 scoped_ptr<DevToolsClient> client_;
112 }; 119 };
113 120
114 namespace internal { 121 namespace internal {
115 122
116 enum EvaluateScriptReturnType { 123 enum EvaluateScriptReturnType {
117 ReturnByValue, 124 ReturnByValue,
(...skipping 18 matching lines...) Expand all
136 Status GetNodeIdFromFunction(DevToolsClient* client, 143 Status GetNodeIdFromFunction(DevToolsClient* client,
137 int context_id, 144 int context_id,
138 const std::string& function, 145 const std::string& function,
139 const base::ListValue& args, 146 const base::ListValue& args,
140 bool* found_node, 147 bool* found_node,
141 int* node_id); 148 int* node_id);
142 149
143 } // namespace internal 150 } // namespace internal
144 151
145 #endif // CHROME_TEST_CHROMEDRIVER_CHROME_WEB_VIEW_IMPL_H_ 152 #endif // CHROME_TEST_CHROMEDRIVER_CHROME_WEB_VIEW_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698