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

Unified Diff: chrome/browser/ui/webui/options2/options_ui2.h

Issue 9104028: Unfork various Sync settings UI classes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Another cros compilation fix. Created 8 years, 11 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/options2/options_ui2.h
diff --git a/chrome/browser/ui/webui/options2/options_ui2.h b/chrome/browser/ui/webui/options2/options_ui2.h
index 5953fe646894b9726ca64856ae9834e94fe09cfe..e07cab3ce68243bde1dc8d03a88e941cf105c205 100644
--- a/chrome/browser/ui/webui/options2/options_ui2.h
+++ b/chrome/browser/ui/webui/options2/options_ui2.h
@@ -12,6 +12,7 @@
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/ui/webui/chrome_url_data_manager.h"
+#include "chrome/browser/ui/webui/options/options_ui.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/notification_types.h"
@@ -19,68 +20,6 @@
#include "content/public/browser/web_ui_message_handler.h"
namespace options2 {
-
-// The base class handler of Javascript messages of options pages.
-class OptionsPageUIHandler : public content::WebUIMessageHandler,
- public content::NotificationObserver {
- public:
- OptionsPageUIHandler();
- virtual ~OptionsPageUIHandler();
-
- // Is this handler enabled?
- virtual bool IsEnabled();
-
- // Collects localized strings for options page.
- virtual void GetLocalizedValues(base::DictionaryValue* localized_strings) = 0;
-
- // Initialize the page. Called once the DOM is available for manipulation.
- // This will be called only once.
- virtual void Initialize() {}
-
- // Uninitializes the page. Called just before the object is destructed.
- virtual void Uninitialize() {}
-
- // WebUIMessageHandler implementation.
- virtual void RegisterMessages() OVERRIDE {}
-
- // content::NotificationObserver implementation.
- virtual void Observe(int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) OVERRIDE {}
-
- protected:
- struct OptionsStringResource {
- // The name of the resource in templateData.
- const char* name;
- // The .grd ID for the resource (IDS_*).
- int id;
- };
- // A helper for simplifying the process of registering strings in WebUI.
- static void RegisterStrings(base::DictionaryValue* localized_strings,
- const OptionsStringResource* resources,
- size_t length);
-
- // Registers string resources for a page's header and tab title.
- static void RegisterTitle(base::DictionaryValue* localized_strings,
- const std::string& variable_name,
- int title_id);
-
- content::NotificationRegistrar registrar_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OptionsPageUIHandler);
-};
-
-// An interface for common operations that a host of OptionsPageUIHandlers
-// should provide.
-class OptionsPageUIHandlerHost {
- public:
- virtual void InitializeHandlers() = 0;
-
- protected:
- virtual ~OptionsPageUIHandlerHost() {}
-};
-
// The WebUI for chrome:settings-frame.
class OptionsUI : public content::WebUIController,
public OptionsPageUIHandlerHost {
« no previous file with comments | « chrome/browser/ui/webui/options2/options_sync_setup_handler2.cc ('k') | chrome/browser/ui/webui/options2/options_ui2.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698