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

Unified Diff: chrome/browser/ui/webui/chromeos/login/base_screen_handler.h

Issue 7382001: [ChromeOS] WebUI OOBE/Login refactoring. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync and address comments in set #1 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/chromeos/login/base_screen_handler.h
diff --git a/chrome/browser/ui/webui/chromeos/login/base_screen_handler.h b/chrome/browser/ui/webui/chromeos/login/base_screen_handler.h
new file mode 100644
index 0000000000000000000000000000000000000000..d84f78e24d79ef484db2d248ab4c71b23fc5f6e3
--- /dev/null
+++ b/chrome/browser/ui/webui/chromeos/login/base_screen_handler.h
@@ -0,0 +1,43 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_BASE_SCREEN_HANDLER_H_
+#define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_BASE_SCREEN_HANDLER_H_
+#pragma once
+
+#include "content/browser/webui/web_ui.h"
+
+namespace chromeos {
+
+// Base class for the OOBE/Login WebUI handlers.
+class BaseScreenHandler : public WebUIMessageHandler {
+ public:
+ BaseScreenHandler();
+ virtual ~BaseScreenHandler();
+
+ // Gets localized strings to be used on the page.
+ virtual void GetLocalizedStrings(
+ base::DictionaryValue* localized_strings) = 0;
+
+ // This method is called when page is ready. It propagates to inherited class
+ // via virtual Initialize() method (see below).
+ void InitializeBase();
+
+ protected:
+ // Called when the page is ready and handler can do initialization.
+ virtual void Initialize() = 0;
+
+ // Whether page is ready.
+ bool page_is_ready() const { return page_is_ready_; }
+
+ private:
+ // Keeps whether page is ready.
+ bool page_is_ready_;
+
+ DISALLOW_COPY_AND_ASSIGN(BaseScreenHandler);
+};
+
+} // namespace chromeos
+
+#endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_BASE_SCREEN_HANDLER_H_

Powered by Google App Engine
This is Rietveld 408576698