| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CONTENT_BROWSER_DEBUGGER_DEVTOOLS_FRONTEND_MESSAGE_HANDLER_H_ | |
| 6 #define CONTENT_BROWSER_DEBUGGER_DEVTOOLS_FRONTEND_MESSAGE_HANDLER_H_ | |
| 7 #pragma once | |
| 8 | |
| 9 #include "base/basictypes.h" | |
| 10 #include "content/public/browser/render_view_host_observer.h" | |
| 11 | |
| 12 class TabContents; | |
| 13 | |
| 14 namespace content { | |
| 15 | |
| 16 class DevToolsFrontendWindowDelegate; | |
| 17 | |
| 18 // This class handles messages from DevToolsClient and calls corresponding | |
| 19 // methods on DevToolsFrontendWindowDelegate which is implemented by the | |
| 20 // embedder. This allows us to avoid exposing DevTools client messages through | |
| 21 // the content public API. | |
| 22 class DevToolsFrontendMessageHandler : public RenderViewHostObserver { | |
| 23 public: | |
| 24 DevToolsFrontendMessageHandler(TabContents* tab_contents, | |
| 25 DevToolsFrontendWindowDelegate* delegate); | |
| 26 | |
| 27 private: | |
| 28 virtual ~DevToolsFrontendMessageHandler(); | |
| 29 | |
| 30 // content::RenderViewHostObserver overrides. | |
| 31 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | |
| 32 | |
| 33 void ForwardToDevToolsAgent(const IPC::Message& message); | |
| 34 void OnActivateWindow(); | |
| 35 void OnCloseWindow(); | |
| 36 void OnMoveWindow(int x, int y); | |
| 37 void OnRequestDockWindow(); | |
| 38 void OnRequestUndockWindow(); | |
| 39 void OnSaveAs(const std::string& file_name, | |
| 40 const std::string& content); | |
| 41 | |
| 42 TabContents* tab_contents_; | |
| 43 DevToolsFrontendWindowDelegate* delegate_; | |
| 44 DISALLOW_COPY_AND_ASSIGN(DevToolsFrontendMessageHandler); | |
| 45 }; | |
| 46 | |
| 47 } // namespace content | |
| 48 | |
| 49 #endif // CONTENT_BROWSER_DEBUGGER_DEVTOOLS_FRONTEND_MESSAGE_HANDLER_H_ | |
| OLD | NEW |