Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(354)

Side by Side Diff: content/browser/devtools/devtools_agent_host_impl.h

Issue 2933243002: [DevTools] Make DevToolsSession own it's DevToolsMessageChunkProcessor (Closed)
Patch Set: addressed comments Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | content/browser/devtools/devtools_session.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 static int s_attached_count_; 84 static int s_attached_count_;
85 static int s_force_creation_count_; 85 static int s_force_creation_count_;
86 }; 86 };
87 87
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 const 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 void Reset();
99 99
100 private: 100 private:
101 SendMessageCallback callback_; 101 SendMessageCallback callback_;
102 std::string message_buffer_; 102 std::string message_buffer_;
103 uint32_t message_buffer_size_; 103 uint32_t message_buffer_size_;
104 std::string state_cookie_; 104 std::string state_cookie_;
105 int last_call_id_; 105 int last_call_id_;
106 }; 106 };
107 107
108 } // namespace content 108 } // namespace content
109 109
110 #endif // CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_AGENT_HOST_IMPL_H_ 110 #endif // CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_AGENT_HOST_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/devtools/devtools_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698