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/ui/input_manager/input_manager_app.h" | 5 #include "services/ui/input_manager/input_manager_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 11 matching lines...) Loading... |
22 | 22 |
23 void InputManagerApp::Initialize(mojo::ApplicationImpl* app_impl) { | 23 void InputManagerApp::Initialize(mojo::ApplicationImpl* app_impl) { |
24 app_impl_ = app_impl; | 24 app_impl_ = app_impl; |
25 | 25 |
26 auto command_line = base::CommandLine::ForCurrentProcess(); | 26 auto command_line = base::CommandLine::ForCurrentProcess(); |
27 command_line->InitFromArgv(app_impl_->args()); | 27 command_line->InitFromArgv(app_impl_->args()); |
28 logging::LoggingSettings settings; | 28 logging::LoggingSettings settings; |
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->shell(), &app_impl->args()); |
33 } | 33 } |
34 | 34 |
35 bool InputManagerApp::ConfigureIncomingConnection( | 35 bool InputManagerApp::ConfigureIncomingConnection( |
36 mojo::ServiceProviderImpl* service_provider_impl) { | 36 mojo::ServiceProviderImpl* service_provider_impl) { |
37 service_provider_impl->AddService<mojo::ui::ViewAssociate>([this]( | 37 service_provider_impl->AddService<mojo::ui::ViewAssociate>([this]( |
38 const mojo::ConnectionContext& connection_context, | 38 const mojo::ConnectionContext& connection_context, |
39 mojo::InterfaceRequest<mojo::ui::ViewAssociate> view_associate_request) { | 39 mojo::InterfaceRequest<mojo::ui::ViewAssociate> view_associate_request) { |
40 input_associates_.AddBinding(new InputAssociate(), | 40 input_associates_.AddBinding(new InputAssociate(), |
41 view_associate_request.Pass()); | 41 view_associate_request.Pass()); |
42 }); | 42 }); |
43 return true; | 43 return true; |
44 } | 44 } |
45 | 45 |
46 } // namespace input_manager | 46 } // namespace input_manager |
OLD | NEW |