| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/gfx/compositor/compositor_app.h" | 5 #include "services/gfx/compositor/compositor_app.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/trace_event/trace_event.h" | 9 #include "base/trace_event/trace_event.h" |
| 10 #include "mojo/application/application_runner_chromium.h" | 10 #include "mojo/application/application_runner_chromium.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG; | 29 settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG; |
| 30 logging::InitLogging(settings); | 30 logging::InitLogging(settings); |
| 31 | 31 |
| 32 tracing_.Initialize(app_impl_); | 32 tracing_.Initialize(app_impl_); |
| 33 | 33 |
| 34 engine_.reset(new CompositorEngine()); | 34 engine_.reset(new CompositorEngine()); |
| 35 } | 35 } |
| 36 | 36 |
| 37 bool CompositorApp::ConfigureIncomingConnection( | 37 bool CompositorApp::ConfigureIncomingConnection( |
| 38 mojo::ApplicationConnection* connection) { | 38 mojo::ApplicationConnection* connection) { |
| 39 connection->AddService<mojo::gfx::composition::Compositor>(this); | 39 connection->GetServiceProviderImpl() |
| 40 .AddService<mojo::gfx::composition::Compositor>( |
| 41 [this](const mojo::ConnectionContext& connection_context, |
| 42 mojo::InterfaceRequest<mojo::gfx::composition::Compositor> |
| 43 compositor_request) { |
| 44 compositor_bindings_.AddBinding(new CompositorImpl(engine_.get()), |
| 45 compositor_request.Pass()); |
| 46 }); |
| 40 return true; | 47 return true; |
| 41 } | 48 } |
| 42 | 49 |
| 43 void CompositorApp::Create( | |
| 44 const mojo::ConnectionContext& connection_context, | |
| 45 mojo::InterfaceRequest<mojo::gfx::composition::Compositor> request) { | |
| 46 compositor_bindings_.AddBinding(new CompositorImpl(engine_.get()), | |
| 47 request.Pass()); | |
| 48 } | |
| 49 | |
| 50 } // namespace compositor | 50 } // namespace compositor |
| OLD | NEW |