Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_DEMO_MODE_DEMO_APP_LAUNCHER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_DEMO_MODE_DEMO_APP_LAUNCHER_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_DEMO_MODE_DEMO_APP_LAUNCHER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_DEMO_MODE_DEMO_APP_LAUNCHER_H_ |
| 7 | 7 |
| 8 #include <string> | |
| 9 | |
| 10 #include "base/basictypes.h" | |
| 11 #include "base/compiler_specific.h" | |
| 12 #include "base/files/file_path.h" | |
|
bartfab (slow)
2014/03/20 13:22:29
Nit: A forward-declaration of FilePath would be su
rkc
2014/03/20 21:45:01
Done.
| |
| 8 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 9 #include "chrome/browser/chromeos/app_mode/kiosk_profile_loader.h" | 14 #include "chrome/browser/chromeos/app_mode/kiosk_profile_loader.h" |
| 10 | 15 |
| 11 class Profile; | |
| 12 | |
| 13 namespace chromeos { | 16 namespace chromeos { |
| 14 | 17 |
| 15 // Class responsible for launching the demo app under a kiosk session. | 18 // Class responsible for launching the demo app under a kiosk session. |
| 16 class DemoAppLauncher : public KioskProfileLoader::Delegate { | 19 class DemoAppLauncher : public KioskProfileLoader::Delegate { |
| 17 public: | 20 public: |
| 18 DemoAppLauncher(); | 21 DemoAppLauncher(); |
| 19 virtual ~DemoAppLauncher(); | 22 virtual ~DemoAppLauncher(); |
| 20 | 23 |
| 21 void StartDemoAppLaunch(); | 24 void StartDemoAppLaunch(); |
| 22 | 25 |
| 23 static bool IsDemoAppSession(const std::string& user_id); | 26 static bool IsDemoAppSession(const std::string& user_id); |
| 27 static void SetDemoAppPathForTesting(const base::FilePath& path); | |
| 28 | |
| 24 static const char kDemoUserName[]; | 29 static const char kDemoUserName[]; |
| 25 | 30 |
| 26 private: | 31 private: |
| 32 friend class DemoAppLauncherTest; | |
| 33 | |
| 27 // KioskProfileLoader::Delegate overrides: | 34 // KioskProfileLoader::Delegate overrides: |
| 28 virtual void OnProfileLoaded(Profile* profile) OVERRIDE; | 35 virtual void OnProfileLoaded(Profile* profile) OVERRIDE; |
| 29 virtual void OnProfileLoadFailed(KioskAppLaunchError::Error error) OVERRIDE; | 36 virtual void OnProfileLoadFailed(KioskAppLaunchError::Error error) OVERRIDE; |
| 30 | 37 |
| 31 Profile* profile_; | |
| 32 scoped_ptr<KioskProfileLoader> kiosk_profile_loader_; | 38 scoped_ptr<KioskProfileLoader> kiosk_profile_loader_; |
| 33 | 39 |
| 40 static base::FilePath* demo_app_path_; | |
| 41 | |
| 34 DISALLOW_COPY_AND_ASSIGN(DemoAppLauncher); | 42 DISALLOW_COPY_AND_ASSIGN(DemoAppLauncher); |
| 35 }; | 43 }; |
| 36 | 44 |
| 37 } // namespace chromeos | 45 } // namespace chromeos |
| 38 | 46 |
| 39 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_DEMO_MODE_DEMO_APP_LAUNCHER_H_ | 47 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_DEMO_MODE_DEMO_APP_LAUNCHER_H_ |
| OLD | NEW |