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

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

Issue 2500093002: [DevTools] Move IO and Tracing to new generator. (Closed)
Patch Set: roll Created 4 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 #include <stddef.h> 5 #include <stddef.h>
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/files/file.h" 10 #include "base/files/file.h"
11 #include "base/memory/ref_counted_delete_on_message_loop.h" 11 #include "base/memory/ref_counted_delete_on_message_loop.h"
12 #include "base/memory/ref_counted_memory.h" 12 #include "base/memory/ref_counted_memory.h"
13 13
14 namespace content { 14 namespace content {
15 namespace devtools {
16 15
17 class DevToolsIOContext { 16 class DevToolsIOContext {
18 public: 17 public:
19 class Stream : public base::RefCountedDeleteOnMessageLoop<Stream> { 18 class Stream : public base::RefCountedDeleteOnMessageLoop<Stream> {
20 public: 19 public:
21 enum Status { 20 enum Status {
22 StatusSuccess, 21 StatusSuccess,
23 StatusEOF, 22 StatusEOF,
24 StatusFailure 23 StatusFailure
25 }; 24 };
(...skipping 28 matching lines...) Expand all
54 scoped_refptr<Stream> CreateTempFileBackedStream(); 53 scoped_refptr<Stream> CreateTempFileBackedStream();
55 scoped_refptr<Stream> GetByHandle(const std::string& handle); 54 scoped_refptr<Stream> GetByHandle(const std::string& handle);
56 bool Close(const std::string& handle); 55 bool Close(const std::string& handle);
57 void DiscardAllStreams(); 56 void DiscardAllStreams();
58 57
59 private: 58 private:
60 using StreamsMap = std::map<std::string, scoped_refptr<Stream>>; 59 using StreamsMap = std::map<std::string, scoped_refptr<Stream>>;
61 StreamsMap streams_; 60 StreamsMap streams_;
62 }; 61 };
63 62
64 } // namespace devtools
65 } // namespace content 63 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/devtools/devtools_agent_host_impl.cc ('k') | content/browser/devtools/devtools_io_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698