OLD | NEW |
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/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" |
11 #include "mojo/public/c/system/main.h" | 11 #include "mojo/public/c/system/main.h" |
12 #include "mojo/public/cpp/application/application_connection.h" | |
13 #include "mojo/public/cpp/application/application_impl.h" | 12 #include "mojo/public/cpp/application/application_impl.h" |
14 #include "mojo/public/cpp/application/connect.h" | 13 #include "mojo/public/cpp/application/connect.h" |
15 #include "mojo/services/ui/views/interfaces/view_provider.mojom.h" | 14 #include "mojo/services/ui/views/interfaces/view_provider.mojom.h" |
16 #include "services/ui/launcher/launcher_view_tree.h" | 15 #include "services/ui/launcher/launcher_view_tree.h" |
17 | 16 |
18 namespace launcher { | 17 namespace launcher { |
19 | 18 |
20 LaunchInstance::LaunchInstance(mojo::ApplicationImpl* app_impl, | 19 LaunchInstance::LaunchInstance(mojo::ApplicationImpl* app_impl, |
21 const std::string& app_url, | 20 const std::string& app_url, |
22 const base::Closure& shutdown_callback) | 21 const base::Closure& shutdown_callback) |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 } | 114 } |
116 | 115 |
117 void LaunchInstance::OnEvent(mojo::EventPtr event, | 116 void LaunchInstance::OnEvent(mojo::EventPtr event, |
118 const mojo::Callback<void()>& callback) { | 117 const mojo::Callback<void()>& callback) { |
119 if (view_tree_) | 118 if (view_tree_) |
120 view_tree_->DispatchEvent(event.Pass()); | 119 view_tree_->DispatchEvent(event.Pass()); |
121 callback.Run(); | 120 callback.Run(); |
122 } | 121 } |
123 | 122 |
124 } // namespace launcher | 123 } // namespace launcher |
OLD | NEW |