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

Side by Side Diff: mojo/services/surfaces/surfaces_service_application.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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "mojo/services/surfaces/surfaces_service_application.h" 5 #include "mojo/services/surfaces/surfaces_service_application.h"
6 6
7 #include "cc/surfaces/display.h" 7 #include "cc/surfaces/display.h"
8 #include "mojo/application/application_runner_chromium.h" 8 #include "mojo/application/application_runner_chromium.h"
9 #include "mojo/common/tracing_impl.h"
9 #include "mojo/public/c/system/main.h" 10 #include "mojo/public/c/system/main.h"
10 #include "mojo/services/surfaces/surfaces_service_impl.h" 11 #include "mojo/services/surfaces/surfaces_service_impl.h"
11 12
12 namespace mojo { 13 namespace mojo {
13 14
14 SurfacesServiceApplication::SurfacesServiceApplication() 15 SurfacesServiceApplication::SurfacesServiceApplication()
15 : tick_interval_(base::TimeDelta::FromMilliseconds(17)), 16 : tick_interval_(base::TimeDelta::FromMilliseconds(17)),
16 next_id_namespace_(1u), 17 next_id_namespace_(1u),
17 display_(NULL), 18 display_(NULL),
18 draw_timer_(false, false) { 19 draw_timer_(false, false) {
19 } 20 }
20 21
21 SurfacesServiceApplication::~SurfacesServiceApplication() { 22 SurfacesServiceApplication::~SurfacesServiceApplication() {
22 } 23 }
23 24
25 void SurfacesServiceApplication::Initialize(ApplicationImpl* app) {
26 TracingImpl::Create(app);
27 }
28
24 bool SurfacesServiceApplication::ConfigureIncomingConnection( 29 bool SurfacesServiceApplication::ConfigureIncomingConnection(
25 ApplicationConnection* connection) { 30 ApplicationConnection* connection) {
26 connection->AddService(this); 31 connection->AddService(this);
27 return true; 32 return true;
28 } 33 }
29 34
30 void SurfacesServiceApplication::Create( 35 void SurfacesServiceApplication::Create(
31 ApplicationConnection* connection, 36 ApplicationConnection* connection,
32 InterfaceRequest<SurfacesService> request) { 37 InterfaceRequest<SurfacesService> request) {
33 new SurfacesServiceImpl(&manager_, &next_id_namespace_, this, request.Pass()); 38 new SurfacesServiceImpl(&manager_, &next_id_namespace_, this, request.Pass());
(...skipping 22 matching lines...) Expand all
56 if (display_ == display) 61 if (display_ == display)
57 SetDisplay(nullptr); 62 SetDisplay(nullptr);
58 } 63 }
59 64
60 } // namespace mojo 65 } // namespace mojo
61 66
62 MojoResult MojoMain(MojoHandle shell_handle) { 67 MojoResult MojoMain(MojoHandle shell_handle) {
63 mojo::ApplicationRunnerChromium runner(new mojo::SurfacesServiceApplication); 68 mojo::ApplicationRunnerChromium runner(new mojo::SurfacesServiceApplication);
64 return runner.Run(shell_handle); 69 return runner.Run(shell_handle);
65 } 70 }
OLDNEW
« no previous file with comments | « mojo/services/surfaces/surfaces_service_application.h ('k') | mojo/services/view_manager/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698