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/app_launch_controller.h

Issue 127183002: kiosk: Fix StartupAppLauncher::LaunchApp crash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: per discussion Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/app_launch_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/callback_forward.h" 11 #include "base/callback_forward.h"
12 #include "base/memory/ref_counted.h"
13 #include "base/memory/weak_ptr.h"
14 #include "base/timer/timer.h" 12 #include "base/timer/timer.h"
15 #include "chrome/browser/chromeos/app_mode/kiosk_app_launch_error.h" 13 #include "chrome/browser/chromeos/app_mode/kiosk_app_launch_error.h"
16 #include "chrome/browser/chromeos/app_mode/kiosk_profile_loader.h" 14 #include "chrome/browser/chromeos/app_mode/kiosk_profile_loader.h"
17 #include "chrome/browser/chromeos/app_mode/startup_app_launcher.h" 15 #include "chrome/browser/chromeos/app_mode/startup_app_launcher.h"
18 #include "chrome/browser/chromeos/login/app_launch_signin_screen.h" 16 #include "chrome/browser/chromeos/login/app_launch_signin_screen.h"
19 #include "chrome/browser/chromeos/login/screens/app_launch_splash_screen_actor.h " 17 #include "chrome/browser/chromeos/login/screens/app_launch_splash_screen_actor.h "
20 #include "content/public/browser/notification_observer.h" 18 #include "content/public/browser/notification_observer.h"
21 #include "content/public/browser/notification_registrar.h" 19 #include "content/public/browser/notification_registrar.h"
22 20
23 class Profile; 21 class Profile;
24 22
25 namespace chromeos { 23 namespace chromeos {
26 24
27 class LoginDisplayHost; 25 class LoginDisplayHost;
28 class OobeDisplay; 26 class OobeDisplay;
29 class UserManager; 27 class UserManager;
30 28
31 // Controller for the kiosk app launch process, responsible for 29 // Controller for the kiosk app launch process, responsible for
32 // coordinating loading the kiosk profile, launching the app, and 30 // coordinating loading the kiosk profile, launching the app, and
33 // updating the splash screen UI. 31 // updating the splash screen UI.
34 class AppLaunchController 32 class AppLaunchController
35 : public base::SupportsWeakPtr<AppLaunchController>, 33 : public AppLaunchSplashScreenActor::Delegate,
36 public AppLaunchSplashScreenActor::Delegate,
37 public KioskProfileLoader::Delegate, 34 public KioskProfileLoader::Delegate,
38 public StartupAppLauncher::Delegate, 35 public StartupAppLauncher::Delegate,
39 public AppLaunchSigninScreen::Delegate, 36 public AppLaunchSigninScreen::Delegate,
40 public content::NotificationObserver { 37 public content::NotificationObserver {
41 public: 38 public:
42 typedef base::Callback<bool()> ReturnBoolCallback; 39 typedef base::Callback<bool()> ReturnBoolCallback;
43 40
44 AppLaunchController(const std::string& app_id, 41 AppLaunchController(const std::string& app_id,
45 LoginDisplayHost* host, 42 LoginDisplayHost* host,
46 OobeDisplay* oobe_display); 43 OobeDisplay* oobe_display);
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 AppLaunchSplashScreenActor* app_launch_splash_screen_actor_; 112 AppLaunchSplashScreenActor* app_launch_splash_screen_actor_;
116 scoped_ptr<KioskProfileLoader> kiosk_profile_loader_; 113 scoped_ptr<KioskProfileLoader> kiosk_profile_loader_;
117 scoped_ptr<StartupAppLauncher> startup_app_launcher_; 114 scoped_ptr<StartupAppLauncher> startup_app_launcher_;
118 scoped_ptr<AppLaunchSigninScreen> signin_screen_; 115 scoped_ptr<AppLaunchSigninScreen> signin_screen_;
119 scoped_ptr<AppWindowWatcher> app_window_watcher_; 116 scoped_ptr<AppWindowWatcher> app_window_watcher_;
120 117
121 content::NotificationRegistrar registrar_; 118 content::NotificationRegistrar registrar_;
122 bool webui_visible_; 119 bool webui_visible_;
123 bool launcher_ready_; 120 bool launcher_ready_;
124 121
122 // A timer to ensure the app splash is shown for a minimum amount of time.
123 base::OneShotTimer<AppLaunchController> splash_wait_timer_;
124
125 base::OneShotTimer<AppLaunchController> network_wait_timer_; 125 base::OneShotTimer<AppLaunchController> network_wait_timer_;
126 bool waiting_for_network_; 126 bool waiting_for_network_;
127 bool network_wait_timedout_; 127 bool network_wait_timedout_;
128 bool showing_network_dialog_; 128 bool showing_network_dialog_;
129 int64 launch_splash_start_time_; 129 int64 launch_splash_start_time_;
130 130
131 static bool skip_splash_wait_; 131 static bool skip_splash_wait_;
132 static int network_wait_time_; 132 static int network_wait_time_;
133 static base::Closure* network_timeout_callback_; 133 static base::Closure* network_timeout_callback_;
134 static ReturnBoolCallback* can_configure_network_callback_; 134 static ReturnBoolCallback* can_configure_network_callback_;
135 static ReturnBoolCallback* need_owner_auth_to_configure_network_callback_; 135 static ReturnBoolCallback* need_owner_auth_to_configure_network_callback_;
136 136
137 DISALLOW_COPY_AND_ASSIGN(AppLaunchController); 137 DISALLOW_COPY_AND_ASSIGN(AppLaunchController);
138 }; 138 };
139 139
140 } // namespace chromeos 140 } // namespace chromeos
141 141
142 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_APP_LAUNCH_CONTROLLER_H_ 142 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_APP_LAUNCH_CONTROLLER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/app_launch_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698