| 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 struct DeviceMetrics; | 24 struct DeviceMetrics; |
| 25 class DevToolsClient; | 25 class DevToolsClient; |
| 26 class DomTracker; | 26 class DomTracker; |
| 27 class FrameTracker; | 27 class FrameTracker; |
| 28 class GeolocationOverrideManager; | 28 class GeolocationOverrideManager; |
| 29 class MobileEmulationOverrideManager; | 29 class MobileEmulationOverrideManager; |
| 30 class NetworkConditionsOverrideManager; |
| 30 class HeapSnapshotTaker; | 31 class HeapSnapshotTaker; |
| 31 struct KeyEvent; | 32 struct KeyEvent; |
| 32 struct MouseEvent; | 33 struct MouseEvent; |
| 33 class NavigationTracker; | 34 class NavigationTracker; |
| 34 class Status; | 35 class Status; |
| 35 | 36 |
| 36 class WebViewImpl : public WebView { | 37 class WebViewImpl : public WebView { |
| 37 public: | 38 public: |
| 38 WebViewImpl(const std::string& id, | 39 WebViewImpl(const std::string& id, |
| 39 const BrowserInfo* browser_info, | 40 const BrowserInfo* browser_info, |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 Status DispatchKeyEvents(const std::list<KeyEvent>& events) override; | 81 Status DispatchKeyEvents(const std::list<KeyEvent>& events) override; |
| 81 Status GetCookies(scoped_ptr<base::ListValue>* cookies) override; | 82 Status GetCookies(scoped_ptr<base::ListValue>* cookies) override; |
| 82 Status DeleteCookie(const std::string& name, const std::string& url) override; | 83 Status DeleteCookie(const std::string& name, const std::string& url) override; |
| 83 Status WaitForPendingNavigations(const std::string& frame_id, | 84 Status WaitForPendingNavigations(const std::string& frame_id, |
| 84 const base::TimeDelta& timeout, | 85 const base::TimeDelta& timeout, |
| 85 bool stop_load_on_timeout) override; | 86 bool stop_load_on_timeout) override; |
| 86 Status IsPendingNavigation(const std::string& frame_id, | 87 Status IsPendingNavigation(const std::string& frame_id, |
| 87 bool* is_pending) override; | 88 bool* is_pending) override; |
| 88 JavaScriptDialogManager* GetJavaScriptDialogManager() override; | 89 JavaScriptDialogManager* GetJavaScriptDialogManager() override; |
| 89 Status OverrideGeolocation(const Geoposition& geoposition) override; | 90 Status OverrideGeolocation(const Geoposition& geoposition) override; |
| 91 Status OverrideNetworkConditions( |
| 92 const NetworkConditions& network_conditions) override; |
| 90 Status CaptureScreenshot(std::string* screenshot) override; | 93 Status CaptureScreenshot(std::string* screenshot) override; |
| 91 Status SetFileInputFiles(const std::string& frame, | 94 Status SetFileInputFiles(const std::string& frame, |
| 92 const base::DictionaryValue& element, | 95 const base::DictionaryValue& element, |
| 93 const std::vector<base::FilePath>& files) override; | 96 const std::vector<base::FilePath>& files) override; |
| 94 Status TakeHeapSnapshot(scoped_ptr<base::Value>* snapshot) override; | 97 Status TakeHeapSnapshot(scoped_ptr<base::Value>* snapshot) override; |
| 95 Status StartProfile() override; | 98 Status StartProfile() override; |
| 96 Status EndProfile(scoped_ptr<base::Value>* profile_data) override; | 99 Status EndProfile(scoped_ptr<base::Value>* profile_data) override; |
| 97 | 100 |
| 98 private: | 101 private: |
| 99 Status TraverseHistoryWithJavaScript(int delta); | 102 Status TraverseHistoryWithJavaScript(int delta); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 110 Status StopProfileInternal(); | 113 Status StopProfileInternal(); |
| 111 | 114 |
| 112 std::string id_; | 115 std::string id_; |
| 113 const BrowserInfo* browser_info_; | 116 const BrowserInfo* browser_info_; |
| 114 scoped_ptr<DomTracker> dom_tracker_; | 117 scoped_ptr<DomTracker> dom_tracker_; |
| 115 scoped_ptr<FrameTracker> frame_tracker_; | 118 scoped_ptr<FrameTracker> frame_tracker_; |
| 116 scoped_ptr<NavigationTracker> navigation_tracker_; | 119 scoped_ptr<NavigationTracker> navigation_tracker_; |
| 117 scoped_ptr<JavaScriptDialogManager> dialog_manager_; | 120 scoped_ptr<JavaScriptDialogManager> dialog_manager_; |
| 118 scoped_ptr<MobileEmulationOverrideManager> mobile_emulation_override_manager_; | 121 scoped_ptr<MobileEmulationOverrideManager> mobile_emulation_override_manager_; |
| 119 scoped_ptr<GeolocationOverrideManager> geolocation_override_manager_; | 122 scoped_ptr<GeolocationOverrideManager> geolocation_override_manager_; |
| 123 scoped_ptr<NetworkConditionsOverrideManager> |
| 124 network_conditions_override_manager_; |
| 120 scoped_ptr<HeapSnapshotTaker> heap_snapshot_taker_; | 125 scoped_ptr<HeapSnapshotTaker> heap_snapshot_taker_; |
| 121 scoped_ptr<DebuggerTracker> debugger_; | 126 scoped_ptr<DebuggerTracker> debugger_; |
| 122 scoped_ptr<DevToolsClient> client_; | 127 scoped_ptr<DevToolsClient> client_; |
| 123 }; | 128 }; |
| 124 | 129 |
| 125 namespace internal { | 130 namespace internal { |
| 126 | 131 |
| 127 enum EvaluateScriptReturnType { | 132 enum EvaluateScriptReturnType { |
| 128 ReturnByValue, | 133 ReturnByValue, |
| 129 ReturnByObject | 134 ReturnByObject |
| (...skipping 17 matching lines...) Expand all Loading... |
| 147 Status GetNodeIdFromFunction(DevToolsClient* client, | 152 Status GetNodeIdFromFunction(DevToolsClient* client, |
| 148 int context_id, | 153 int context_id, |
| 149 const std::string& function, | 154 const std::string& function, |
| 150 const base::ListValue& args, | 155 const base::ListValue& args, |
| 151 bool* found_node, | 156 bool* found_node, |
| 152 int* node_id); | 157 int* node_id); |
| 153 | 158 |
| 154 } // namespace internal | 159 } // namespace internal |
| 155 | 160 |
| 156 #endif // CHROME_TEST_CHROMEDRIVER_CHROME_WEB_VIEW_IMPL_H_ | 161 #endif // CHROME_TEST_CHROMEDRIVER_CHROME_WEB_VIEW_IMPL_H_ |
| OLD | NEW |