| OLD | NEW | 
|---|
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_BROWSER_DEVTOOLS_IPC_DEVTOOLS_AGENT_HOST_H_ | 5 #ifndef CONTENT_BROWSER_DEVTOOLS_IPC_DEVTOOLS_AGENT_HOST_H_ | 
| 6 #define CONTENT_BROWSER_DEVTOOLS_IPC_DEVTOOLS_AGENT_HOST_H_ | 6 #define CONTENT_BROWSER_DEVTOOLS_IPC_DEVTOOLS_AGENT_HOST_H_ | 
| 7 | 7 | 
| 8 #include "content/browser/devtools/devtools_agent_host_impl.h" | 8 #include "content/browser/devtools/devtools_agent_host_impl.h" | 
| 9 #include "content/common/devtools_messages.h" | 9 #include "content/common/devtools_messages.h" | 
| 10 | 10 | 
| 11 namespace IPC { | 11 namespace IPC { | 
| 12 class Message; | 12 class Message; | 
| 13 } | 13 } | 
| 14 | 14 | 
| 15 namespace content { | 15 namespace content { | 
| 16 | 16 | 
| 17 class CONTENT_EXPORT IPCDevToolsAgentHost : public DevToolsAgentHostImpl { | 17 class CONTENT_EXPORT IPCDevToolsAgentHost : public DevToolsAgentHostImpl { | 
| 18  public: | 18  public: | 
| 19   // DevToolsAgentHostImpl implementation. | 19   // DevToolsAgentHostImpl implementation. | 
| 20   void Attach() override; | 20   void Attach() override; | 
| 21   void Detach() override; | 21   void Detach() override; | 
| 22   bool DispatchProtocolMessage(const std::string& message) override; | 22   bool DispatchProtocolMessage(const std::string& message) override; | 
| 23   void InspectElement(int x, int y) override; | 23   void InspectElement(int x, int y) override; | 
| 24 | 24 | 
|  | 25   // DevToolsAgentHost implementation | 
|  | 26   void OpenWorkerInspector(BrowserContext* context, | 
|  | 27                            const std::string& id) override; | 
|  | 28 | 
| 25  protected: | 29  protected: | 
| 26   IPCDevToolsAgentHost(); | 30   IPCDevToolsAgentHost(); | 
| 27   ~IPCDevToolsAgentHost() override; | 31   ~IPCDevToolsAgentHost() override; | 
| 28 | 32 | 
| 29   void Reattach(); | 33   void Reattach(); | 
| 30   void ProcessChunkedMessageFromAgent(const DevToolsMessageChunk& chunk); | 34   void ProcessChunkedMessageFromAgent(const DevToolsMessageChunk& chunk); | 
| 31 | 35 | 
| 32   virtual void SendMessageToAgent(IPC::Message* msg) = 0; | 36   virtual void SendMessageToAgent(IPC::Message* msg) = 0; | 
| 33   virtual void OnClientAttached() = 0; | 37   virtual void OnClientAttached() = 0; | 
| 34   virtual void OnClientDetached() = 0; | 38   virtual void OnClientDetached() = 0; | 
| 35 | 39 | 
| 36  private: | 40  private: | 
| 37   std::string message_buffer_; | 41   std::string message_buffer_; | 
| 38   uint32 message_buffer_size_; | 42   uint32 message_buffer_size_; | 
| 39   std::string state_cookie_; | 43   std::string state_cookie_; | 
| 40 }; | 44 }; | 
| 41 | 45 | 
| 42 }  // namespace content | 46 }  // namespace content | 
| 43 | 47 | 
| 44 #endif  // CONTENT_BROWSER_DEVTOOLS_IPC_DEVTOOLS_AGENT_HOST_H_ | 48 #endif  // CONTENT_BROWSER_DEVTOOLS_IPC_DEVTOOLS_AGENT_HOST_H_ | 
| OLD | NEW | 
|---|