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

Side by Side Diff: chrome/browser/ui/webui/chromeos/login/reset_screen_handler.h

Issue 328383003: Revert of Introduce SessionManager that will contain code to start user session on Chrome OS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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
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_UI_WEBUI_CHROMEOS_LOGIN_RESET_SCREEN_HANDLER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_RESET_SCREEN_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_RESET_SCREEN_HANDLER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_RESET_SCREEN_HANDLER_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
11 #include "chrome/browser/chromeos/login/help_app_launcher.h" 11 #include "chrome/browser/chromeos/login/help_app_launcher.h"
12 #include "chrome/browser/chromeos/login/screens/reset_screen_actor.h" 12 #include "chrome/browser/chromeos/login/screens/reset_screen_actor.h"
13 #include "chrome/browser/ui/webui/chromeos/login/base_screen_handler.h" 13 #include "chrome/browser/ui/webui/chromeos/login/base_screen_handler.h"
14 #include "chromeos/dbus/update_engine_client.h" 14 #include "chromeos/dbus/update_engine_client.h"
15 #include "content/public/browser/web_ui.h" 15 #include "content/public/browser/web_ui.h"
16 16
17 class PrefRegistrySimple;
18
19 namespace chromeos { 17 namespace chromeos {
20 18
21 // WebUI implementation of ResetScreenActor. 19 // WebUI implementation of ResetScreenActor.
22 class ResetScreenHandler : public ResetScreenActor, 20 class ResetScreenHandler : public ResetScreenActor,
23 public BaseScreenHandler, 21 public BaseScreenHandler,
24 public UpdateEngineClient::Observer { 22 public UpdateEngineClient::Observer {
25 public: 23 public:
26 ResetScreenHandler(); 24 ResetScreenHandler();
27 virtual ~ResetScreenHandler(); 25 virtual ~ResetScreenHandler();
28 26
29 // ResetScreenActor implementation: 27 // ResetScreenActor implementation:
30 virtual void PrepareToShow() OVERRIDE; 28 virtual void PrepareToShow() OVERRIDE;
31 virtual void Show() OVERRIDE; 29 virtual void Show() OVERRIDE;
32 virtual void Hide() OVERRIDE; 30 virtual void Hide() OVERRIDE;
33 virtual void SetDelegate(Delegate* delegate) OVERRIDE; 31 virtual void SetDelegate(Delegate* delegate) OVERRIDE;
34 32
35 // BaseScreenHandler implementation: 33 // BaseScreenHandler implementation:
36 virtual void DeclareLocalizedValues(LocalizedValuesBuilder* builder) OVERRIDE; 34 virtual void DeclareLocalizedValues(LocalizedValuesBuilder* builder) OVERRIDE;
37 virtual void Initialize() OVERRIDE; 35 virtual void Initialize() OVERRIDE;
38 36
39 // WebUIMessageHandler implementation: 37 // WebUIMessageHandler implementation:
40 virtual void RegisterMessages() OVERRIDE; 38 virtual void RegisterMessages() OVERRIDE;
41 39
42 // UpdateEngineClient::Observer implementation: 40 // UpdateEngineClient::Observer implementation:
43 virtual void UpdateStatusChanged( 41 virtual void UpdateStatusChanged(
44 const UpdateEngineClient::Status& status) OVERRIDE; 42 const UpdateEngineClient::Status& status) OVERRIDE;
45 43
46 void OnRollbackCheck(bool can_rollback); 44 void OnRollbackCheck(bool can_rollback);
47 45
48 // Registers Local State preferences.
49 static void RegisterPrefs(PrefRegistrySimple* registry);
50
51 private: 46 private:
52 // JS messages handlers. 47 // JS messages handlers.
53 void HandleOnCancel(); 48 void HandleOnCancel();
54 void HandleOnRestart(bool should_rollback); 49 void HandleOnRestart(bool should_rollback);
55 void HandleOnPowerwash(bool rollback_checked); 50 void HandleOnPowerwash(bool rollback_checked);
56 void HandleOnLearnMore(); 51 void HandleOnLearnMore();
57 52
58 void ChooseAndApplyShowScenario(); 53 void ChooseAndApplyShowScenario();
59 void OnRollbackFlagFileCheckDone(scoped_ptr<bool> file_exists); 54 void OnRollbackFlagFileCheckDone(scoped_ptr<bool> file_exists);
60 void ShowWithParams(); 55 void ShowWithParams();
(...skipping 21 matching lines...) Expand all
82 bool preparing_for_rollback_; 77 bool preparing_for_rollback_;
83 78
84 base::WeakPtrFactory<ResetScreenHandler> weak_ptr_factory_; 79 base::WeakPtrFactory<ResetScreenHandler> weak_ptr_factory_;
85 80
86 DISALLOW_COPY_AND_ASSIGN(ResetScreenHandler); 81 DISALLOW_COPY_AND_ASSIGN(ResetScreenHandler);
87 }; 82 };
88 83
89 } // namespace chromeos 84 } // namespace chromeos
90 85
91 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_RESET_SCREEN_HANDLER_H_ 86 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_RESET_SCREEN_HANDLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/prefs/browser_prefs.cc ('k') | chrome/browser/ui/webui/chromeos/login/reset_screen_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698