OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "chrome/browser/chromeos/app_mode/app_launch_utils.h" | 5 #include "chrome/browser/chromeos/app_mode/app_launch_utils.h" |
6 | 6 |
| 7 #include "base/macros.h" |
7 #include "chrome/browser/chromeos/app_mode/kiosk_app_launch_error.h" | 8 #include "chrome/browser/chromeos/app_mode/kiosk_app_launch_error.h" |
8 #include "chrome/browser/chromeos/app_mode/startup_app_launcher.h" | 9 #include "chrome/browser/chromeos/app_mode/startup_app_launcher.h" |
9 #include "chrome/browser/lifetime/application_lifetime.h" | 10 #include "chrome/browser/lifetime/application_lifetime.h" |
10 | 11 |
11 namespace chromeos { | 12 namespace chromeos { |
12 | 13 |
13 // A simple manager for the app launch that starts the launch | 14 // A simple manager for the app launch that starts the launch |
14 // and deletes itself when the launch finishes. On launch failure, | 15 // and deletes itself when the launch finishes. On launch failure, |
15 // it exits the browser process. | 16 // it exits the browser process. |
16 class AppLaunchManager : public StartupAppLauncher::Delegate { | 17 class AppLaunchManager : public StartupAppLauncher::Delegate { |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 | 59 |
59 DISALLOW_COPY_AND_ASSIGN(AppLaunchManager); | 60 DISALLOW_COPY_AND_ASSIGN(AppLaunchManager); |
60 }; | 61 }; |
61 | 62 |
62 void LaunchAppOrDie(Profile* profile, const std::string& app_id) { | 63 void LaunchAppOrDie(Profile* profile, const std::string& app_id) { |
63 // AppLaunchManager manages its own lifetime. | 64 // AppLaunchManager manages its own lifetime. |
64 (new AppLaunchManager(profile, app_id))->Start(); | 65 (new AppLaunchManager(profile, app_id))->Start(); |
65 } | 66 } |
66 | 67 |
67 } // namespace chromeos | 68 } // namespace chromeos |
OLD | NEW |