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

Side by Side Diff: services/view_manager/view_manager_app.cc

Issue 791493006: De-client tracing.TraceController interface (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 months 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 "services/view_manager/view_manager_app.h" 5 #include "services/view_manager/view_manager_app.h"
6 6
7 #include "mojo/application/application_runner_chromium.h"
7 #include "mojo/common/tracing_impl.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 "services/view_manager/client_connection.h" 12 #include "services/view_manager/client_connection.h"
12 #include "services/view_manager/connection_manager.h" 13 #include "services/view_manager/connection_manager.h"
13 #include "services/view_manager/display_manager.h" 14 #include "services/view_manager/display_manager.h"
14 #include "services/view_manager/view_manager_service_impl.h" 15 #include "services/view_manager/view_manager_service_impl.h"
15 16
16 using mojo::ApplicationConnection; 17 using mojo::ApplicationConnection;
17 using mojo::ApplicationImpl; 18 using mojo::ApplicationImpl;
18 using mojo::InterfaceRequest; 19 using mojo::InterfaceRequest;
19 using mojo::ViewManagerService; 20 using mojo::ViewManagerService;
20 using mojo::WindowManagerInternalClient; 21 using mojo::WindowManagerInternalClient;
21 22
22 namespace view_manager { 23 namespace view_manager {
23 24
24 ViewManagerApp::ViewManagerApp() : wm_app_connection_(nullptr) {} 25 ViewManagerApp::ViewManagerApp() : wm_app_connection_(nullptr) {}
25 ViewManagerApp::~ViewManagerApp() {} 26 ViewManagerApp::~ViewManagerApp() {}
26 27
27 void ViewManagerApp::Initialize(ApplicationImpl* app) { 28 void ViewManagerApp::Initialize(ApplicationImpl* app) {
28 mojo::TracingImpl::Create(app); 29 tracing_.Initialize(app);
29 } 30 }
30 31
31 bool ViewManagerApp::ConfigureIncomingConnection( 32 bool ViewManagerApp::ConfigureIncomingConnection(
32 ApplicationConnection* connection) { 33 ApplicationConnection* connection) {
33 if (connection_manager_.get()) { 34 if (connection_manager_.get()) {
34 VLOG(1) << "ViewManager allows only one window manager connection."; 35 VLOG(1) << "ViewManager allows only one window manager connection.";
35 return false; 36 return false;
36 } 37 }
37 wm_app_connection_ = connection; 38 wm_app_connection_ = connection;
38 // |connection| originates from the WindowManager. Let it connect directly 39 // |connection| originates from the WindowManager. Let it connect directly
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 new mojo::Binding<WindowManagerInternalClient>(connection_manager_.get(), 104 new mojo::Binding<WindowManagerInternalClient>(connection_manager_.get(),
104 request.Pass())); 105 request.Pass()));
105 wm_internal_client_binding_->set_error_handler(this); 106 wm_internal_client_binding_->set_error_handler(this);
106 } 107 }
107 108
108 void ViewManagerApp::OnConnectionError() { 109 void ViewManagerApp::OnConnectionError() {
109 ApplicationImpl::Terminate(); 110 ApplicationImpl::Terminate();
110 } 111 }
111 112
112 } // namespace view_manager 113 } // namespace view_manager
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698