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

Side by Side Diff: services/ui/launcher/launch_instance.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/launcher/launch_instance.h ('k') | services/ui/launcher/launcher_app.h » ('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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/launcher/launch_instance.h" 5 #include "services/ui/launcher/launch_instance.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h"
9 #include "base/logging.h" 8 #include "base/logging.h"
10 #include "base/trace_event/trace_event.h" 9 #include "base/trace_event/trace_event.h"
11 #include "mojo/application/application_runner_chromium.h"
12 #include "mojo/public/c/system/main.h"
13 #include "mojo/public/cpp/application/application_impl.h"
14 #include "mojo/public/cpp/application/connect.h"
15 #include "services/ui/launcher/launcher_view_tree.h" 10 #include "services/ui/launcher/launcher_view_tree.h"
16 11
17 namespace launcher { 12 namespace launcher {
18 13
19 LaunchInstance::LaunchInstance(mojo::ApplicationImpl* app_impl, 14 LaunchInstance::LaunchInstance(mojo::NativeViewportPtr viewport,
20 mojo::NativeViewportPtr viewport,
21 mojo::ui::ViewProviderPtr view_provider, 15 mojo::ui::ViewProviderPtr view_provider,
22 mojo::gfx::composition::Compositor* compositor, 16 mojo::gfx::composition::Compositor* compositor,
23 mojo::ui::ViewManager* view_manager, 17 mojo::ui::ViewManager* view_manager,
24 const base::Closure& shutdown_callback) 18 const base::Closure& shutdown_callback)
25 : app_impl_(app_impl), 19 : viewport_(viewport.Pass()),
26 viewport_(viewport.Pass()),
27 view_provider_(view_provider.Pass()), 20 view_provider_(view_provider.Pass()),
28 compositor_(compositor), 21 compositor_(compositor),
29 view_manager_(view_manager), 22 view_manager_(view_manager),
30 shutdown_callback_(shutdown_callback), 23 shutdown_callback_(shutdown_callback),
31 viewport_event_dispatcher_binding_(this) {} 24 viewport_event_dispatcher_binding_(this) {}
32 25
33 LaunchInstance::~LaunchInstance() {} 26 LaunchInstance::~LaunchInstance() {}
34 27
35 void LaunchInstance::Launch() { 28 void LaunchInstance::Launch() {
36 TRACE_EVENT0("launcher", __func__); 29 TRACE_EVENT0("launcher", __func__);
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 } 86 }
94 87
95 void LaunchInstance::OnEvent(mojo::EventPtr event, 88 void LaunchInstance::OnEvent(mojo::EventPtr event,
96 const mojo::Callback<void()>& callback) { 89 const mojo::Callback<void()>& callback) {
97 if (view_tree_) 90 if (view_tree_)
98 view_tree_->DispatchEvent(event.Pass()); 91 view_tree_->DispatchEvent(event.Pass());
99 callback.Run(); 92 callback.Run();
100 } 93 }
101 94
102 } // namespace launcher 95 } // namespace launcher
OLDNEW
« no previous file with comments | « services/ui/launcher/launch_instance.h ('k') | services/ui/launcher/launcher_app.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698