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

Unified Diff: sky/viewer/viewer.cc

Issue 751303003: Move tracing_impl code to mojo/common (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/viewer/services/tracing_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/viewer/viewer.cc
diff --git a/sky/viewer/viewer.cc b/sky/viewer/viewer.cc
index 637d939a77cdfa77fb511de8ad8524edcd83443e..1d0f5466882ae932e6ff49466aeeee47d01693f0 100644
--- a/sky/viewer/viewer.cc
+++ b/sky/viewer/viewer.cc
@@ -5,6 +5,7 @@
#include "base/message_loop/message_loop.h"
#include "base/threading/thread.h"
#include "mojo/application/application_runner_chromium.h"
+#include "mojo/common/tracing_impl.h"
#include "mojo/public/c/system/main.h"
#include "mojo/public/cpp/application/application_connection.h"
#include "mojo/public/cpp/application/application_delegate.h"
@@ -15,7 +16,6 @@
#include "sky/viewer/content_handler_impl.h"
#include "sky/viewer/document_view.h"
#include "sky/viewer/platform/platform_impl.h"
-#include "sky/viewer/services/tracing_impl.h"
#if !defined(COMPONENT_BUILD)
#include "base/i18n/icu_util.h"
@@ -24,7 +24,8 @@
namespace sky {
class Viewer : public mojo::ApplicationDelegate,
- public mojo::InterfaceFactory<mojo::ContentHandler> {
+ public mojo::InterfaceFactory<mojo::ContentHandler>,
+ public mojo::InterfaceFactory<mojo::Tracing> {
public:
Viewer() {}
@@ -40,8 +41,8 @@ class Viewer : public mojo::ApplicationDelegate,
virtual bool ConfigureIncomingConnection(
mojo::ApplicationConnection* connection) override {
- connection->AddService(this);
- connection->AddService(&tracing_);
+ connection->AddService<mojo::ContentHandler>(this);
+ connection->AddService<mojo::Tracing>(this);
return true;
}
@@ -51,8 +52,13 @@ class Viewer : public mojo::ApplicationDelegate,
mojo::BindToRequest(new ContentHandlerImpl(), &request);
}
+ // Overridden from InterfaceFactory<Tracing>
+ virtual void Create(mojo::ApplicationConnection* connection,
+ mojo::InterfaceRequest<mojo::Tracing> request) override {
+ new mojo::TracingImpl(request.Pass(), "sky_viewer");
+ }
+
scoped_ptr<PlatformImpl> platform_impl_;
- TracingFactory tracing_;
DISALLOW_COPY_AND_ASSIGN(Viewer);
};
« no previous file with comments | « sky/viewer/services/tracing_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698