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

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

Issue 1307073002: DevTools: provide an option to return traces as streams (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments addressed Created 5 years, 4 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_BROWSER_DEVTOOLS_PROTOCOL_IO_HANDLER_H_
6 #define CONTENT_BROWSER_DEVTOOLS_PROTOCOL_IO_HANDLER_H_
7
8 #include "base/memory/weak_ptr.h"
9 #include "content/browser/devtools/protocol/devtools_protocol_dispatcher.h"
10
11 namespace base {
12 class RefCountedString;
13 }
14
15 namespace content {
16 namespace devtools {
17 class DevToolsIOContext;
18
19 namespace io {
20
21 class IOHandler {
22 public:
23 using Response = DevToolsProtocolClient::Response;
24
25 explicit IOHandler(DevToolsIOContext* io_context);
26 ~IOHandler();
27
28 void SetClient(scoped_ptr<Client> client);
29 void Detached() {}
pfeldman 2015/08/25 20:53:41 Here is where you clear client and no longer use i
30
31 // Protocol methods.
32 Response Open(DevToolsCommandId command_id, const std::string& blob_url,
pfeldman 2015/08/25 20:53:41 Why is this here?
33 const bool* remove_on_close);
34 Response Read(DevToolsCommandId command_id, const std::string& handle,
35 const int* offset, const int* max_size);
36 Response Close(const std::string& handle);
37
38 private:
39 void ReadComplete(DevToolsCommandId command_id,
40 const scoped_refptr<base::RefCountedString>& data, int status);
41
42 scoped_ptr<Client> client_;
43 DevToolsIOContext* io_context_;
44 base::WeakPtrFactory<IOHandler> weak_factory_;
45
46 DISALLOW_COPY_AND_ASSIGN(IOHandler);
47 };
48
49 } // namespace io
50 } // namespace devtools
51 } // namespace content
52
53 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_TRACING_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698