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

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

Issue 7382001: [ChromeOS] WebUI OOBE/Login refactoring. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync and merge Created 9 years, 5 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_EULA_SCREEN_HANDLER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_EULA_SCREEN_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_EULA_SCREEN_HANDLER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_EULA_SCREEN_HANDLER_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "chrome/browser/chromeos/login/eula_screen_actor.h" 10 #include "chrome/browser/chromeos/login/eula_screen_actor.h"
11 #include "chrome/browser/chromeos/login/tpm_password_fetcher.h" 11 #include "chrome/browser/chromeos/login/tpm_password_fetcher.h"
12 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" 12 #include "chrome/browser/ui/webui/chromeos/login/base_screen_handler.h"
13 #include "content/browser/webui/web_ui.h" 13 #include "content/browser/webui/web_ui.h"
14 14
15 namespace base { 15 namespace base {
16 class DictionaryValue; 16 class DictionaryValue;
17 class ListValue; 17 class ListValue;
18 } 18 }
19 19
20 namespace chromeos { 20 namespace chromeos {
21 21
22 class HelpAppLauncher; 22 class HelpAppLauncher;
23 23
24 // WebUI implementation of EulaScreenActor. It is used to interact 24 // WebUI implementation of EulaScreenActor. It is used to interact
25 // with the eula part of the JS page. 25 // with the eula part of the JS page.
26 class EulaScreenHandler : public EulaScreenActor, 26 class EulaScreenHandler : public EulaScreenActor,
27 public OobeMessageHandler, 27 public BaseScreenHandler,
28 public TpmPasswordFetcherDelegate { 28 public TpmPasswordFetcherDelegate {
29 public: 29 public:
30 EulaScreenHandler(); 30 EulaScreenHandler();
31 virtual ~EulaScreenHandler(); 31 virtual ~EulaScreenHandler();
32 32
33 // EulaScreenActor implementation: 33 // EulaScreenActor implementation:
34 virtual void PrepareToShow(); 34 virtual void PrepareToShow();
35 virtual void Show(); 35 virtual void Show();
36 virtual void Hide(); 36 virtual void Hide();
37 virtual void SetDelegate(Delegate* delegate); 37 virtual void SetDelegate(Delegate* delegate);
38 virtual void OnPasswordFetched(const std::string& tpm_password); 38 virtual void OnPasswordFetched(const std::string& tpm_password);
39 39
40 // OobeMessageHandler implementation: 40 // BaseScreenHandler implementation:
41 virtual void GetLocalizedStrings(base::DictionaryValue* localized_strings); 41 virtual void GetLocalizedStrings(base::DictionaryValue* localized_strings);
42 virtual void Initialize(); 42 virtual void Initialize();
43 43
44 // WebUIMessageHandler implementation: 44 // WebUIMessageHandler implementation:
45 virtual void RegisterMessages(); 45 virtual void RegisterMessages();
46 46
47 private: 47 private:
48 // JS messages handlers. 48 // JS messages handlers.
49 void HandleOnExit(const base::ListValue* args); 49 void HandleOnExit(const base::ListValue* args);
50 void HandleOnLearnMore(const base::ListValue* args); 50 void HandleOnLearnMore(const base::ListValue* args);
51 void HandleOnTpmPopupOpened(const base::ListValue* args); 51 void HandleOnTpmPopupOpened(const base::ListValue* args);
52 52
53 Delegate* delegate_; 53 Delegate* delegate_;
54 54
55 // Help application used for help dialogs. 55 // Help application used for help dialogs.
56 scoped_refptr<HelpAppLauncher> help_app_; 56 scoped_refptr<HelpAppLauncher> help_app_;
57 57
58 // Keeps whether screen should be shown right after initialization. 58 // Keeps whether screen should be shown right after initialization.
59 bool show_on_init_; 59 bool show_on_init_;
60 60
61 DISALLOW_COPY_AND_ASSIGN(EulaScreenHandler); 61 DISALLOW_COPY_AND_ASSIGN(EulaScreenHandler);
62 }; 62 };
63 63
64 } // namespace chromeos 64 } // namespace chromeos
65 65
66 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_EULA_SCREEN_HANDLER_H_ 66 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_EULA_SCREEN_HANDLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/chromeos/login/base_screen_handler.cc ('k') | chrome/browser/ui/webui/chromeos/login/login_ui.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698