| 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/launcher/launcher_app.h" | 5 #include "services/ui/launcher/launcher_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" |
| 11 #include "mojo/common/tracing_impl.h" | 11 #include "mojo/common/tracing_impl.h" |
| 12 #include "mojo/public/c/system/main.h" | 12 #include "mojo/public/c/system/main.h" |
| 13 #include "mojo/public/cpp/application/application_connection.h" | |
| 14 #include "mojo/public/cpp/application/application_impl.h" | 13 #include "mojo/public/cpp/application/application_impl.h" |
| 14 #include "mojo/public/cpp/application/service_provider_impl.h" |
| 15 | 15 |
| 16 namespace launcher { | 16 namespace launcher { |
| 17 | 17 |
| 18 LauncherApp::LauncherApp() : app_impl_(nullptr), next_id_(0u) {} | 18 LauncherApp::LauncherApp() : app_impl_(nullptr), next_id_(0u) {} |
| 19 | 19 |
| 20 LauncherApp::~LauncherApp() {} | 20 LauncherApp::~LauncherApp() {} |
| 21 | 21 |
| 22 void LauncherApp::Initialize(mojo::ApplicationImpl* app_impl) { | 22 void LauncherApp::Initialize(mojo::ApplicationImpl* app_impl) { |
| 23 app_impl_ = app_impl; | 23 app_impl_ = app_impl; |
| 24 | 24 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 } | 59 } |
| 60 | 60 |
| 61 void LauncherApp::OnLaunchTermination(uint32_t id) { | 61 void LauncherApp::OnLaunchTermination(uint32_t id) { |
| 62 launch_instances_.erase(id); | 62 launch_instances_.erase(id); |
| 63 if (launch_instances_.empty()) { | 63 if (launch_instances_.empty()) { |
| 64 app_impl_->Terminate(); | 64 app_impl_->Terminate(); |
| 65 } | 65 } |
| 66 } | 66 } |
| 67 | 67 |
| 68 } // namespace launcher | 68 } // namespace launcher |
| OLD | NEW |