| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_BASE_SCREEN_HANDLER_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_BASE_SCREEN_HANDLER_H_ |
| 7 #pragma once |
| 8 |
| 9 #include "content/browser/webui/web_ui.h" |
| 10 |
| 11 namespace chromeos { |
| 12 |
| 13 // Base class for the OOBE/Login WebUI handlers. |
| 14 class BaseScreenHandler : public WebUIMessageHandler { |
| 15 public: |
| 16 BaseScreenHandler(); |
| 17 virtual ~BaseScreenHandler(); |
| 18 |
| 19 // Gets localized strings to be used on the page. |
| 20 virtual void GetLocalizedStrings( |
| 21 base::DictionaryValue* localized_strings) = 0; |
| 22 |
| 23 // This method is called when page is ready. It propagates to inherited class |
| 24 // via virtual Initialize() method (see below). |
| 25 void InitializeBase(); |
| 26 |
| 27 protected: |
| 28 // Called when the page is ready and handler can do initialization. |
| 29 virtual void Initialize() = 0; |
| 30 |
| 31 // Whether page is ready. |
| 32 bool page_is_ready() const { return page_is_ready_; } |
| 33 |
| 34 private: |
| 35 // Keeps whether page is ready. |
| 36 bool page_is_ready_; |
| 37 |
| 38 DISALLOW_COPY_AND_ASSIGN(BaseScreenHandler); |
| 39 }; |
| 40 |
| 41 } // namespace chromeos |
| 42 |
| 43 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_BASE_SCREEN_HANDLER_H_ |
| OLD | NEW |