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

Side by Side Diff: sky/tools/debugger/prompt/trace_collector.h

Issue 883983004: Rename SkyDebugger to KioskWM and move to /services (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Rename to KioskWM per discussion with jamesr Created 5 years, 10 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 2014 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 SKY_TOOLS_DEBUGGER_PROMPT_TRACE_COLLECTOR_H_
6 #define SKY_TOOLS_DEBUGGER_PROMPT_TRACE_COLLECTOR_H_
7
8 #include <vector>
9
10 #include "base/callback.h"
11 #include "mojo/common/data_pipe_drainer.h"
12
13 namespace sky {
14 namespace debugger {
15
16 class TraceCollector : public mojo::common::DataPipeDrainer::Client {
17 public:
18 typedef base::Callback<void(std::string)> TraceCallback;
19
20 explicit TraceCollector(mojo::ScopedDataPipeConsumerHandle source);
21 ~TraceCollector();
22
23 void GetTrace(TraceCallback callback);
24
25 private:
26 void OnDataAvailable(const void* data, size_t num_bytes) override;
27 void OnDataComplete() override;
28
29 std::string GetTraceAsString();
30
31 mojo::common::DataPipeDrainer drainer_;
32 std::vector<char> trace_;
33 bool is_complete_;
34 TraceCallback callback_;
35 };
36
37 } // namespace debugger
38 } // namespace sky
39
40 #endif // SKY_TOOLS_DEBUGGER_PROMPT_TRACE_COLLECTOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698