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

Side by Side Diff: services/ui/input_manager/input_manager_app.cc

Issue 2015363003: Yet more ApplicationDelegate -> ApplicationImplBase conversion. (Closed) Base URL: https://github.com/domokit/mojo.git@work797-x-work796_no_run_main_app
Patch Set: rebased again Created 4 years, 6 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
« no previous file with comments | « services/ui/input_manager/input_manager_app.h ('k') | services/ui/input_manager/main.cc » ('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 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"
11 #include "mojo/common/tracing_impl.h" 10 #include "mojo/common/tracing_impl.h"
12 #include "mojo/public/c/system/main.h"
13 #include "mojo/public/cpp/application/application_impl.h"
14 #include "mojo/public/cpp/application/service_provider_impl.h" 11 #include "mojo/public/cpp/application/service_provider_impl.h"
15 #include "services/ui/input_manager/input_associate.h" 12 #include "services/ui/input_manager/input_associate.h"
16 13
17 namespace input_manager { 14 namespace input_manager {
18 15
19 InputManagerApp::InputManagerApp() : app_impl_(nullptr) {} 16 InputManagerApp::InputManagerApp() {}
20 17
21 InputManagerApp::~InputManagerApp() {} 18 InputManagerApp::~InputManagerApp() {}
22 19
23 void InputManagerApp::Initialize(mojo::ApplicationImpl* app_impl) { 20 void InputManagerApp::OnInitialize() {
24 app_impl_ = app_impl;
25
26 auto command_line = base::CommandLine::ForCurrentProcess(); 21 auto command_line = base::CommandLine::ForCurrentProcess();
27 command_line->InitFromArgv(app_impl_->args()); 22 command_line->InitFromArgv(args());
28 logging::LoggingSettings settings; 23 logging::LoggingSettings settings;
29 settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG; 24 settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG;
30 logging::InitLogging(settings); 25 logging::InitLogging(settings);
31 26
32 tracing_.Initialize(app_impl->shell(), &app_impl->args()); 27 tracing_.Initialize(shell(), &args());
33 } 28 }
34 29
35 bool InputManagerApp::ConfigureIncomingConnection( 30 bool InputManagerApp::OnAcceptConnection(
36 mojo::ServiceProviderImpl* service_provider_impl) { 31 mojo::ServiceProviderImpl* service_provider_impl) {
37 service_provider_impl->AddService<mojo::ui::ViewAssociate>([this]( 32 service_provider_impl->AddService<mojo::ui::ViewAssociate>([this](
38 const mojo::ConnectionContext& connection_context, 33 const mojo::ConnectionContext& connection_context,
39 mojo::InterfaceRequest<mojo::ui::ViewAssociate> view_associate_request) { 34 mojo::InterfaceRequest<mojo::ui::ViewAssociate> view_associate_request) {
40 input_associates_.AddBinding(new InputAssociate(), 35 input_associates_.AddBinding(new InputAssociate(),
41 view_associate_request.Pass()); 36 view_associate_request.Pass());
42 }); 37 });
43 return true; 38 return true;
44 } 39 }
45 40
46 } // namespace input_manager 41 } // namespace input_manager
OLDNEW
« no previous file with comments | « services/ui/input_manager/input_manager_app.h ('k') | services/ui/input_manager/main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698