| OLD | NEW |
| 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/application/application_runner_chromium.h" |
| 8 #include "mojo/common/tracing_impl.h" | 8 #include "mojo/common/tracing_impl.h" |
| 9 #include "mojo/public/c/system/main.h" | 9 #include "mojo/public/c/system/main.h" |
| 10 #include "mojo/public/cpp/application/application_connection.h" | 10 #include "mojo/public/cpp/application/application_connection.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 } | 27 } |
| 28 | 28 |
| 29 ViewManagerApp::~ViewManagerApp() {} | 29 ViewManagerApp::~ViewManagerApp() {} |
| 30 | 30 |
| 31 void ViewManagerApp::Initialize(ApplicationImpl* app) { | 31 void ViewManagerApp::Initialize(ApplicationImpl* app) { |
| 32 app_impl_ = app; | 32 app_impl_ = app; |
| 33 tracing_.Initialize(app); | 33 tracing_.Initialize(app); |
| 34 } | 34 } |
| 35 | 35 |
| 36 bool ViewManagerApp::ConfigureIncomingConnection( | 36 bool ViewManagerApp::ConfigureIncomingConnection( |
| 37 ApplicationConnection* connection) { | 37 ApplicationConnection* connection, |
| 38 const std::string& url) { |
| 38 if (connection_manager_.get()) { | 39 if (connection_manager_.get()) { |
| 39 VLOG(1) << "ViewManager allows only one window manager connection."; | 40 VLOG(1) << "ViewManager allows only one window manager connection."; |
| 40 return false; | 41 return false; |
| 41 } | 42 } |
| 42 wm_app_connection_ = connection; | 43 wm_app_connection_ = connection; |
| 43 // |connection| originates from the WindowManager. Let it connect directly | 44 // |connection| originates from the WindowManager. Let it connect directly |
| 44 // to the ViewManager and WindowManagerInternalClient. | 45 // to the ViewManager and WindowManagerInternalClient. |
| 45 connection->AddService<ViewManagerService>(this); | 46 connection->AddService<ViewManagerService>(this); |
| 46 connection->AddService<WindowManagerInternalClient>(this); | 47 connection->AddService<WindowManagerInternalClient>(this); |
| 47 connection->ConnectToService(&wm_internal_); | 48 connection->ConnectToService(&wm_internal_); |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 wm_internal_client_binding_->set_error_handler(this); | 126 wm_internal_client_binding_->set_error_handler(this); |
| 126 wm_internal_->SetViewManagerClient( | 127 wm_internal_->SetViewManagerClient( |
| 127 wm_internal_client_request_.PassMessagePipe()); | 128 wm_internal_client_request_.PassMessagePipe()); |
| 128 } | 129 } |
| 129 | 130 |
| 130 void ViewManagerApp::OnConnectionError() { | 131 void ViewManagerApp::OnConnectionError() { |
| 131 ApplicationImpl::Terminate(); | 132 ApplicationImpl::Terminate(); |
| 132 } | 133 } |
| 133 | 134 |
| 134 } // namespace view_manager | 135 } // namespace view_manager |
| OLD | NEW |