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 <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 DeviceMetricsOverrideManager; | |
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, |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
76 virtual Status GetCookies(scoped_ptr<base::ListValue>* cookies) OVERRIDE; | 77 virtual Status GetCookies(scoped_ptr<base::ListValue>* cookies) OVERRIDE; |
77 virtual Status DeleteCookie(const std::string& name, | 78 virtual Status DeleteCookie(const std::string& name, |
78 const std::string& url) OVERRIDE; | 79 const std::string& url) OVERRIDE; |
79 virtual Status WaitForPendingNavigations(const std::string& frame_id, | 80 virtual Status WaitForPendingNavigations(const std::string& frame_id, |
80 const base::TimeDelta& timeout, | 81 const base::TimeDelta& timeout, |
81 bool stop_load_on_timeout) OVERRIDE; | 82 bool stop_load_on_timeout) OVERRIDE; |
82 virtual Status IsPendingNavigation( | 83 virtual Status IsPendingNavigation( |
83 const std::string& frame_id, bool* is_pending) OVERRIDE; | 84 const std::string& frame_id, bool* is_pending) OVERRIDE; |
84 virtual JavaScriptDialogManager* GetJavaScriptDialogManager() OVERRIDE; | 85 virtual JavaScriptDialogManager* GetJavaScriptDialogManager() OVERRIDE; |
85 virtual Status OverrideGeolocation(const Geoposition& geoposition) OVERRIDE; | 86 virtual Status OverrideGeolocation(const Geoposition& geoposition) OVERRIDE; |
87 virtual Status OverrideDeviceMetrics(const DeviceMetrics& device_metrics) OVER RIDE; | |
stgao
2014/04/30 03:32:55
Over 80 chars.
| |
86 virtual Status CaptureScreenshot(std::string* screenshot) OVERRIDE; | 88 virtual Status CaptureScreenshot(std::string* screenshot) OVERRIDE; |
87 virtual Status SetFileInputFiles( | 89 virtual Status SetFileInputFiles( |
88 const std::string& frame, | 90 const std::string& frame, |
89 const base::DictionaryValue& element, | 91 const base::DictionaryValue& element, |
90 const std::vector<base::FilePath>& files) OVERRIDE; | 92 const std::vector<base::FilePath>& files) OVERRIDE; |
91 virtual Status TakeHeapSnapshot(scoped_ptr<base::Value>* snapshot) OVERRIDE; | 93 virtual Status TakeHeapSnapshot(scoped_ptr<base::Value>* snapshot) OVERRIDE; |
92 | 94 |
93 private: | 95 private: |
94 Status CallAsyncFunctionInternal(const std::string& frame, | 96 Status CallAsyncFunctionInternal(const std::string& frame, |
95 const std::string& function, | 97 const std::string& function, |
96 const base::ListValue& args, | 98 const base::ListValue& args, |
97 bool is_user_supplied, | 99 bool is_user_supplied, |
98 const base::TimeDelta& timeout, | 100 const base::TimeDelta& timeout, |
99 scoped_ptr<base::Value>* result); | 101 scoped_ptr<base::Value>* result); |
100 Status IsNotPendingNavigation(const std::string& frame_id, | 102 Status IsNotPendingNavigation(const std::string& frame_id, |
101 bool* is_not_pending); | 103 bool* is_not_pending); |
102 std::string id_; | 104 std::string id_; |
103 const BrowserInfo* browser_info_; | 105 const BrowserInfo* browser_info_; |
104 scoped_ptr<DomTracker> dom_tracker_; | 106 scoped_ptr<DomTracker> dom_tracker_; |
105 scoped_ptr<FrameTracker> frame_tracker_; | 107 scoped_ptr<FrameTracker> frame_tracker_; |
106 scoped_ptr<NavigationTracker> navigation_tracker_; | 108 scoped_ptr<NavigationTracker> navigation_tracker_; |
107 scoped_ptr<JavaScriptDialogManager> dialog_manager_; | 109 scoped_ptr<JavaScriptDialogManager> dialog_manager_; |
108 scoped_ptr<GeolocationOverrideManager> geolocation_override_manager_; | 110 scoped_ptr<GeolocationOverrideManager> geolocation_override_manager_; |
111 scoped_ptr<DeviceMetricsOverrideManager> device_metrics_override_manager_; | |
109 scoped_ptr<HeapSnapshotTaker> heap_snapshot_taker_; | 112 scoped_ptr<HeapSnapshotTaker> heap_snapshot_taker_; |
110 scoped_ptr<DebuggerTracker> debugger_; | 113 scoped_ptr<DebuggerTracker> debugger_; |
111 scoped_ptr<DevToolsClient> client_; | 114 scoped_ptr<DevToolsClient> client_; |
112 }; | 115 }; |
113 | 116 |
114 namespace internal { | 117 namespace internal { |
115 | 118 |
116 enum EvaluateScriptReturnType { | 119 enum EvaluateScriptReturnType { |
117 ReturnByValue, | 120 ReturnByValue, |
118 ReturnByObject | 121 ReturnByObject |
(...skipping 17 matching lines...) Expand all Loading... | |
136 Status GetNodeIdFromFunction(DevToolsClient* client, | 139 Status GetNodeIdFromFunction(DevToolsClient* client, |
137 int context_id, | 140 int context_id, |
138 const std::string& function, | 141 const std::string& function, |
139 const base::ListValue& args, | 142 const base::ListValue& args, |
140 bool* found_node, | 143 bool* found_node, |
141 int* node_id); | 144 int* node_id); |
142 | 145 |
143 } // namespace internal | 146 } // namespace internal |
144 | 147 |
145 #endif // CHROME_TEST_CHROMEDRIVER_CHROME_WEB_VIEW_IMPL_H_ | 148 #endif // CHROME_TEST_CHROMEDRIVER_CHROME_WEB_VIEW_IMPL_H_ |
OLD | NEW |