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

Side by Side Diff: chrome/browser/chromeos/login/app_launch_controller.h

Issue 2700303002: cros: Unify oobe View/Actor naming to just View. (Closed)
Patch Set: Rebase Created 3 years, 10 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 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_APP_LAUNCH_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_APP_LAUNCH_CONTROLLER_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_APP_LAUNCH_CONTROLLER_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_APP_LAUNCH_CONTROLLER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
11 11
12 #include "base/callback_forward.h" 12 #include "base/callback_forward.h"
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/timer/timer.h" 14 #include "base/timer/timer.h"
15 #include "chrome/browser/chromeos/app_mode/kiosk_app_launch_error.h" 15 #include "chrome/browser/chromeos/app_mode/kiosk_app_launch_error.h"
16 #include "chrome/browser/chromeos/app_mode/kiosk_profile_loader.h" 16 #include "chrome/browser/chromeos/app_mode/kiosk_profile_loader.h"
17 #include "chrome/browser/chromeos/app_mode/startup_app_launcher.h" 17 #include "chrome/browser/chromeos/app_mode/startup_app_launcher.h"
18 #include "chrome/browser/chromeos/login/app_launch_signin_screen.h" 18 #include "chrome/browser/chromeos/login/app_launch_signin_screen.h"
19 #include "chrome/browser/chromeos/login/screens/app_launch_splash_screen_actor.h " 19 #include "chrome/browser/chromeos/login/screens/app_launch_splash_screen_view.h"
20 #include "content/public/browser/notification_observer.h" 20 #include "content/public/browser/notification_observer.h"
21 #include "content/public/browser/notification_registrar.h" 21 #include "content/public/browser/notification_registrar.h"
22 22
23 class Profile; 23 class Profile;
24 24
25 namespace chromeos { 25 namespace chromeos {
26 26
27 class LoginDisplayHost; 27 class LoginDisplayHost;
28 class OobeUI; 28 class OobeUI;
29 29
30 // Controller for the kiosk app launch process, responsible for 30 // Controller for the kiosk app launch process, responsible for
31 // coordinating loading the kiosk profile, launching the app, and 31 // coordinating loading the kiosk profile, launching the app, and
32 // updating the splash screen UI. 32 // updating the splash screen UI.
33 class AppLaunchController 33 class AppLaunchController : public AppLaunchSplashScreenView::Delegate,
34 : public AppLaunchSplashScreenActor::Delegate, 34 public KioskProfileLoader::Delegate,
35 public KioskProfileLoader::Delegate, 35 public StartupAppLauncher::Delegate,
36 public StartupAppLauncher::Delegate, 36 public AppLaunchSigninScreen::Delegate,
37 public AppLaunchSigninScreen::Delegate, 37 public content::NotificationObserver {
38 public content::NotificationObserver {
39 public: 38 public:
40 typedef base::Callback<bool()> ReturnBoolCallback; 39 typedef base::Callback<bool()> ReturnBoolCallback;
41 40
42 AppLaunchController(const std::string& app_id, 41 AppLaunchController(const std::string& app_id,
43 bool diagnostic_mode, 42 bool diagnostic_mode,
44 LoginDisplayHost* host, 43 LoginDisplayHost* host,
45 OobeUI* oobe_ui); 44 OobeUI* oobe_ui);
46 45
47 ~AppLaunchController() override; 46 ~AppLaunchController() override;
48 47
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 void MaybeShowNetworkConfigureUI(); 84 void MaybeShowNetworkConfigureUI();
86 85
87 // Show network configuration UI when ready (i.e. after app profile is 86 // Show network configuration UI when ready (i.e. after app profile is
88 // loaded). 87 // loaded).
89 void ShowNetworkConfigureUIWhenReady(); 88 void ShowNetworkConfigureUIWhenReady();
90 89
91 // KioskProfileLoader::Delegate overrides: 90 // KioskProfileLoader::Delegate overrides:
92 void OnProfileLoaded(Profile* profile) override; 91 void OnProfileLoaded(Profile* profile) override;
93 void OnProfileLoadFailed(KioskAppLaunchError::Error error) override; 92 void OnProfileLoadFailed(KioskAppLaunchError::Error error) override;
94 93
95 // AppLaunchSplashScreenActor::Delegate overrides: 94 // AppLaunchSplashScreenView::Delegate overrides:
96 void OnConfigureNetwork() override; 95 void OnConfigureNetwork() override;
97 void OnCancelAppLaunch() override; 96 void OnCancelAppLaunch() override;
98 void OnNetworkConfigRequested(bool requested) override; 97 void OnNetworkConfigRequested(bool requested) override;
99 void OnNetworkStateChanged(bool online) override; 98 void OnNetworkStateChanged(bool online) override;
100 99
101 // StartupAppLauncher::Delegate overrides: 100 // StartupAppLauncher::Delegate overrides:
102 void InitializeNetwork() override; 101 void InitializeNetwork() override;
103 bool IsNetworkReady() override; 102 bool IsNetworkReady() override;
104 bool ShouldSkipAppInstallation() override; 103 bool ShouldSkipAppInstallation() override;
105 void OnLoadingOAuthFile() override; 104 void OnLoadingOAuthFile() override;
(...skipping 10 matching lines...) Expand all
116 // content::NotificationObserver overrides: 115 // content::NotificationObserver overrides:
117 void Observe(int type, 116 void Observe(int type,
118 const content::NotificationSource& source, 117 const content::NotificationSource& source,
119 const content::NotificationDetails& details) override; 118 const content::NotificationDetails& details) override;
120 119
121 Profile* profile_ = nullptr; 120 Profile* profile_ = nullptr;
122 const std::string app_id_; 121 const std::string app_id_;
123 const bool diagnostic_mode_; 122 const bool diagnostic_mode_;
124 LoginDisplayHost* host_ = nullptr; 123 LoginDisplayHost* host_ = nullptr;
125 OobeUI* oobe_ui_ = nullptr; 124 OobeUI* oobe_ui_ = nullptr;
126 AppLaunchSplashScreenActor* app_launch_splash_screen_actor_ = nullptr; 125 AppLaunchSplashScreenView* app_launch_splash_screen_view_ = nullptr;
127 std::unique_ptr<KioskProfileLoader> kiosk_profile_loader_; 126 std::unique_ptr<KioskProfileLoader> kiosk_profile_loader_;
128 std::unique_ptr<StartupAppLauncher> startup_app_launcher_; 127 std::unique_ptr<StartupAppLauncher> startup_app_launcher_;
129 std::unique_ptr<AppLaunchSigninScreen> signin_screen_; 128 std::unique_ptr<AppLaunchSigninScreen> signin_screen_;
130 std::unique_ptr<AppWindowWatcher> app_window_watcher_; 129 std::unique_ptr<AppWindowWatcher> app_window_watcher_;
131 130
132 content::NotificationRegistrar registrar_; 131 content::NotificationRegistrar registrar_;
133 bool webui_visible_ = false; 132 bool webui_visible_ = false;
134 bool launcher_ready_ = false; 133 bool launcher_ready_ = false;
135 134
136 // A timer to ensure the app splash is shown for a minimum amount of time. 135 // A timer to ensure the app splash is shown for a minimum amount of time.
(...skipping 12 matching lines...) Expand all
149 static base::Closure* network_timeout_callback_; 148 static base::Closure* network_timeout_callback_;
150 static ReturnBoolCallback* can_configure_network_callback_; 149 static ReturnBoolCallback* can_configure_network_callback_;
151 static ReturnBoolCallback* need_owner_auth_to_configure_network_callback_; 150 static ReturnBoolCallback* need_owner_auth_to_configure_network_callback_;
152 151
153 DISALLOW_COPY_AND_ASSIGN(AppLaunchController); 152 DISALLOW_COPY_AND_ASSIGN(AppLaunchController);
154 }; 153 };
155 154
156 } // namespace chromeos 155 } // namespace chromeos
157 156
158 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_APP_LAUNCH_CONTROLLER_H_ 157 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_APP_LAUNCH_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698