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

Side by Side Diff: content/browser/devtools/protocol/io_handler.h

Issue 1408363004: [DevTools] Filter any messages from previous sessions in DevToolsAgentHostImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_PROTOCOL_IO_HANDLER_H_ 5 #ifndef CONTENT_BROWSER_DEVTOOLS_PROTOCOL_IO_HANDLER_H_
6 #define CONTENT_BROWSER_DEVTOOLS_PROTOCOL_IO_HANDLER_H_ 6 #define CONTENT_BROWSER_DEVTOOLS_PROTOCOL_IO_HANDLER_H_
7 7
8 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "content/browser/devtools/protocol/devtools_protocol_dispatcher.h" 9 #include "content/browser/devtools/protocol/devtools_protocol_dispatcher.h"
10 10
(...skipping 10 matching lines...) Expand all
21 class IOHandler { 21 class IOHandler {
22 public: 22 public:
23 using Response = DevToolsProtocolClient::Response; 23 using Response = DevToolsProtocolClient::Response;
24 24
25 explicit IOHandler(DevToolsIOContext* io_context); 25 explicit IOHandler(DevToolsIOContext* io_context);
26 ~IOHandler(); 26 ~IOHandler();
27 27
28 void SetClient(scoped_ptr<Client> client); 28 void SetClient(scoped_ptr<Client> client);
29 29
30 // Protocol methods. 30 // Protocol methods.
31 Response Read(DevToolsCommandId command_id, const std::string& handle, 31 Response Read(int session_id,
32 const int* offset, const int* max_size); 32 DevToolsCommandId command_id,
33 const std::string& handle,
34 const int* offset,
35 const int* max_size);
33 Response Close(const std::string& handle); 36 Response Close(const std::string& handle);
34 37
35 private: 38 private:
36 void ReadComplete(DevToolsCommandId command_id, 39 void ReadComplete(int session_id,
37 const scoped_refptr<base::RefCountedString>& data, int status); 40 DevToolsCommandId command_id,
41 const scoped_refptr<base::RefCountedString>& data,
42 int status);
38 43
39 scoped_ptr<Client> client_; 44 scoped_ptr<Client> client_;
40 DevToolsIOContext* io_context_; 45 DevToolsIOContext* io_context_;
41 base::WeakPtrFactory<IOHandler> weak_factory_; 46 base::WeakPtrFactory<IOHandler> weak_factory_;
42 47
43 DISALLOW_COPY_AND_ASSIGN(IOHandler); 48 DISALLOW_COPY_AND_ASSIGN(IOHandler);
44 }; 49 };
45 50
46 } // namespace io 51 } // namespace io
47 } // namespace devtools 52 } // namespace devtools
48 } // namespace content 53 } // namespace content
49 54
50 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_TRACING_HANDLER_H_ 55 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_TRACING_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698