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 #ifndef CHROME_TEST_CHROMEDRIVER_CHROME_WEB_VIEW_H_ | 5 #ifndef CHROME_TEST_CHROMEDRIVER_CHROME_WEB_VIEW_H_ |
6 #define CHROME_TEST_CHROMEDRIVER_CHROME_WEB_VIEW_H_ | 6 #define CHROME_TEST_CHROMEDRIVER_CHROME_WEB_VIEW_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 | 13 |
14 namespace base { | 14 namespace base { |
15 class DictionaryValue; | 15 class DictionaryValue; |
16 class FilePath; | 16 class FilePath; |
17 class ListValue; | 17 class ListValue; |
18 class TimeDelta; | 18 class TimeDelta; |
19 class Value; | 19 class Value; |
20 } | 20 } |
21 | 21 |
22 class DevToolsClient; | 22 class DevToolsClient; |
23 struct Geoposition; | 23 struct Geoposition; |
24 struct DeviceMetrics; | |
stgao
2014/04/30 03:32:55
Not in order.
sam.rawlins
2014/05/06 23:51:46
Done.
| |
24 class JavaScriptDialogManager; | 25 class JavaScriptDialogManager; |
25 struct KeyEvent; | 26 struct KeyEvent; |
26 struct MouseEvent; | 27 struct MouseEvent; |
27 struct TouchEvent; | 28 struct TouchEvent; |
28 class Status; | 29 class Status; |
29 | 30 |
30 class WebView { | 31 class WebView { |
31 public: | 32 public: |
32 virtual ~WebView() {} | 33 virtual ~WebView() {} |
33 | 34 |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
132 // Returns whether the frame is pending navigation. | 133 // Returns whether the frame is pending navigation. |
133 virtual Status IsPendingNavigation( | 134 virtual Status IsPendingNavigation( |
134 const std::string& frame_id, bool* is_pending) = 0; | 135 const std::string& frame_id, bool* is_pending) = 0; |
135 | 136 |
136 // Returns the JavaScriptDialogManager. Never null. | 137 // Returns the JavaScriptDialogManager. Never null. |
137 virtual JavaScriptDialogManager* GetJavaScriptDialogManager() = 0; | 138 virtual JavaScriptDialogManager* GetJavaScriptDialogManager() = 0; |
138 | 139 |
139 // Overrides normal geolocation with a given geoposition. | 140 // Overrides normal geolocation with a given geoposition. |
140 virtual Status OverrideGeolocation(const Geoposition& geoposition) = 0; | 141 virtual Status OverrideGeolocation(const Geoposition& geoposition) = 0; |
141 | 142 |
143 // Overrides normal device metrics with a given set of metrics. | |
144 virtual Status OverrideDeviceMetrics(const DeviceMetrics& device_metrics) = 0; | |
stgao
2014/05/03 00:15:20
Same as my comment in device_metrics_override_mana
sam.rawlins
2014/05/06 23:51:46
Done.
| |
145 | |
142 // Captures the visible portions of the web view as a base64-encoded PNG. | 146 // Captures the visible portions of the web view as a base64-encoded PNG. |
143 virtual Status CaptureScreenshot(std::string* screenshot) = 0; | 147 virtual Status CaptureScreenshot(std::string* screenshot) = 0; |
144 | 148 |
145 // Set files in a file input element. | 149 // Set files in a file input element. |
146 // |element| is the WebElement JSON Object of the input element. | 150 // |element| is the WebElement JSON Object of the input element. |
147 virtual Status SetFileInputFiles( | 151 virtual Status SetFileInputFiles( |
148 const std::string& frame, | 152 const std::string& frame, |
149 const base::DictionaryValue& element, | 153 const base::DictionaryValue& element, |
150 const std::vector<base::FilePath>& files) = 0; | 154 const std::vector<base::FilePath>& files) = 0; |
151 | 155 |
152 // Take a heap snapshot which can build up a graph of Javascript objects. | 156 // Take a heap snapshot which can build up a graph of Javascript objects. |
153 // A raw heap snapshot is in JSON format: | 157 // A raw heap snapshot is in JSON format: |
154 // 1. A meta data element "snapshot" about how to parse data elements. | 158 // 1. A meta data element "snapshot" about how to parse data elements. |
155 // 2. Data elements: "nodes", "edges", "strings". | 159 // 2. Data elements: "nodes", "edges", "strings". |
156 virtual Status TakeHeapSnapshot(scoped_ptr<base::Value>* snapshot) = 0; | 160 virtual Status TakeHeapSnapshot(scoped_ptr<base::Value>* snapshot) = 0; |
157 }; | 161 }; |
158 | 162 |
159 #endif // CHROME_TEST_CHROMEDRIVER_CHROME_WEB_VIEW_H_ | 163 #endif // CHROME_TEST_CHROMEDRIVER_CHROME_WEB_VIEW_H_ |
OLD | NEW |