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