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