OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_BROWSER_DEVTOOLS_DEVTOOLS_UI_BINDINGS_H_ | 5 #ifndef CHROME_BROWSER_DEVTOOLS_DEVTOOLS_UI_BINDINGS_H_ |
6 #define CHROME_BROWSER_DEVTOOLS_DEVTOOLS_UI_BINDINGS_H_ | 6 #define CHROME_BROWSER_DEVTOOLS_DEVTOOLS_UI_BINDINGS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 void HandleMessageFromDevToolsFrontendToBackend( | 88 void HandleMessageFromDevToolsFrontendToBackend( |
89 const std::string& message) override; | 89 const std::string& message) override; |
90 | 90 |
91 // content::DevToolsAgentHostClient implementation. | 91 // content::DevToolsAgentHostClient implementation. |
92 void DispatchProtocolMessage(content::DevToolsAgentHost* agent_host, | 92 void DispatchProtocolMessage(content::DevToolsAgentHost* agent_host, |
93 const std::string& message) override; | 93 const std::string& message) override; |
94 void AgentHostClosed(content::DevToolsAgentHost* agent_host, | 94 void AgentHostClosed(content::DevToolsAgentHost* agent_host, |
95 bool replaced_with_another_client) override; | 95 bool replaced_with_another_client) override; |
96 | 96 |
97 // DevToolsEmbedderMessageDispatcher::Delegate implementation. | 97 // DevToolsEmbedderMessageDispatcher::Delegate implementation. |
98 void ActivateWindow() override; | 98 void ActivateWindow(int request_id) override; |
99 void CloseWindow() override; | 99 void CloseWindow(int request_id) override; |
100 void LoadCompleted() override; | 100 void LoadCompleted(int request_id) override; |
101 void SetInspectedPageBounds(const gfx::Rect& rect) override; | 101 void SetInspectedPageBounds(int request_id, |
102 void InspectElementCompleted() override; | 102 const gfx::Rect& rect) override; |
103 void InspectedURLChanged(const std::string& url) override; | 103 void InspectElementCompleted(int request_id) override; |
104 void SetIsDocked(bool is_docked) override; | 104 void InspectedURLChanged(int request_id, const std::string& url) override; |
105 void OpenInNewTab(const std::string& url) override; | 105 void SetIsDocked(int request_id, bool is_docked) override; |
106 void SaveToFile(const std::string& url, | 106 void OpenInNewTab(int request_id, const std::string& url) override; |
| 107 void SaveToFile(int request_id, |
| 108 const std::string& url, |
107 const std::string& content, | 109 const std::string& content, |
108 bool save_as) override; | 110 bool save_as) override; |
109 void AppendToFile(const std::string& url, | 111 void AppendToFile(int request_id, |
| 112 const std::string& url, |
110 const std::string& content) override; | 113 const std::string& content) override; |
111 void RequestFileSystems() override; | 114 void RequestFileSystems(int request_id) override; |
112 void AddFileSystem() override; | 115 void AddFileSystem(int request_id) override; |
113 void RemoveFileSystem(const std::string& file_system_path) override; | 116 void RemoveFileSystem(int request_id, |
| 117 const std::string& file_system_path) override; |
114 void UpgradeDraggedFileSystemPermissions( | 118 void UpgradeDraggedFileSystemPermissions( |
| 119 int request_id, |
115 const std::string& file_system_url) override; | 120 const std::string& file_system_url) override; |
116 void IndexPath(int request_id, const std::string& file_system_path) override; | 121 void IndexPath(int request_id, |
117 void StopIndexing(int request_id) override; | 122 int index_request_id, |
| 123 const std::string& file_system_path) override; |
| 124 void StopIndexing(int request_id, int index_request_id) override; |
118 void SearchInPath(int request_id, | 125 void SearchInPath(int request_id, |
| 126 int search_request_id, |
119 const std::string& file_system_path, | 127 const std::string& file_system_path, |
120 const std::string& query) override; | 128 const std::string& query) override; |
121 void SetWhitelistedShortcuts(const std::string& message) override; | 129 void SetWhitelistedShortcuts(int request_id, |
122 void ZoomIn() override; | 130 const std::string& message) override; |
123 void ZoomOut() override; | 131 void ZoomIn(int request_id) override; |
124 void ResetZoom() override; | 132 void ZoomOut(int request_id) override; |
125 void OpenUrlOnRemoteDeviceAndInspect(const std::string& browser_id, | 133 void ResetZoom(int request_id) override; |
| 134 void OpenUrlOnRemoteDeviceAndInspect(int request_id, |
| 135 const std::string& browser_id, |
126 const std::string& url) override; | 136 const std::string& url) override; |
127 void SetDeviceCountUpdatesEnabled(bool enabled) override; | 137 void SetDeviceCountUpdatesEnabled(int request_id, bool enabled) override; |
128 void SetDevicesUpdatesEnabled(bool enabled) override; | 138 void SetDevicesUpdatesEnabled(int request_id, bool enabled) override; |
129 void SendMessageToBrowser(const std::string& message) override; | 139 void SendMessageToBrowser(int request_id, |
130 void RecordActionUMA(const std::string& name, int action) override; | 140 const std::string& message) override; |
| 141 void RecordActionUMA(int request_id, |
| 142 const std::string& name, |
| 143 int action) override; |
| 144 void SendJsonRequest(int request_id, |
| 145 const std::string& browser_id, |
| 146 const std::string& url) override; |
| 147 |
| 148 void JsonReceived(int message_id, |
| 149 int result, |
| 150 const std::string& message); |
131 | 151 |
132 void EnableRemoteDeviceCounter(bool enable); | 152 void EnableRemoteDeviceCounter(bool enable); |
133 | 153 |
134 // DevToolsAndroidBridge::DeviceCountListener override: | 154 // DevToolsAndroidBridge::DeviceCountListener override: |
135 void DeviceCountChanged(int count) override; | 155 void DeviceCountChanged(int count) override; |
136 | 156 |
137 // Forwards discovered devices to frontend. | 157 // Forwards discovered devices to frontend. |
138 virtual void DevicesUpdated(const std::string& source, | 158 virtual void DevicesUpdated(const std::string& source, |
139 const base::ListValue& targets); | 159 const base::ListValue& targets); |
140 | 160 |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 bool frontend_loaded_; | 210 bool frontend_loaded_; |
191 scoped_ptr<DevToolsTargetsUIHandler> remote_targets_handler_; | 211 scoped_ptr<DevToolsTargetsUIHandler> remote_targets_handler_; |
192 scoped_ptr<DevToolsEmbedderMessageDispatcher> embedder_message_dispatcher_; | 212 scoped_ptr<DevToolsEmbedderMessageDispatcher> embedder_message_dispatcher_; |
193 GURL url_; | 213 GURL url_; |
194 base::WeakPtrFactory<DevToolsUIBindings> weak_factory_; | 214 base::WeakPtrFactory<DevToolsUIBindings> weak_factory_; |
195 | 215 |
196 DISALLOW_COPY_AND_ASSIGN(DevToolsUIBindings); | 216 DISALLOW_COPY_AND_ASSIGN(DevToolsUIBindings); |
197 }; | 217 }; |
198 | 218 |
199 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_UI_BINDINGS_H_ | 219 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_UI_BINDINGS_H_ |
OLD | NEW |