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

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

Issue 10928088: Factory reset screen is added (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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.
Nikita (slow) 2012/09/12 13:22:21 Same for this file. 1. Copy it somewhere else on f
glotov 2012/09/12 22:40:25 And it does not track. Why?
Nikita (slow) 2012/09/13 07:35:59 It is tracking (A+) and you could see diff with EU
glotov 2012/09/14 16:37:02 Done.
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_EULA_SCREEN_HANDLER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_RESET_SCREEN_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_EULA_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 "chrome/browser/chromeos/login/reset_screen_actor.h"
10 #include "chrome/browser/chromeos/login/eula_screen_actor.h"
11 #include "chrome/browser/chromeos/login/tpm_password_fetcher.h"
12 #include "chrome/browser/ui/webui/chromeos/login/base_screen_handler.h" 10 #include "chrome/browser/ui/webui/chromeos/login/base_screen_handler.h"
13 #include "content/public/browser/web_ui.h" 11 #include "content/public/browser/web_ui.h"
14 12
15 namespace base { 13 namespace base {
16 class DictionaryValue; 14 class DictionaryValue;
17 class ListValue; 15 class ListValue;
18 } 16 }
19 17
20 namespace chromeos { 18 namespace chromeos {
21 19
22 class HelpAppLauncher; 20 class HelpAppLauncher;
Nikita (slow) 2012/09/12 13:22:21 Please remove.
glotov 2012/09/12 22:40:25 Done.
23 21
24 // WebUI implementation of EulaScreenActor. It is used to interact 22 // WebUI implementation of ResetScreenActor. It is used to interact
Nikita (slow) 2012/09/12 13:22:21 You don't need second comment
glotov 2012/09/12 22:40:25 Done.
25 // with the eula part of the JS page. 23 // with the eula part of the JS page.
26 class EulaScreenHandler : public EulaScreenActor, 24 class ResetScreenHandler : public ResetScreenActor,
27 public BaseScreenHandler, 25 public BaseScreenHandler {
28 public TpmPasswordFetcherDelegate {
29 public: 26 public:
30 EulaScreenHandler(); 27 ResetScreenHandler();
31 virtual ~EulaScreenHandler(); 28 virtual ~ResetScreenHandler();
32 29
33 // EulaScreenActor implementation: 30 // ResetScreenActor implementation:
34 virtual void PrepareToShow() OVERRIDE; 31 virtual void PrepareToShow() OVERRIDE;
35 virtual void Show() OVERRIDE; 32 virtual void Show() OVERRIDE;
36 virtual void Hide() OVERRIDE; 33 virtual void Hide() OVERRIDE;
37 virtual void SetDelegate(Delegate* delegate) OVERRIDE; 34 virtual void SetDelegate(Delegate* delegate) OVERRIDE;
38 virtual void OnPasswordFetched(const std::string& tpm_password) OVERRIDE;
39 35
40 // BaseScreenHandler implementation: 36 // BaseScreenHandler implementation:
41 virtual void GetLocalizedStrings( 37 virtual void GetLocalizedStrings(
42 base::DictionaryValue* localized_strings) OVERRIDE; 38 base::DictionaryValue* localized_strings) OVERRIDE;
43 virtual void Initialize() OVERRIDE; 39 virtual void Initialize() OVERRIDE;
44 40
45 // WebUIMessageHandler implementation: 41 // WebUIMessageHandler implementation:
46 virtual void RegisterMessages() OVERRIDE; 42 virtual void RegisterMessages() OVERRIDE;
47 43
48 private: 44 private:
49 // JS messages handlers. 45 // JS messages handlers.
50 void HandleOnExit(const base::ListValue* args); 46 void HandleOnCancel(const base::ListValue* args);
51 void HandleOnLearnMore(const base::ListValue* args); 47 void HandleOnReset(const base::ListValue* args);
52 void HandleOnTpmPopupOpened(const base::ListValue* args);
53 48
54 Delegate* delegate_; 49 Delegate* delegate_;
55 50
56 // Help application used for help dialogs.
57 scoped_refptr<HelpAppLauncher> help_app_;
58
59 // Keeps whether screen should be shown right after initialization. 51 // Keeps whether screen should be shown right after initialization.
60 bool show_on_init_; 52 bool show_on_init_;
61 53
62 DISALLOW_COPY_AND_ASSIGN(EulaScreenHandler); 54 DISALLOW_COPY_AND_ASSIGN(ResetScreenHandler);
63 }; 55 };
64 56
65 } // namespace chromeos 57 } // namespace chromeos
66 58
67 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_EULA_SCREEN_HANDLER_H_ 59 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_RESET_SCREEN_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698