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

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

Issue 251933005: [ChromeDriver] Support mobile emulation on desktop Chrome. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing review comments 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 class DevToolsClient; 24 class DevToolsClient;
25 class DomTracker; 25 class DomTracker;
26 class FrameTracker; 26 class FrameTracker;
27 class GeolocationOverrideManager; 27 class GeolocationOverrideManager;
28 class MobileEmulationOverrideManager;
28 class HeapSnapshotTaker; 29 class HeapSnapshotTaker;
29 struct KeyEvent; 30 struct KeyEvent;
30 struct MouseEvent; 31 struct MouseEvent;
31 class NavigationTracker; 32 class NavigationTracker;
32 class Status; 33 class Status;
33 34
34 class WebViewImpl : public WebView { 35 class WebViewImpl : public WebView {
35 public: 36 public:
36 WebViewImpl(const std::string& id, 37 WebViewImpl(const std::string& id,
37 const BrowserInfo* browser_info, 38 const BrowserInfo* browser_info,
38 scoped_ptr<DevToolsClient> client); 39 scoped_ptr<DevToolsClient> client);
40 WebViewImpl(const std::string& id,
41 const BrowserInfo* browser_info,
42 scoped_ptr<DevToolsClient> client,
43 const DeviceMetrics* device_metrics);
39 virtual ~WebViewImpl(); 44 virtual ~WebViewImpl();
40 45
41 // Overridden from WebView: 46 // Overridden from WebView:
42 virtual std::string GetId() OVERRIDE; 47 virtual std::string GetId() OVERRIDE;
43 virtual bool WasCrashed() OVERRIDE; 48 virtual bool WasCrashed() OVERRIDE;
44 virtual Status ConnectIfNecessary() OVERRIDE; 49 virtual Status ConnectIfNecessary() OVERRIDE;
45 virtual Status HandleReceivedEvents() OVERRIDE; 50 virtual Status HandleReceivedEvents() OVERRIDE;
46 virtual Status Load(const std::string& url) OVERRIDE; 51 virtual Status Load(const std::string& url) OVERRIDE;
47 virtual Status Reload() OVERRIDE; 52 virtual Status Reload() OVERRIDE;
48 virtual Status EvaluateScript(const std::string& frame, 53 virtual Status EvaluateScript(const std::string& frame,
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 const base::TimeDelta& timeout, 103 const base::TimeDelta& timeout,
99 scoped_ptr<base::Value>* result); 104 scoped_ptr<base::Value>* result);
100 Status IsNotPendingNavigation(const std::string& frame_id, 105 Status IsNotPendingNavigation(const std::string& frame_id,
101 bool* is_not_pending); 106 bool* is_not_pending);
102 std::string id_; 107 std::string id_;
103 const BrowserInfo* browser_info_; 108 const BrowserInfo* browser_info_;
104 scoped_ptr<DomTracker> dom_tracker_; 109 scoped_ptr<DomTracker> dom_tracker_;
105 scoped_ptr<FrameTracker> frame_tracker_; 110 scoped_ptr<FrameTracker> frame_tracker_;
106 scoped_ptr<NavigationTracker> navigation_tracker_; 111 scoped_ptr<NavigationTracker> navigation_tracker_;
107 scoped_ptr<JavaScriptDialogManager> dialog_manager_; 112 scoped_ptr<JavaScriptDialogManager> dialog_manager_;
113 scoped_ptr<MobileEmulationOverrideManager> mobile_emulation_override_manager_;
108 scoped_ptr<GeolocationOverrideManager> geolocation_override_manager_; 114 scoped_ptr<GeolocationOverrideManager> geolocation_override_manager_;
109 scoped_ptr<HeapSnapshotTaker> heap_snapshot_taker_; 115 scoped_ptr<HeapSnapshotTaker> heap_snapshot_taker_;
110 scoped_ptr<DebuggerTracker> debugger_; 116 scoped_ptr<DebuggerTracker> debugger_;
111 scoped_ptr<DevToolsClient> client_; 117 scoped_ptr<DevToolsClient> client_;
112 }; 118 };
113 119
114 namespace internal { 120 namespace internal {
115 121
116 enum EvaluateScriptReturnType { 122 enum EvaluateScriptReturnType {
117 ReturnByValue, 123 ReturnByValue,
(...skipping 18 matching lines...) Expand all
136 Status GetNodeIdFromFunction(DevToolsClient* client, 142 Status GetNodeIdFromFunction(DevToolsClient* client,
137 int context_id, 143 int context_id,
138 const std::string& function, 144 const std::string& function,
139 const base::ListValue& args, 145 const base::ListValue& args,
140 bool* found_node, 146 bool* found_node,
141 int* node_id); 147 int* node_id);
142 148
143 } // namespace internal 149 } // namespace internal
144 150
145 #endif // CHROME_TEST_CHROMEDRIVER_CHROME_WEB_VIEW_IMPL_H_ 151 #endif // CHROME_TEST_CHROMEDRIVER_CHROME_WEB_VIEW_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698