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

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

Issue 672233002: ScreenObserver::(Set|Get)UsageStatisticsReporting() are extracted into EulaScreen::Delegate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 6 years, 2 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_WIZARD_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_WIZARD_CONTROLLER_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_WIZARD_CONTROLLER_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_WIZARD_CONTROLLER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/containers/hash_tables.h" 13 #include "base/containers/hash_tables.h"
14 #include "base/gtest_prod_util.h" 14 #include "base/gtest_prod_util.h"
15 #include "base/memory/linked_ptr.h" 15 #include "base/memory/linked_ptr.h"
16 #include "base/memory/scoped_ptr.h" 16 #include "base/memory/scoped_ptr.h"
17 #include "base/memory/weak_ptr.h" 17 #include "base/memory/weak_ptr.h"
18 #include "base/observer_list.h" 18 #include "base/observer_list.h"
19 #include "base/time/time.h" 19 #include "base/time/time.h"
20 #include "base/timer/timer.h" 20 #include "base/timer/timer.h"
21 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" 21 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h"
22 #include "chrome/browser/chromeos/login/screen_manager.h" 22 #include "chrome/browser/chromeos/login/screen_manager.h"
23 #include "chrome/browser/chromeos/login/screens/eula_screen.h"
23 #include "chrome/browser/chromeos/login/screens/screen_observer.h" 24 #include "chrome/browser/chromeos/login/screens/screen_observer.h"
24 25
25 class PrefRegistrySimple; 26 class PrefRegistrySimple;
26 class PrefService; 27 class PrefService;
27 28
28 namespace base { 29 namespace base {
29 class DictionaryValue; 30 class DictionaryValue;
30 } 31 }
31 32
32 namespace pairing_chromeos { 33 namespace pairing_chromeos {
(...skipping 14 matching lines...) Expand all
47 class OobeDisplay; 48 class OobeDisplay;
48 class SimpleGeolocationProvider; 49 class SimpleGeolocationProvider;
49 class SupervisedUserCreationScreen; 50 class SupervisedUserCreationScreen;
50 class TimeZoneProvider; 51 class TimeZoneProvider;
51 struct TimeZoneResponseData; 52 struct TimeZoneResponseData;
52 class UpdateScreen; 53 class UpdateScreen;
53 class UserImageScreen; 54 class UserImageScreen;
54 55
55 // Class that manages control flow between wizard screens. Wizard controller 56 // Class that manages control flow between wizard screens. Wizard controller
56 // interacts with screen controllers to move the user between screens. 57 // interacts with screen controllers to move the user between screens.
57 class WizardController : public ScreenObserver, public ScreenManager { 58 class WizardController : public ScreenObserver,
59 public ScreenManager,
60 public EulaScreen::Delegate {
58 public: 61 public:
59 // Observes screen changes. 62 // Observes screen changes.
60 class Observer { 63 class Observer {
61 public: 64 public:
62 // Called before a screen change happens. 65 // Called before a screen change happens.
63 virtual void OnScreenChanged(BaseScreen* next_screen) = 0; 66 virtual void OnScreenChanged(BaseScreen* next_screen) = 0;
64 67
65 // Called after the browser session has started. 68 // Called after the browser session has started.
66 virtual void OnSessionStart() = 0; 69 virtual void OnSessionStart() = 0;
67 }; 70 };
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 void PerformPostEulaActions(); 235 void PerformPostEulaActions();
233 236
234 // Actions that should be done right after update stage is finished. 237 // Actions that should be done right after update stage is finished.
235 void PerformOOBECompletedActions(); 238 void PerformOOBECompletedActions();
236 239
237 // Overridden from ScreenObserver: 240 // Overridden from ScreenObserver:
238 virtual void OnExit(ExitCodes exit_code) override; 241 virtual void OnExit(ExitCodes exit_code) override;
239 virtual void ShowCurrentScreen() override; 242 virtual void ShowCurrentScreen() override;
240 virtual void OnSetUserNamePassword(const std::string& username, 243 virtual void OnSetUserNamePassword(const std::string& username,
241 const std::string& password) override; 244 const std::string& password) override;
242 virtual void SetUsageStatisticsReporting(bool val) override;
243 virtual bool GetUsageStatisticsReporting() const override;
244 virtual void SetHostConfiguration() override; 245 virtual void SetHostConfiguration() override;
245 virtual void ConfigureHost(bool accepted_eula, 246 virtual void ConfigureHost(bool accepted_eula,
246 const std::string& lang, 247 const std::string& lang,
247 const std::string& timezone, 248 const std::string& timezone,
248 bool send_reports, 249 bool send_reports,
249 const std::string& keyboard_layout) override; 250 const std::string& keyboard_layout) override;
250 virtual ErrorScreen* GetErrorScreen() override; 251 virtual ErrorScreen* GetErrorScreen() override;
251 virtual void ShowErrorScreen() override; 252 virtual void ShowErrorScreen() override;
252 virtual void HideErrorScreen(BaseScreen* parent_screen) override; 253 virtual void HideErrorScreen(BaseScreen* parent_screen) override;
253 254
255 // Overridden from EulaScreen::Delegate:
256 virtual void SetUsageStatisticsReporting(bool val) override;
257 virtual bool GetUsageStatisticsReporting() const override;
258
254 // Notification of a change in the state of an accessibility setting. 259 // Notification of a change in the state of an accessibility setting.
255 void OnAccessibilityStatusChanged( 260 void OnAccessibilityStatusChanged(
256 const AccessibilityStatusEventDetails& details); 261 const AccessibilityStatusEventDetails& details);
257 262
258 // Switches from one screen to another. 263 // Switches from one screen to another.
259 void SetCurrentScreen(BaseScreen* screen); 264 void SetCurrentScreen(BaseScreen* screen);
260 265
261 // Switches from one screen to another with delay before showing. Calling 266 // Switches from one screen to another with delay before showing. Calling
262 // ShowCurrentScreen directly forces screen to be shown immediately. 267 // ShowCurrentScreen directly forces screen to be shown immediately.
263 void SetCurrentScreenSmooth(BaseScreen* screen, bool use_smoothing); 268 void SetCurrentScreenSmooth(BaseScreen* screen, bool use_smoothing);
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 shark_connection_listener_; 428 shark_connection_listener_;
424 429
425 base::WeakPtrFactory<WizardController> weak_factory_; 430 base::WeakPtrFactory<WizardController> weak_factory_;
426 431
427 DISALLOW_COPY_AND_ASSIGN(WizardController); 432 DISALLOW_COPY_AND_ASSIGN(WizardController);
428 }; 433 };
429 434
430 } // namespace chromeos 435 } // namespace chromeos
431 436
432 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WIZARD_CONTROLLER_H_ 437 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WIZARD_CONTROLLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/screens/screen_observer.h ('k') | chrome/browser/chromeos/login/wizard_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698