summaryrefslogtreecommitdiffstats
path: root/chrome/browser/dom_ui/options
diff options
context:
space:
mode:
authorstuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-09 19:34:55 +0000
committerstuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-09 19:34:55 +0000
commitb01d9501499bde32de8392e2a82503ed38e954b3 (patch)
treec199d49ec227a84c70dd7b8d5fa93c25bf6211ab /chrome/browser/dom_ui/options
parent2b00b2669ae80dd68ae489d257cf6bfcef73a2f1 (diff)
downloadchromium_src-b01d9501499bde32de8392e2a82503ed38e954b3.zip
chromium_src-b01d9501499bde32de8392e2a82503ed38e954b3.tar.gz
chromium_src-b01d9501499bde32de8392e2a82503ed38e954b3.tar.bz2
DOMUI Prefs: Add a subpage for startup page management.
This still uses the old-style controls for adding and removing entries, but it moves them to the sub-page as an incremental step toward the mocks. BUG=63817 TEST=The new Manage Startup Pages button in the Basics section should open a subpage where pages can be added and removed. Review URL: http://codereview.chromium.org/5594006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68755 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/dom_ui/options')
-rw-r--r--chrome/browser/dom_ui/options/browser_options_handler.cc6
-rw-r--r--chrome/browser/dom_ui/options/options_ui.cc2
-rw-r--r--chrome/browser/dom_ui/options/startup_page_manager_handler.cc30
-rw-r--r--chrome/browser/dom_ui/options/startup_page_manager_handler.h23
4 files changed, 57 insertions, 4 deletions
diff --git a/chrome/browser/dom_ui/options/browser_options_handler.cc b/chrome/browser/dom_ui/options/browser_options_handler.cc
index 483e640..03773cb 100644
--- a/chrome/browser/dom_ui/options/browser_options_handler.cc
+++ b/chrome/browser/dom_ui/options/browser_options_handler.cc
@@ -52,10 +52,8 @@ void BrowserOptionsHandler::GetLocalizedValues(
l10n_util::GetStringUTF16(IDS_OPTIONS_STARTUP_SHOW_LAST_SESSION));
localized_strings->SetString("startupShowPages",
l10n_util::GetStringUTF16(IDS_OPTIONS_STARTUP_SHOW_PAGES));
- localized_strings->SetString("startupAddButton",
- l10n_util::GetStringUTF16(IDS_OPTIONS_STARTUP_ADD_BUTTON));
- localized_strings->SetString("startupRemoveButton",
- l10n_util::GetStringUTF16(IDS_OPTIONS_STARTUP_REMOVE_BUTTON));
+ localized_strings->SetString("startupShowManyPages",
+ l10n_util::GetStringUTF16(IDS_OPTIONS_STARTUP_SHOW_MANY_PAGES));
localized_strings->SetString("startupUseCurrent",
l10n_util::GetStringUTF16(IDS_OPTIONS_STARTUP_USE_CURRENT));
localized_strings->SetString("homepageGroupName",
diff --git a/chrome/browser/dom_ui/options/options_ui.cc b/chrome/browser/dom_ui/options/options_ui.cc
index 5a38d84..d298e86 100644
--- a/chrome/browser/dom_ui/options/options_ui.cc
+++ b/chrome/browser/dom_ui/options/options_ui.cc
@@ -32,6 +32,7 @@
#include "chrome/browser/dom_ui/options/passwords_exceptions_handler.h"
#include "chrome/browser/dom_ui/options/personal_options_handler.h"
#include "chrome/browser/dom_ui/options/search_engine_manager_handler.h"
+#include "chrome/browser/dom_ui/options/startup_page_manager_handler.h"
#include "chrome/browser/dom_ui/options/stop_syncing_handler.h"
#include "chrome/browser/dom_ui/options/sync_options_handler.h"
#include "chrome/browser/metrics/user_metrics.h"
@@ -153,6 +154,7 @@ OptionsUI::OptionsUI(TabContents* contents) : DOMUI(contents) {
AddOptionsPageUIHandler(localized_strings, new PasswordsExceptionsHandler());
AddOptionsPageUIHandler(localized_strings, new PersonalOptionsHandler());
AddOptionsPageUIHandler(localized_strings, new SearchEngineManagerHandler());
+ AddOptionsPageUIHandler(localized_strings, new StartupPageManagerHandler());
AddOptionsPageUIHandler(localized_strings, new ImportDataHandler());
AddOptionsPageUIHandler(localized_strings, new StopSyncingHandler());
AddOptionsPageUIHandler(localized_strings, new SyncOptionsHandler());
diff --git a/chrome/browser/dom_ui/options/startup_page_manager_handler.cc b/chrome/browser/dom_ui/options/startup_page_manager_handler.cc
new file mode 100644
index 0000000..f3c5c20
--- /dev/null
+++ b/chrome/browser/dom_ui/options/startup_page_manager_handler.cc
@@ -0,0 +1,30 @@
+// Copyright (c) 2010 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.
+
+#include "chrome/browser/dom_ui/options/startup_page_manager_handler.h"
+
+#include "app/l10n_util.h"
+#include "base/values.h"
+#include "grit/generated_resources.h"
+#include "grit/locale_settings.h"
+
+StartupPageManagerHandler::StartupPageManagerHandler() {
+}
+
+StartupPageManagerHandler::~StartupPageManagerHandler() {
+}
+
+void StartupPageManagerHandler::GetLocalizedValues(
+ DictionaryValue* localized_strings) {
+ DCHECK(localized_strings);
+
+ localized_strings->SetString("startupAddButton",
+ l10n_util::GetStringUTF16(IDS_OPTIONS_STARTUP_ADD_BUTTON));
+ localized_strings->SetString("startupRemoveButton",
+ l10n_util::GetStringUTF16(IDS_OPTIONS_STARTUP_REMOVE_BUTTON));
+ localized_strings->SetString("startupPageManagerPage",
+ l10n_util::GetStringUTF16(IDS_STARTUP_PAGE_SUBPAGE_TITLE));
+ localized_strings->SetString("startupManagePages",
+ l10n_util::GetStringUTF16(IDS_OPTIONS_STARTUP_MANAGE_BUTTON));
+}
diff --git a/chrome/browser/dom_ui/options/startup_page_manager_handler.h b/chrome/browser/dom_ui/options/startup_page_manager_handler.h
new file mode 100644
index 0000000..440e887
--- /dev/null
+++ b/chrome/browser/dom_ui/options/startup_page_manager_handler.h
@@ -0,0 +1,23 @@
+// Copyright (c) 2010 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_DOM_UI_OPTIONS_STARTUP_PAGE_MANAGER_HANDLER_H_
+#define CHROME_BROWSER_DOM_UI_OPTIONS_STARTUP_PAGE_MANAGER_HANDLER_H_
+
+#include "chrome/browser/dom_ui/options/options_ui.h"
+
+class StartupPageManagerHandler : public OptionsPageUIHandler {
+ public:
+ StartupPageManagerHandler();
+ virtual ~StartupPageManagerHandler();
+
+ // OptionsUIHandler implementation.
+ virtual void GetLocalizedValues(DictionaryValue* localized_strings);
+
+ private:
+
+ DISALLOW_COPY_AND_ASSIGN(StartupPageManagerHandler);
+};
+
+#endif // CHROME_BROWSER_DOM_UI_OPTIONS_STARTUP_PAGE_MANAGER_HANDLER_H_