OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_WINDOW_H_ | 5 #ifndef CHROME_BROWSER_DEVTOOLS_DEVTOOLS_WINDOW_H_ |
6 #define CHROME_BROWSER_DEVTOOLS_DEVTOOLS_WINDOW_H_ | 6 #define CHROME_BROWSER_DEVTOOLS_DEVTOOLS_WINDOW_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 GetJavaScriptDialogManager() OVERRIDE; | 173 GetJavaScriptDialogManager() OVERRIDE; |
174 virtual content::ColorChooser* OpenColorChooser( | 174 virtual content::ColorChooser* OpenColorChooser( |
175 content::WebContents* web_contents, | 175 content::WebContents* web_contents, |
176 SkColor color) OVERRIDE; | 176 SkColor color) OVERRIDE; |
177 virtual void RunFileChooser( | 177 virtual void RunFileChooser( |
178 content::WebContents* web_contents, | 178 content::WebContents* web_contents, |
179 const content::FileChooserParams& params) OVERRIDE; | 179 const content::FileChooserParams& params) OVERRIDE; |
180 virtual void WebContentsFocused(content::WebContents* contents) OVERRIDE; | 180 virtual void WebContentsFocused(content::WebContents* contents) OVERRIDE; |
181 | 181 |
182 // content::DevToolsFrontendHostDelegate: | 182 // content::DevToolsFrontendHostDelegate: |
183 virtual void ActivateWindow() OVERRIDE; | 183 virtual void DispatchOnFrontendHost(const std::string& message) OVERRIDE; |
184 virtual void ChangeAttachedWindowHeight(unsigned height) OVERRIDE; | 184 |
185 virtual void CloseWindow() OVERRIDE; | 185 typedef base::Callback<bool(const base::ListValue&)> FrontendMessageHandler; |
186 virtual void MoveWindow(int x, int y) OVERRIDE; | 186 void RegisterFrontendMessageHandler(const std::string& method, |
187 virtual void SetDockSide(const std::string& side) OVERRIDE; | 187 const FrontendMessageHandler& handler); |
188 virtual void OpenInNewTab(const std::string& url) OVERRIDE; | 188 |
189 virtual void SaveToFile(const std::string& url, | 189 // Frontend message handlers: |
190 const std::string& content, | 190 void ActivateWindow(); |
191 bool save_as) OVERRIDE; | 191 void CloseWindow(); |
192 virtual void AppendToFile(const std::string& url, | 192 void MoveWindow(int x, int y); |
193 const std::string& content) OVERRIDE; | 193 void SetDockSide(const std::string& side); |
194 virtual void RequestFileSystems() OVERRIDE; | 194 void OpenInNewTab(const std::string& url); |
195 virtual void AddFileSystem() OVERRIDE; | 195 void SaveToFile(const std::string& url, |
196 virtual void RemoveFileSystem(const std::string& file_system_path) OVERRIDE; | 196 const std::string& content, |
197 virtual void IndexPath(int request_id, | 197 bool save_as); |
198 const std::string& file_system_path) OVERRIDE; | 198 void AppendToFile(const std::string& url, |
199 virtual void StopIndexing(int request_id) OVERRIDE; | 199 const std::string& content); |
200 virtual void SearchInPath(int request_id, | 200 void RequestFileSystems(); |
201 const std::string& file_system_path, | 201 void AddFileSystem(); |
202 const std::string& query) OVERRIDE; | 202 void RemoveFileSystem(const std::string& file_system_path); |
| 203 void IndexPath(int request_id, |
| 204 const std::string& file_system_path); |
| 205 void StopIndexing(int request_id); |
| 206 void SearchInPath(int request_id, |
| 207 const std::string& file_system_path, |
| 208 const std::string& query); |
203 | 209 |
204 // DevToolsFileHelper callbacks. | 210 // DevToolsFileHelper callbacks. |
205 void FileSavedAs(const std::string& url); | 211 void FileSavedAs(const std::string& url); |
206 void AppendedTo(const std::string& url); | 212 void AppendedTo(const std::string& url); |
207 void FileSystemsLoaded( | 213 void FileSystemsLoaded( |
208 const std::vector<DevToolsFileHelper::FileSystem>& file_systems); | 214 const std::vector<DevToolsFileHelper::FileSystem>& file_systems); |
209 void FileSystemAdded(const DevToolsFileHelper::FileSystem& file_system); | 215 void FileSystemAdded(const DevToolsFileHelper::FileSystem& file_system); |
210 void IndexingTotalWorkCalculated(int request_id, | 216 void IndexingTotalWorkCalculated(int request_id, |
211 const std::string& file_system_path, | 217 const std::string& file_system_path, |
212 int total_work); | 218 int total_work); |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 scoped_ptr<DevToolsFileHelper> file_helper_; | 262 scoped_ptr<DevToolsFileHelper> file_helper_; |
257 scoped_refptr<DevToolsFileSystemIndexer> file_system_indexer_; | 263 scoped_refptr<DevToolsFileSystemIndexer> file_system_indexer_; |
258 typedef std::map< | 264 typedef std::map< |
259 int, | 265 int, |
260 scoped_refptr<DevToolsFileSystemIndexer::FileSystemIndexingJob> > | 266 scoped_refptr<DevToolsFileSystemIndexer::FileSystemIndexingJob> > |
261 IndexingJobsMap; | 267 IndexingJobsMap; |
262 IndexingJobsMap indexing_jobs_; | 268 IndexingJobsMap indexing_jobs_; |
263 int width_; | 269 int width_; |
264 int height_; | 270 int height_; |
265 DevToolsDockSide dock_side_before_minimized_; | 271 DevToolsDockSide dock_side_before_minimized_; |
| 272 typedef std::map<std::string, FrontendMessageHandler> |
| 273 FrontendMessageHandlerMap; |
| 274 FrontendMessageHandlerMap frontend_message_handlers_; |
| 275 |
| 276 // scoped_ptr<FrontendHostDispatcher> frontend_host_dispatcher_; |
266 | 277 |
267 DISALLOW_COPY_AND_ASSIGN(DevToolsWindow); | 278 DISALLOW_COPY_AND_ASSIGN(DevToolsWindow); |
268 }; | 279 }; |
269 | 280 |
270 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_WINDOW_H_ | 281 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_WINDOW_H_ |
OLD | NEW |