| 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_BROWSER_DEVTOOLS_DEVTOOLS_AGENT_HOST_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_AGENT_HOST_IMPL_H_ | 
| 6 #define CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_AGENT_HOST_IMPL_H_ | 6 #define CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_AGENT_HOST_IMPL_H_ | 
| 7 | 7 | 
| 8 #include <stdint.h> | 8 #include <stdint.h> | 
| 9 | 9 | 
| 10 #include <string> | 10 #include <string> | 
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 88 class DevToolsMessageChunkProcessor { | 88 class DevToolsMessageChunkProcessor { | 
| 89  public: | 89  public: | 
| 90   using SendMessageCallback = base::Callback<void(int, const std::string&)>; | 90   using SendMessageCallback = base::Callback<void(int, const std::string&)>; | 
| 91   explicit DevToolsMessageChunkProcessor(const SendMessageCallback& callback); | 91   explicit DevToolsMessageChunkProcessor(const SendMessageCallback& callback); | 
| 92   ~DevToolsMessageChunkProcessor(); | 92   ~DevToolsMessageChunkProcessor(); | 
| 93 | 93 | 
| 94   std::string state_cookie() const { return state_cookie_; } | 94   std::string state_cookie() const { return state_cookie_; } | 
| 95   void set_state_cookie(const std::string& cookie) { state_cookie_ = cookie; } | 95   void set_state_cookie(const std::string& cookie) { state_cookie_ = cookie; } | 
| 96   int last_call_id() const { return last_call_id_; } | 96   int last_call_id() const { return last_call_id_; } | 
| 97   bool ProcessChunkedMessageFromAgent(const DevToolsMessageChunk& chunk); | 97   bool ProcessChunkedMessageFromAgent(const DevToolsMessageChunk& chunk); | 
|  | 98   void Reset(); | 
| 98 | 99 | 
| 99  private: | 100  private: | 
| 100   SendMessageCallback callback_; | 101   SendMessageCallback callback_; | 
| 101   std::string message_buffer_; | 102   std::string message_buffer_; | 
| 102   uint32_t message_buffer_size_; | 103   uint32_t message_buffer_size_; | 
| 103   std::string state_cookie_; | 104   std::string state_cookie_; | 
| 104   int last_call_id_; | 105   int last_call_id_; | 
| 105 }; | 106 }; | 
| 106 | 107 | 
| 107 }  // namespace content | 108 }  // namespace content | 
| 108 | 109 | 
| 109 #endif  // CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_AGENT_HOST_IMPL_H_ | 110 #endif  // CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_AGENT_HOST_IMPL_H_ | 
| OLD | NEW | 
|---|