| 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 CONTENT_PUBLIC_BROWSER_DEVTOOLS_FRONTEND_HOST_DELEGATE_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_DEVTOOLS_FRONTEND_HOST_DELEGATE_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_DEVTOOLS_FRONTEND_HOST_DELEGATE_H_ | 6 #define CONTENT_PUBLIC_BROWSER_DEVTOOLS_FRONTEND_HOST_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 namespace content { | 10 namespace content { |
| 11 | 11 |
| 12 // Clients that want to use default DevTools front-end implementation should | 12 // Clients that want to use default DevTools front-end implementation should |
| 13 // implement this interface to provide access to the embedding browser from | 13 // implement this interface to provide access to the embedding browser from |
| 14 // the front-end. | 14 // the front-end. |
| 15 class DevToolsFrontendHostDelegate { | 15 class DevToolsFrontendHostDelegate { |
| 16 public: | 16 public: |
| 17 virtual ~DevToolsFrontendHostDelegate() {} | 17 virtual ~DevToolsFrontendHostDelegate() {} |
| 18 | 18 |
| 19 // Should bring DevTools window to front. | 19 // Dispatch the message from the frontend to the frontend host. |
| 20 virtual void ActivateWindow() = 0; | 20 virtual void DispatchOnFrontendHost(const std::string& message) = 0; |
| 21 | |
| 22 // Changes the height of attached DevTools window. | |
| 23 virtual void ChangeAttachedWindowHeight(unsigned height) = 0; | |
| 24 | |
| 25 // Closes DevTools front-end window. | |
| 26 virtual void CloseWindow() = 0; | |
| 27 | |
| 28 // Moves DevTools front-end window. | |
| 29 virtual void MoveWindow(int x, int y) = 0; | |
| 30 | |
| 31 // Specifies side for devtools to dock to. | |
| 32 virtual void SetDockSide(const std::string& side) = 0; | |
| 33 | |
| 34 // Opens given |url| in a new contents. | |
| 35 virtual void OpenInNewTab(const std::string& url) = 0; | |
| 36 | |
| 37 // Saves given |content| associated with the given |url|. Optionally showing | |
| 38 // Save As dialog. | |
| 39 virtual void SaveToFile(const std::string& url, | |
| 40 const std::string& content, | |
| 41 bool save_as) = 0; | |
| 42 | |
| 43 // Appends given |content| to the file that has been associated with the | |
| 44 // given |url| by SaveToFile method. | |
| 45 virtual void AppendToFile(const std::string& url, | |
| 46 const std::string& content) = 0; | |
| 47 | |
| 48 // Requests the list of filesystems previously added for devtools. | |
| 49 virtual void RequestFileSystems() = 0; | |
| 50 | |
| 51 // Shows a dialog to select a folder to which an isolated filesystem is added. | |
| 52 virtual void AddFileSystem() = 0; | |
| 53 | |
| 54 // Removes a previously added devtools filesystem given by |file_system_path|. | |
| 55 virtual void RemoveFileSystem(const std::string& file_system_path) = 0; | |
| 56 | |
| 57 // Performs file system indexing for given |file_system_path| and sends | |
| 58 // progress callbacks. | |
| 59 virtual void IndexPath(int request_id, | |
| 60 const std::string& file_system_path) = 0; | |
| 61 | |
| 62 // Stops file system indexing. | |
| 63 virtual void StopIndexing(int request_id) = 0; | |
| 64 | |
| 65 // Performs trigram search for given |query| in |file_system_path|. | |
| 66 virtual void SearchInPath(int request_id, | |
| 67 const std::string& file_system_path, | |
| 68 const std::string& query) = 0; | |
| 69 | 21 |
| 70 // This method is called when the contents inspected by this devtools frontend | 22 // This method is called when the contents inspected by this devtools frontend |
| 71 // is closing. | 23 // is closing. |
| 72 virtual void InspectedContentsClosing() = 0; | 24 virtual void InspectedContentsClosing() = 0; |
| 73 }; | 25 }; |
| 74 | 26 |
| 75 } // namespace content | 27 } // namespace content |
| 76 | 28 |
| 77 #endif // CONTENT_PUBLIC_BROWSER_DEVTOOLS_FRONTEND_HOST_DELEGATE_H_ | 29 #endif // CONTENT_PUBLIC_BROWSER_DEVTOOLS_FRONTEND_HOST_DELEGATE_H_ |
| OLD | NEW |