| 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/startup_app_launcher.h" | 5 #include "chrome/browser/chromeos/app_mode/startup_app_launcher.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/json/json_file_value_serializer.h" | 10 #include "base/json/json_file_value_serializer.h" |
| (...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 457 | 457 |
| 458 const Extension* extension = GetPrimaryAppExtension(); | 458 const Extension* extension = GetPrimaryAppExtension(); |
| 459 CHECK(extension); | 459 CHECK(extension); |
| 460 | 460 |
| 461 if (!extensions::KioskModeInfo::IsKioskEnabled(extension)) { | 461 if (!extensions::KioskModeInfo::IsKioskEnabled(extension)) { |
| 462 OnLaunchFailure(KioskAppLaunchError::NOT_KIOSK_ENABLED); | 462 OnLaunchFailure(KioskAppLaunchError::NOT_KIOSK_ENABLED); |
| 463 return; | 463 return; |
| 464 } | 464 } |
| 465 | 465 |
| 466 // Always open the app in a window. | 466 // Always open the app in a window. |
| 467 OpenApplication(AppLaunchParams(profile_, extension, | 467 OpenApplication(AppLaunchParams( |
| 468 extensions::LAUNCH_CONTAINER_WINDOW, | 468 profile_, extension, extensions::LAUNCH_CONTAINER_WINDOW, |
| 469 NEW_WINDOW, extensions::SOURCE_KIOSK)); | 469 WindowOpenDisposition::NEW_WINDOW, extensions::SOURCE_KIOSK)); |
| 470 KioskAppManager::Get()->InitSession(profile_, app_id_); | 470 KioskAppManager::Get()->InitSession(profile_, app_id_); |
| 471 | 471 |
| 472 user_manager::UserManager::Get()->SessionStarted(); | 472 user_manager::UserManager::Get()->SessionStarted(); |
| 473 | 473 |
| 474 content::NotificationService::current()->Notify( | 474 content::NotificationService::current()->Notify( |
| 475 chrome::NOTIFICATION_KIOSK_APP_LAUNCHED, | 475 chrome::NOTIFICATION_KIOSK_APP_LAUNCHED, |
| 476 content::NotificationService::AllSources(), | 476 content::NotificationService::AllSources(), |
| 477 content::NotificationService::NoDetails()); | 477 content::NotificationService::NoDetails()); |
| 478 | 478 |
| 479 if (diagnostic_mode_) | 479 if (diagnostic_mode_) |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 557 // Skip copying meta data from the current installed primary app when | 557 // Skip copying meta data from the current installed primary app when |
| 558 // there is a pending update. | 558 // there is a pending update. |
| 559 if (PrimaryAppHasPendingUpdate()) | 559 if (PrimaryAppHasPendingUpdate()) |
| 560 return; | 560 return; |
| 561 | 561 |
| 562 KioskAppManager::Get()->ClearAppData(app_id_); | 562 KioskAppManager::Get()->ClearAppData(app_id_); |
| 563 KioskAppManager::Get()->UpdateAppDataFromProfile(app_id_, profile_, NULL); | 563 KioskAppManager::Get()->UpdateAppDataFromProfile(app_id_, profile_, NULL); |
| 564 } | 564 } |
| 565 | 565 |
| 566 } // namespace chromeos | 566 } // namespace chromeos |
| OLD | NEW |