OLD | NEW |
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_BASE_SCREEN_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_BASE_SCREEN_HANDLER_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_BASE_SCREEN_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_BASE_SCREEN_HANDLER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 class Value; | 24 class Value; |
25 } | 25 } |
26 | 26 |
27 namespace login { | 27 namespace login { |
28 class LocalizedValuesBuilder; | 28 class LocalizedValuesBuilder; |
29 } | 29 } |
30 | 30 |
31 namespace chromeos { | 31 namespace chromeos { |
32 | 32 |
33 class BaseScreen; | 33 class BaseScreen; |
| 34 class OobeUI; |
34 | 35 |
35 // Base class for the OOBE/Login WebUI handlers. | 36 // Base class for the OOBE/Login WebUI handlers. |
36 class BaseScreenHandler : public content::WebUIMessageHandler, | 37 class BaseScreenHandler : public content::WebUIMessageHandler, |
37 public ModelViewChannel { | 38 public ModelViewChannel { |
38 public: | 39 public: |
39 // C-tor used when JS screen prefix is not needed. | 40 // C-tor used when JS screen prefix is not needed. |
40 BaseScreenHandler(); | 41 BaseScreenHandler(); |
41 | 42 |
42 // C-tor used when JS screen prefix is needed. | 43 // C-tor used when JS screen prefix is needed. |
43 explicit BaseScreenHandler(const std::string& js_screen_path); | 44 explicit BaseScreenHandler(const std::string& js_screen_path); |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 | 146 |
146 // Called when the page is ready and handler can do initialization. | 147 // Called when the page is ready and handler can do initialization. |
147 virtual void Initialize() = 0; | 148 virtual void Initialize() = 0; |
148 | 149 |
149 // Show selected WebUI |screen|. | 150 // Show selected WebUI |screen|. |
150 void ShowScreen(OobeScreen screen); | 151 void ShowScreen(OobeScreen screen); |
151 // Show selected WebUI |screen|. Pass screen initialization using the |data| | 152 // Show selected WebUI |screen|. Pass screen initialization using the |data| |
152 // parameter. | 153 // parameter. |
153 void ShowScreenWithData(OobeScreen screen, const base::DictionaryValue* data); | 154 void ShowScreenWithData(OobeScreen screen, const base::DictionaryValue* data); |
154 | 155 |
| 156 // Returns the OobeUI instance. |
| 157 OobeUI* GetOobeUI() const; |
| 158 |
155 // Returns current visible OOBE screen. | 159 // Returns current visible OOBE screen. |
156 OobeScreen GetCurrentScreen() const; | 160 OobeScreen GetCurrentScreen() const; |
157 | 161 |
158 // Whether page is ready. | 162 // Whether page is ready. |
159 bool page_is_ready() const { return page_is_ready_; } | 163 bool page_is_ready() const { return page_is_ready_; } |
160 | 164 |
161 // Returns the window which shows us. | 165 // Returns the window which shows us. |
162 virtual gfx::NativeWindow GetNativeWindow(); | 166 virtual gfx::NativeWindow GetNativeWindow(); |
163 | 167 |
164 void SetBaseScreen(BaseScreen* base_screen); | 168 void SetBaseScreen(BaseScreen* base_screen); |
(...skipping 26 matching lines...) Expand all Loading... |
191 | 195 |
192 // Pending changes to context which will be sent when the page will be ready. | 196 // Pending changes to context which will be sent when the page will be ready. |
193 base::DictionaryValue pending_context_changes_; | 197 base::DictionaryValue pending_context_changes_; |
194 | 198 |
195 DISALLOW_COPY_AND_ASSIGN(BaseScreenHandler); | 199 DISALLOW_COPY_AND_ASSIGN(BaseScreenHandler); |
196 }; | 200 }; |
197 | 201 |
198 } // namespace chromeos | 202 } // namespace chromeos |
199 | 203 |
200 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_BASE_SCREEN_HANDLER_H_ | 204 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_BASE_SCREEN_HANDLER_H_ |
OLD | NEW |