Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(712)

Side by Side Diff: chrome/browser/chromeos/app_mode/startup_app_launcher.cc

Issue 2248873002: Convert WindowOpenDisposition to an enum class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix weird formatting in recent_tabs_sub_menu_model.cc Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698