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

Side by Side Diff: chrome/browser/chromeos/login/demo_mode/demo_app_launcher.cc

Issue 2248873002: Convert WindowOpenDisposition to an enum class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/login/demo_mode/demo_app_launcher.h" 5 #include "chrome/browser/chromeos/login/demo_mode/demo_app_launcher.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" 10 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 return; 87 return;
88 } 88 }
89 89
90 // Disable network before launching the app. 90 // Disable network before launching the app.
91 LOG(WARNING) << "Disabling network before launching demo app.."; 91 LOG(WARNING) << "Disabling network before launching demo app..";
92 NetworkStateHandler* handler = NetworkHandler::Get()->network_state_handler(); 92 NetworkStateHandler* handler = NetworkHandler::Get()->network_state_handler();
93 handler->SetTechnologyEnabled(NetworkTypePattern::NonVirtual(), 93 handler->SetTechnologyEnabled(NetworkTypePattern::NonVirtual(),
94 false, 94 false,
95 chromeos::network_handler::ErrorCallback()); 95 chromeos::network_handler::ErrorCallback());
96 96
97 OpenApplication( 97 OpenApplication(AppLaunchParams(profile, extension,
98 AppLaunchParams(profile, extension, extensions::LAUNCH_CONTAINER_WINDOW, 98 extensions::LAUNCH_CONTAINER_WINDOW,
99 NEW_WINDOW, extensions::SOURCE_CHROME_INTERNAL, true)); 99 WindowOpenDisposition::NEW_WINDOW,
100 extensions::SOURCE_CHROME_INTERNAL, true));
100 KioskAppManager::Get()->InitSession(profile, extension_id); 101 KioskAppManager::Get()->InitSession(profile, extension_id);
101 102
102 user_manager::UserManager::Get()->SessionStarted(); 103 user_manager::UserManager::Get()->SessionStarted();
103 104
104 LoginDisplayHost::default_host()->Finalize(); 105 LoginDisplayHost::default_host()->Finalize();
105 } 106 }
106 107
107 void DemoAppLauncher::OnProfileLoadFailed(KioskAppLaunchError::Error error) { 108 void DemoAppLauncher::OnProfileLoadFailed(KioskAppLaunchError::Error error) {
108 LOG(ERROR) << "Loading the Kiosk Profile failed: " << 109 LOG(ERROR) << "Loading the Kiosk Profile failed: " <<
109 KioskAppLaunchError::GetErrorMessage(error); 110 KioskAppLaunchError::GetErrorMessage(error);
110 } 111 }
111 112
112 } // namespace chromeos 113 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698