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_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 <memory> | 9 #include <memory> |
10 #include <string> | 10 #include <string> |
(...skipping 22 matching lines...) Expand all Loading... | |
33 struct MouseEvent; | 33 struct MouseEvent; |
34 class NavigationTracker; | 34 class NavigationTracker; |
35 class NonBlockingNavigationTracker; | 35 class NonBlockingNavigationTracker; |
36 class PageLoadStrategy; | 36 class PageLoadStrategy; |
37 class Status; | 37 class Status; |
38 | 38 |
39 class WebViewImpl : public WebView { | 39 class WebViewImpl : public WebView { |
40 public: | 40 public: |
41 WebViewImpl(const std::string& id, | 41 WebViewImpl(const std::string& id, |
42 const BrowserInfo* browser_info, | 42 const BrowserInfo* browser_info, |
43 std::unique_ptr<DevToolsClient> client); | |
44 WebViewImpl(const std::string& id, | |
45 const BrowserInfo* browser_info, | |
46 std::unique_ptr<DevToolsClient> client, | 43 std::unique_ptr<DevToolsClient> client, |
47 const DeviceMetrics* device_metrics, | 44 const DeviceMetrics* device_metrics, |
48 std::string page_load_strategy); | 45 std::string page_load_strategy, |
46 const bool w3c_compliant); | |
49 ~WebViewImpl() override; | 47 ~WebViewImpl() override; |
50 | 48 |
51 // Overridden from WebView: | 49 // Overridden from WebView: |
52 std::string GetId() override; | 50 std::string GetId() override; |
53 bool WasCrashed() override; | 51 bool WasCrashed() override; |
54 Status ConnectIfNecessary() override; | 52 Status ConnectIfNecessary() override; |
55 Status HandleReceivedEvents() override; | 53 Status HandleReceivedEvents() override; |
56 Status GetUrl(std::string* url) override; | 54 Status GetUrl(std::string* url) override; |
57 Status Load(const std::string& url, const Timeout* timeout) override; | 55 Status Load(const std::string& url, const Timeout* timeout) override; |
58 Status Reload(const Timeout* timeout) override; | 56 Status Reload(const Timeout* timeout) override; |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
104 Status EndProfile(std::unique_ptr<base::Value>* profile_data) override; | 102 Status EndProfile(std::unique_ptr<base::Value>* profile_data) override; |
105 Status SynthesizeTapGesture(int x, | 103 Status SynthesizeTapGesture(int x, |
106 int y, | 104 int y, |
107 int tap_count, | 105 int tap_count, |
108 bool is_long_press) override; | 106 bool is_long_press) override; |
109 Status SynthesizeScrollGesture(int x, | 107 Status SynthesizeScrollGesture(int x, |
110 int y, | 108 int y, |
111 int xoffset, | 109 int xoffset, |
112 int yoffset) override; | 110 int yoffset) override; |
113 Status SynthesizePinchGesture(int x, int y, double scale_factor) override; | 111 Status SynthesizePinchGesture(int x, int y, double scale_factor) override; |
112 //void SetW3CCompliant(const bool w3c_compliant) override; | |
samuong
2016/08/11 18:13:20
delete this line?
roisinmcl
2016/08/13 01:47:26
Done.
| |
114 | 113 |
115 private: | 114 private: |
116 Status TraverseHistoryWithJavaScript(int delta); | 115 Status TraverseHistoryWithJavaScript(int delta); |
117 Status CallAsyncFunctionInternal(const std::string& frame, | 116 Status CallAsyncFunctionInternal(const std::string& frame, |
118 const std::string& function, | 117 const std::string& function, |
119 const base::ListValue& args, | 118 const base::ListValue& args, |
120 bool is_user_supplied, | 119 bool is_user_supplied, |
121 const base::TimeDelta& timeout, | 120 const base::TimeDelta& timeout, |
122 std::unique_ptr<base::Value>* result); | 121 std::unique_ptr<base::Value>* result); |
123 Status IsNotPendingNavigation(const std::string& frame_id, | 122 Status IsNotPendingNavigation(const std::string& frame_id, |
124 const Timeout* timeout, | 123 const Timeout* timeout, |
125 bool* is_not_pending); | 124 bool* is_not_pending); |
126 | 125 |
127 Status InitProfileInternal(); | 126 Status InitProfileInternal(); |
128 Status StopProfileInternal(); | 127 Status StopProfileInternal(); |
129 | 128 |
130 std::string id_; | 129 std::string id_; |
130 bool w3c_compliant_; | |
131 const BrowserInfo* browser_info_; | 131 const BrowserInfo* browser_info_; |
132 std::unique_ptr<DomTracker> dom_tracker_; | 132 std::unique_ptr<DomTracker> dom_tracker_; |
133 std::unique_ptr<FrameTracker> frame_tracker_; | 133 std::unique_ptr<FrameTracker> frame_tracker_; |
134 std::unique_ptr<JavaScriptDialogManager> dialog_manager_; | 134 std::unique_ptr<JavaScriptDialogManager> dialog_manager_; |
135 std::unique_ptr<PageLoadStrategy> navigation_tracker_; | 135 std::unique_ptr<PageLoadStrategy> navigation_tracker_; |
136 std::unique_ptr<MobileEmulationOverrideManager> | 136 std::unique_ptr<MobileEmulationOverrideManager> |
137 mobile_emulation_override_manager_; | 137 mobile_emulation_override_manager_; |
138 std::unique_ptr<GeolocationOverrideManager> geolocation_override_manager_; | 138 std::unique_ptr<GeolocationOverrideManager> geolocation_override_manager_; |
139 std::unique_ptr<NetworkConditionsOverrideManager> | 139 std::unique_ptr<NetworkConditionsOverrideManager> |
140 network_conditions_override_manager_; | 140 network_conditions_override_manager_; |
(...skipping 22 matching lines...) Expand all Loading... | |
163 int context_id, | 163 int context_id, |
164 const std::string& expression, | 164 const std::string& expression, |
165 std::unique_ptr<base::Value>* result); | 165 std::unique_ptr<base::Value>* result); |
166 Status ParseCallFunctionResult(const base::Value& temp_result, | 166 Status ParseCallFunctionResult(const base::Value& temp_result, |
167 std::unique_ptr<base::Value>* result); | 167 std::unique_ptr<base::Value>* result); |
168 Status GetNodeIdFromFunction(DevToolsClient* client, | 168 Status GetNodeIdFromFunction(DevToolsClient* client, |
169 int context_id, | 169 int context_id, |
170 const std::string& function, | 170 const std::string& function, |
171 const base::ListValue& args, | 171 const base::ListValue& args, |
172 bool* found_node, | 172 bool* found_node, |
173 int* node_id); | 173 int* node_id, |
174 bool w3c_compliant); | |
174 | 175 |
175 } // namespace internal | 176 } // namespace internal |
176 | 177 |
177 #endif // CHROME_TEST_CHROMEDRIVER_CHROME_WEB_VIEW_IMPL_H_ | 178 #endif // CHROME_TEST_CHROMEDRIVER_CHROME_WEB_VIEW_IMPL_H_ |
OLD | NEW |