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

Side by Side Diff: mojo/services/view_manager/view_manager_app.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
« no previous file with comments | « mojo/services/view_manager/view_manager_app.h ('k') | mojo/services/window_manager/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/view_manager/view_manager_app.h" 5 #include "mojo/services/view_manager/view_manager_app.h"
6 6
7 #include "mojo/application/application_runner_chromium.h" 7 #include "mojo/application/application_runner_chromium.h"
8 #include "mojo/common/tracing_impl.h"
8 #include "mojo/public/c/system/main.h" 9 #include "mojo/public/c/system/main.h"
9 #include "mojo/public/cpp/application/application_connection.h" 10 #include "mojo/public/cpp/application/application_connection.h"
10 #include "mojo/public/cpp/application/application_impl.h" 11 #include "mojo/public/cpp/application/application_impl.h"
11 #include "mojo/services/view_manager/client_connection.h" 12 #include "mojo/services/view_manager/client_connection.h"
12 #include "mojo/services/view_manager/connection_manager.h" 13 #include "mojo/services/view_manager/connection_manager.h"
13 #include "mojo/services/view_manager/display_manager.h" 14 #include "mojo/services/view_manager/display_manager.h"
14 #include "mojo/services/view_manager/view_manager_service_impl.h" 15 #include "mojo/services/view_manager/view_manager_service_impl.h"
15 16
16 namespace mojo { 17 namespace mojo {
17 namespace service { 18 namespace service {
18 19
19 ViewManagerApp::ViewManagerApp() : wm_app_connection_(nullptr) { 20 ViewManagerApp::ViewManagerApp() : wm_app_connection_(nullptr) {
20 } 21 }
21 ViewManagerApp::~ViewManagerApp() {} 22 ViewManagerApp::~ViewManagerApp() {}
22 23
24 void ViewManagerApp::Initialize(ApplicationImpl* app) {
25 TracingImpl::Create(app);
26 }
27
23 bool ViewManagerApp::ConfigureIncomingConnection( 28 bool ViewManagerApp::ConfigureIncomingConnection(
24 ApplicationConnection* connection) { 29 ApplicationConnection* connection) {
25 if (connection_manager_.get()) { 30 if (connection_manager_.get()) {
26 VLOG(1) << "ViewManager allows only one window manager connection."; 31 VLOG(1) << "ViewManager allows only one window manager connection.";
27 return false; 32 return false;
28 } 33 }
29 wm_app_connection_ = connection; 34 wm_app_connection_ = connection;
30 // |connection| originates from the WindowManager. Let it connect directly 35 // |connection| originates from the WindowManager. Let it connect directly
31 // to the ViewManager and WindowManagerInternalClient. 36 // to the ViewManager and WindowManagerInternalClient.
32 connection->AddService( 37 connection->AddService(
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 connection_manager_.get(), request.Pass())); 102 connection_manager_.get(), request.Pass()));
98 wm_internal_client_binding_->set_error_handler(this); 103 wm_internal_client_binding_->set_error_handler(this);
99 } 104 }
100 105
101 void ViewManagerApp::OnConnectionError() { 106 void ViewManagerApp::OnConnectionError() {
102 ApplicationImpl::Terminate(); 107 ApplicationImpl::Terminate();
103 } 108 }
104 109
105 } // namespace service 110 } // namespace service
106 } // namespace mojo 111 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/services/view_manager/view_manager_app.h ('k') | mojo/services/window_manager/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698