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

Unified Diff: sky/tools/debugger/prompt/prompt.cc

Issue 769963004: Add tracing service and make the shell+sky_viewer+services talk to it (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/tools/debugger/prompt/BUILD.gn ('k') | sky/viewer/viewer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/tools/debugger/prompt/prompt.cc
diff --git a/sky/tools/debugger/prompt/prompt.cc b/sky/tools/debugger/prompt/prompt.cc
index f400055ac22768684f66bcbff3270e0494aa0d75..6ef357d1d22183f997c0a9688d1511a52c24c379 100644
--- a/sky/tools/debugger/prompt/prompt.cc
+++ b/sky/tools/debugger/prompt/prompt.cc
@@ -5,10 +5,10 @@
#include "base/bind.h"
#include "base/memory/weak_ptr.h"
#include "mojo/application/application_runner_chromium.h"
-#include "mojo/common/tracing.mojom.h"
#include "mojo/public/c/system/main.h"
#include "mojo/public/cpp/application/application_delegate.h"
#include "mojo/public/cpp/application/application_impl.h"
+#include "services/tracing/tracing.mojom.h"
#include "sky/tools/debugger/debugger.mojom.h"
#include <iostream>
@@ -42,7 +42,7 @@ class Prompt : public mojo::ApplicationDelegate {
private:
// Overridden from mojo::ApplicationDelegate:
virtual void Initialize(mojo::ApplicationImpl* app) override {
- app->ConnectToService("mojo:sky_viewer", &tracing_);
+ app->ConnectToService("mojo:tracing", &tracing_);
if (app->args().size() > 1)
url_ = app->args()[1];
else {
@@ -138,17 +138,17 @@ class Prompt : public mojo::ApplicationDelegate {
void ToggleTracing() {
if (is_tracing_) {
std::cout << "Stopping trace (writing to sky_viewer.trace)" << std::endl;
- tracing_->Stop();
+ tracing_->StopAndFlush();
} else {
std::cout << "Starting trace (type 'trace' to stop tracing)" << std::endl;
- tracing_->Start();
+ tracing_->Start(mojo::String("sky_viewer"), mojo::String("*"));
}
is_tracing_ = !is_tracing_;
}
bool is_tracing_;
DebuggerPtr debugger_;
- mojo::TracingPtr tracing_;
+ tracing::TraceCoordinatorPtr tracing_;
std::string url_;
base::WeakPtrFactory<Prompt> weak_ptr_factory_;
« no previous file with comments | « sky/tools/debugger/prompt/BUILD.gn ('k') | sky/viewer/viewer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698