| 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);
|
| };
|
|
|