Index: chrome/browser/devtools/devtools_window.h |
diff --git a/chrome/browser/devtools/devtools_window.h b/chrome/browser/devtools/devtools_window.h |
index fc2faba194cca83718c5dbd72f980bd8eb623f7f..cb49b6f11cf19d87d4599788f470d6fc529f84fc 100644 |
--- a/chrome/browser/devtools/devtools_window.h |
+++ b/chrome/browser/devtools/devtools_window.h |
@@ -180,26 +180,32 @@ class DevToolsWindow : private content::NotificationObserver, |
virtual void WebContentsFocused(content::WebContents* contents) OVERRIDE; |
// content::DevToolsFrontendHostDelegate: |
- virtual void ActivateWindow() OVERRIDE; |
- virtual void ChangeAttachedWindowHeight(unsigned height) OVERRIDE; |
- virtual void CloseWindow() OVERRIDE; |
- virtual void MoveWindow(int x, int y) OVERRIDE; |
- virtual void SetDockSide(const std::string& side) OVERRIDE; |
- virtual void OpenInNewTab(const std::string& url) OVERRIDE; |
- virtual void SaveToFile(const std::string& url, |
- const std::string& content, |
- bool save_as) OVERRIDE; |
- virtual void AppendToFile(const std::string& url, |
- const std::string& content) OVERRIDE; |
- virtual void RequestFileSystems() OVERRIDE; |
- virtual void AddFileSystem() OVERRIDE; |
- virtual void RemoveFileSystem(const std::string& file_system_path) OVERRIDE; |
- virtual void IndexPath(int request_id, |
- const std::string& file_system_path) OVERRIDE; |
- virtual void StopIndexing(int request_id) OVERRIDE; |
- virtual void SearchInPath(int request_id, |
- const std::string& file_system_path, |
- const std::string& query) OVERRIDE; |
+ virtual void DispatchOnFrontendHost(const std::string& message) OVERRIDE; |
+ |
+ typedef base::Callback<bool(const base::ListValue&)> FrontendMessageHandler; |
+ void RegisterFrontendMessageHandler(const std::string& method, |
+ const FrontendMessageHandler& handler); |
+ |
+ // Frontend message handlers: |
+ void ActivateWindow(); |
+ void CloseWindow(); |
+ void MoveWindow(int x, int y); |
+ void SetDockSide(const std::string& side); |
+ void OpenInNewTab(const std::string& url); |
+ void SaveToFile(const std::string& url, |
+ const std::string& content, |
+ bool save_as); |
+ void AppendToFile(const std::string& url, |
+ const std::string& content); |
+ void RequestFileSystems(); |
+ void AddFileSystem(); |
+ void RemoveFileSystem(const std::string& file_system_path); |
+ void IndexPath(int request_id, |
+ const std::string& file_system_path); |
+ void StopIndexing(int request_id); |
+ void SearchInPath(int request_id, |
+ const std::string& file_system_path, |
+ const std::string& query); |
// DevToolsFileHelper callbacks. |
void FileSavedAs(const std::string& url); |
@@ -263,6 +269,11 @@ class DevToolsWindow : private content::NotificationObserver, |
int width_; |
int height_; |
DevToolsDockSide dock_side_before_minimized_; |
+ typedef std::map<std::string, FrontendMessageHandler> |
+ FrontendMessageHandlerMap; |
+ FrontendMessageHandlerMap frontend_message_handlers_; |
+ |
+// scoped_ptr<FrontendHostDispatcher> frontend_host_dispatcher_; |
DISALLOW_COPY_AND_ASSIGN(DevToolsWindow); |
}; |