summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorsargrass@google.com <sargrass@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-04 20:23:44 +0000
committersargrass@google.com <sargrass@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-04 20:23:44 +0000
commitc2207a064d587a32057ccb07a8bef9b638f11878 (patch)
tree9089c1751627af39f1e5a58ba6cf34fbfbfbc69a /chrome
parent58963a902ffe3f89502718dda31a20ab6a5f6be6 (diff)
downloadchromium_src-c2207a064d587a32057ccb07a8bef9b638f11878.zip
chromium_src-c2207a064d587a32057ccb07a8bef9b638f11878.tar.gz
chromium_src-c2207a064d587a32057ccb07a8bef9b638f11878.tar.bz2
Start passwords exceptions
BUG=None Test=None Review URL: http://codereview.chromium.org/3061049 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54959 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/dom_ui/options_ui.cc2
-rw-r--r--chrome/browser/dom_ui/passwords_exceptions_handler.cc30
-rw-r--r--chrome/browser/dom_ui/passwords_exceptions_handler.h24
-rw-r--r--chrome/browser/resources/options.html4
-rw-r--r--chrome/browser/resources/options/passwords_exceptions.html7
-rw-r--r--chrome/browser/resources/options/passwords_exceptions.js40
-rw-r--r--chrome/browser/resources/options/personal_options.js2
-rw-r--r--chrome/chrome_browser.gypi2
8 files changed, 110 insertions, 1 deletions
diff --git a/chrome/browser/dom_ui/options_ui.cc b/chrome/browser/dom_ui/options_ui.cc
index 8e58cb3..e726111 100644
--- a/chrome/browser/dom_ui/options_ui.cc
+++ b/chrome/browser/dom_ui/options_ui.cc
@@ -25,6 +25,7 @@
#include "chrome/browser/dom_ui/core_options_handler.h"
#include "chrome/browser/dom_ui/font_settings_handler.h"
#include "chrome/browser/dom_ui/import_data_handler.h"
+#include "chrome/browser/dom_ui/passwords_exceptions_handler.h"
#include "chrome/browser/dom_ui/personal_options_handler.h"
#include "chrome/browser/dom_ui/search_engine_manager_handler.h"
#include "chrome/browser/dom_ui/stop_syncing_handler.h"
@@ -133,6 +134,7 @@ OptionsUI::OptionsUI(TabContents* contents) : DOMUI(contents) {
AddOptionsPageUIHandler(localized_strings, new ClearBrowserDataHandler());
AddOptionsPageUIHandler(localized_strings, new ContentSettingsHandler());
AddOptionsPageUIHandler(localized_strings, new FontSettingsHandler());
+ AddOptionsPageUIHandler(localized_strings, new PasswordsExceptionsHandler());
AddOptionsPageUIHandler(localized_strings, new PersonalOptionsHandler());
AddOptionsPageUIHandler(localized_strings, new SearchEngineManagerHandler());
AddOptionsPageUIHandler(localized_strings, new ImportDataHandler());
diff --git a/chrome/browser/dom_ui/passwords_exceptions_handler.cc b/chrome/browser/dom_ui/passwords_exceptions_handler.cc
new file mode 100644
index 0000000..dfb87e8
--- /dev/null
+++ b/chrome/browser/dom_ui/passwords_exceptions_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/passwords_exceptions_handler.h"
+
+#include "app/l10n_util.h"
+#include "base/callback.h"
+#include "base/values.h"
+#include "chrome/browser/profile.h"
+#include "chrome/common/url_constants.h"
+#include "grit/generated_resources.h"
+#include "grit/locale_settings.h"
+
+PasswordsExceptionsHandler::PasswordsExceptionsHandler() {
+}
+
+PasswordsExceptionsHandler::~PasswordsExceptionsHandler() {
+}
+
+void PasswordsExceptionsHandler::GetLocalizedValues(
+ DictionaryValue* localized_strings) {
+ DCHECK(localized_strings);
+
+ localized_strings->SetString(L"passwordsExceptionsTitle",
+ l10n_util::GetString(IDS_PASSWORDS_EXCEPTIONS_WINDOW_TITLE));
+}
+
+void PasswordsExceptionsHandler::RegisterMessages() {
+}
diff --git a/chrome/browser/dom_ui/passwords_exceptions_handler.h b/chrome/browser/dom_ui/passwords_exceptions_handler.h
new file mode 100644
index 0000000..7102907
--- /dev/null
+++ b/chrome/browser/dom_ui/passwords_exceptions_handler.h
@@ -0,0 +1,24 @@
+// 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_PASSWORDS_EXCEPTIONS_HANDLER_H_
+#define CHROME_BROWSER_DOM_UI_PASSWORDS_EXCEPTIONS_HANDLER_H_
+
+#include "chrome/browser/dom_ui/options_ui.h"
+
+class PasswordsExceptionsHandler : public OptionsPageUIHandler {
+ public:
+ PasswordsExceptionsHandler();
+ virtual ~PasswordsExceptionsHandler();
+
+ // OptionsUIHandler implementation.
+ virtual void GetLocalizedValues(DictionaryValue* localized_strings);
+
+ virtual void RegisterMessages();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(PasswordsExceptionsHandler);
+};
+
+#endif // CHROME_BROWSER_DOM_UI_PASSWORDS_EXCEPTIONS_HANDLER_H_
diff --git a/chrome/browser/resources/options.html b/chrome/browser/resources/options.html
index 90c9a39..029f37e 100644
--- a/chrome/browser/resources/options.html
+++ b/chrome/browser/resources/options.html
@@ -48,6 +48,7 @@
<script src="options/content_settings_ui.js"></script>
<script src="options/font_settings_overlay.js"></script>
<script src="options/import_data_overlay.js"></script>
+<script src="options/passwords_exceptions.js"></script>
<script src="options/personal_options.js"></script>
<script src="options/search_engine_manager.js"></script>
<script src="options/stop_syncing_overlay.js"></script>
@@ -61,6 +62,7 @@ var ContentSettings = options.ContentSettings;
var FontSettingsOverlay = options.FontSettingsOverlay;
var ImportDataOverlay = options.ImportDataOverlay;
var OptionsPage = options.OptionsPage;
+var PasswordsExceptions = options.PasswordsExceptions;
var PersonalOptions = options.PersonalOptions;
var Preferences = options.Preferences;
var SearchEngineManager = options.SearchEngineManager;
@@ -98,6 +100,7 @@ function load() {
OptionsPage.register(PersonalOptions.getInstance());
OptionsPage.register(AdvancedOptions.getInstance());
OptionsPage.registerSubPage(ContentSettings.getInstance());
+ OptionsPage.registerSubPage(PasswordsExceptions.getInstance());
OptionsPage.registerSubPage(SearchEngineManager.getInstance());
OptionsPage.registerOverlay(AddStartupPageOverlay.getInstance());
OptionsPage.registerOverlay(ClearBrowserDataOverlay.getInstance());
@@ -197,6 +200,7 @@ window.onpopstate = function(e) {
<include src="options/advanced_options.html">
<include src="options/browser_options.html">
<include src="options/content_settings.html">
+ <include src="options/passwords_exceptions.html">
<include src="options/personal_options.html">
<include src="options/search_engine_manager.html">
<include src="options/sync_options.html">
diff --git a/chrome/browser/resources/options/passwords_exceptions.html b/chrome/browser/resources/options/passwords_exceptions.html
new file mode 100644
index 0000000..6db421d
--- /dev/null
+++ b/chrome/browser/resources/options/passwords_exceptions.html
@@ -0,0 +1,7 @@
+<div class="page hidden" id="passwordsExceptionsPage">
+ <h1>
+ <span i18n-content="personalPage"></span>
+ &gt;
+ <span i18n-content="passwordsExceptionsTitle"></span>
+ </h1>
+</div>
diff --git a/chrome/browser/resources/options/passwords_exceptions.js b/chrome/browser/resources/options/passwords_exceptions.js
new file mode 100644
index 0000000..bf5b867
--- /dev/null
+++ b/chrome/browser/resources/options/passwords_exceptions.js
@@ -0,0 +1,40 @@
+// 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.
+
+cr.define('options', function() {
+
+ var OptionsPage = options.OptionsPage;
+
+ /////////////////////////////////////////////////////////////////////////////
+ // PasswordsExceptions class:
+
+ /**
+ * Encapsulated handling of password and exceptions page.
+ * @constructor
+ */
+ function PasswordsExceptions() {
+ OptionsPage.call(this, 'passwordsExceptions',
+ templateData.passwordsExceptionsTitle,
+ 'passwordsExceptionsPage');
+ }
+
+ cr.addSingletonGetter(PasswordsExceptions);
+
+ PasswordsExceptions.prototype = {
+ __proto__: OptionsPage.prototype,
+
+ initializePage: function() {
+ OptionsPage.prototype.initializePage.call(this);
+
+ // TODO(sargrass): Add initialization here.
+ }
+ };
+
+ // Export
+ return {
+ PasswordsExceptions: PasswordsExceptions
+ };
+
+});
+
diff --git a/chrome/browser/resources/options/personal_options.js b/chrome/browser/resources/options/personal_options.js
index 972fd9f..7318c02 100644
--- a/chrome/browser/resources/options/personal_options.js
+++ b/chrome/browser/resources/options/personal_options.js
@@ -51,7 +51,7 @@ cr.define('options', function() {
$('showpasswords').onclick = function(event) {
- //TODO(sargrass): Show passwords dialog here.
+ OptionsPage.showPageByName('passwordsExceptions');
};
$('autofill_options').onclick = function(event) {
diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi
index 810eea9..a96d688 100644
--- a/chrome/chrome_browser.gypi
+++ b/chrome/chrome_browser.gypi
@@ -1132,6 +1132,8 @@
'browser/dom_ui/core_options_handler.h',
'browser/dom_ui/font_settings_handler.cc',
'browser/dom_ui/font_settings_handler.h',
+ 'browser/dom_ui/passwords_exceptions_handler.cc',
+ 'browser/dom_ui/passwords_exceptions_handler.h',
'browser/dom_ui/personal_options_handler.cc',
'browser/dom_ui/personal_options_handler.h',
'browser/dom_ui/sync_options_handler.cc',