mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Already other applications use sky's simple window manager (mojo:sky_debugger) as a full-screen window manager. This moves this to /services and removes all sky references from it. As a part of this I've removed inspector support from skydb. It was already broken and will need to be re-thought to not involve calls into this new window manager. I'm also flipping the relationship between prompt.cc and debugger.cc for skydb. Skydb will tell mojo_shell to start sky_debugger_prompt instead of sky_debugger. I'm also renaming sky_debugger_prompt to be sky_debugger. R=abarth@chromium.org BUG= Review URL: https://codereview.chromium.org/883983004
41 lines
1.0 KiB
C++
41 lines
1.0 KiB
C++
// Copyright 2014 The Chromium Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
#ifndef SKY_TOOLS_DEBUGGER_TRACE_COLLECTOR_H_
|
|
#define SKY_TOOLS_DEBUGGER_TRACE_COLLECTOR_H_
|
|
|
|
#include <vector>
|
|
|
|
#include "base/callback.h"
|
|
#include "mojo/common/data_pipe_drainer.h"
|
|
|
|
namespace sky {
|
|
namespace debugger {
|
|
|
|
class TraceCollector : public mojo::common::DataPipeDrainer::Client {
|
|
public:
|
|
typedef base::Callback<void(std::string)> TraceCallback;
|
|
|
|
explicit TraceCollector(mojo::ScopedDataPipeConsumerHandle source);
|
|
~TraceCollector();
|
|
|
|
void GetTrace(TraceCallback callback);
|
|
|
|
private:
|
|
void OnDataAvailable(const void* data, size_t num_bytes) override;
|
|
void OnDataComplete() override;
|
|
|
|
std::string GetTraceAsString();
|
|
|
|
mojo::common::DataPipeDrainer drainer_;
|
|
std::vector<char> trace_;
|
|
bool is_complete_;
|
|
TraceCallback callback_;
|
|
};
|
|
|
|
} // namespace debugger
|
|
} // namespace sky
|
|
|
|
#endif // SKY_TOOLS_DEBUGGER_TRACE_COLLECTOR_H_
|