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

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

Issue 14208014: Simplify adding callbacks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix. Created 7 years, 8 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 "chrome/browser/chromeos/login/screens/reset_screen_actor.h" 9 #include "chrome/browser/chromeos/login/screens/reset_screen_actor.h"
10 #include "chrome/browser/ui/webui/chromeos/login/base_screen_handler.h" 10 #include "chrome/browser/ui/webui/chromeos/login/base_screen_handler.h"
11 #include "content/public/browser/web_ui.h" 11 #include "content/public/browser/web_ui.h"
12 12
13 namespace base {
14 class DictionaryValue;
15 class ListValue;
16 }
17
18 namespace chromeos { 13 namespace chromeos {
19 14
20 // WebUI implementation of ResetScreenActor. 15 // WebUI implementation of ResetScreenActor.
21 class ResetScreenHandler : public ResetScreenActor, 16 class ResetScreenHandler : public ResetScreenActor,
22 public BaseScreenHandler { 17 public BaseScreenHandler {
23 public: 18 public:
24 ResetScreenHandler(); 19 ResetScreenHandler();
25 virtual ~ResetScreenHandler(); 20 virtual ~ResetScreenHandler();
26 21
27 // ResetScreenActor implementation: 22 // ResetScreenActor implementation:
28 virtual void PrepareToShow() OVERRIDE; 23 virtual void PrepareToShow() OVERRIDE;
29 virtual void Show() OVERRIDE; 24 virtual void Show() OVERRIDE;
30 virtual void Hide() OVERRIDE; 25 virtual void Hide() OVERRIDE;
31 virtual void SetDelegate(Delegate* delegate) OVERRIDE; 26 virtual void SetDelegate(Delegate* delegate) OVERRIDE;
32 27
33 // BaseScreenHandler implementation: 28 // BaseScreenHandler implementation:
34 virtual void DeclareLocalizedValues(LocalizedValuesBuilder* builder) OVERRIDE; 29 virtual void DeclareLocalizedValues(LocalizedValuesBuilder* builder) OVERRIDE;
35 virtual void Initialize() OVERRIDE; 30 virtual void Initialize() OVERRIDE;
36 31
37 // WebUIMessageHandler implementation: 32 // WebUIMessageHandler implementation:
38 virtual void RegisterMessages() OVERRIDE; 33 virtual void RegisterMessages() OVERRIDE;
39 34
40 private: 35 private:
41 // JS messages handlers. 36 // JS messages handlers.
42 void HandleOnCancel(const base::ListValue* args); 37 void HandleOnCancel();
43 void HandleOnReset(const base::ListValue* args); 38 void HandleOnReset();
44 39
45 Delegate* delegate_; 40 Delegate* delegate_;
46 41
47 // Keeps whether screen should be shown right after initialization. 42 // Keeps whether screen should be shown right after initialization.
48 bool show_on_init_; 43 bool show_on_init_;
49 44
50 DISALLOW_COPY_AND_ASSIGN(ResetScreenHandler); 45 DISALLOW_COPY_AND_ASSIGN(ResetScreenHandler);
51 }; 46 };
52 47
53 } // namespace chromeos 48 } // namespace chromeos
54 49
55 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_RESET_SCREEN_HANDLER_H_ 50 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_RESET_SCREEN_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698