Commit bfe1922d authored by estade@chromium.org's avatar estade@chromium.org

add a new, blank version of content settings so that a new UI may be prototyped

behind a flag

BUG=none


Review URL: https://chromiumcodereview.appspot.com/11018013

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162375 0039d316-1c4b-4281-b951-d872f2087c98
parent bc9cbf95
......@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
if (!loadTimeData.getBoolean('newContentSettings')) {
cr.define('options', function() {
/** @const */ var OptionsPage = options.OptionsPage;
......@@ -174,3 +176,5 @@ cr.define('options', function() {
};
});
}
<div id="content-settings-page2" class="page" hidden>
<div class="close-button"></div>
<h1 i18n-content="contentSettingsPage"></h1>
<div class="content-area">
This space intentionally left blank.
</div>
<div class="action-area">
<div class="button-strip">
<button id="content-settings-overlay-confirm2" i18n-content="ok"></button>
</div>
</div>
</div>
// Copyright (c) 2012 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.
if (loadTimeData.getBoolean('newContentSettings')) {
cr.define('options', function() {
/** @const */ var OptionsPage = options.OptionsPage;
//////////////////////////////////////////////////////////////////////////////
// ContentSettings class:
/**
* Encapsulated handling of content settings page.
* @constructor
*/
function ContentSettings() {
this.activeNavTab = null;
OptionsPage.call(this, 'content',
loadTimeData.getString('contentSettingsPageTabTitle'),
'content-settings-page2');
}
cr.addSingletonGetter(ContentSettings);
ContentSettings.prototype = {
__proto__: OptionsPage.prototype,
initializePage: function() {
OptionsPage.prototype.initializePage.call(this);
$('content-settings-overlay-confirm2').onclick =
OptionsPage.closeOverlay.bind(OptionsPage);
},
};
ContentSettings.updateHandlersEnabledRadios = function(enabled) {
// Not implemented.
};
/**
* Sets the values for all the content settings radios.
* @param {Object} dict A mapping from radio groups to the checked value for
* that group.
*/
ContentSettings.setContentFilterSettingsValue = function(dict) {
// Not implemented.
};
/**
* Initializes an exceptions list.
* @param {string} type The content type that we are setting exceptions for.
* @param {Array} list An array of pairs, where the first element of each pair
* is the filter string, and the second is the setting (allow/block).
*/
ContentSettings.setExceptions = function(type, list) {
// Not implemented.
};
ContentSettings.setHandlers = function(list) {
// Not implemented.
};
ContentSettings.setIgnoredHandlers = function(list) {
// Not implemented.
};
ContentSettings.setOTRExceptions = function(type, list) {
// Not implemented.
};
/**
* Enables the Pepper Flash camera and microphone settings.
* Please note that whether the settings are actually showed or not is also
* affected by the style class pepper-flash-settings.
*/
ContentSettings.enablePepperFlashCameraMicSettings = function() {
// Not implemented.
}
// Export
return {
ContentSettings: ContentSettings
};
});
}
......@@ -76,6 +76,8 @@
<script src="chrome://resources/js/cr/ui/tree.js"></script>
<script src="chrome://resources/js/load_time_data.js"></script>
<script src="chrome://resources/js/util.js"></script>
<script src="chrome://settings-frame/strings.js"></script>
<script src="chrome://settings-frame/options_bundle.js"></script>
</head>
......@@ -85,6 +87,7 @@
<include src="autofill_options.html">
<include src="clear_browser_data_overlay.html">
<include src="content_settings.html">
<include src="content_settings2.html">
<include src="do_not_track_confirm_overlay.html">
<include src="font_settings.html">
<include src="home_page_overlay.html">
......@@ -164,7 +167,6 @@
</div>
</div>
<script src="chrome://settings-frame/strings.js"></script>
<script src="chrome://resources/js/i18n_template2.js"></script>
</body>
</html>
......@@ -69,6 +69,7 @@
<include src="browser_options_startup_page_list.js"></include>
<include src="clear_browser_data_overlay.js"></include>
<include src="content_settings.js"></include>
<include src="content_settings2.js"></include>
<include src="content_settings_exceptions_area.js"></include>
<include src="content_settings_ui.js"></include>
<include src="cookies_list.js"></include>
......
......@@ -460,6 +460,9 @@ void ContentSettingsHandler::GetLocalizedValues(
localized_strings->SetBoolean(
"enable_web_intents",
web_intents::IsWebIntentsEnabledForProfile(profile));
localized_strings->SetBoolean("newContentSettings",
CommandLine::ForCurrentProcess()->HasSwitch(switches::kContentSettings2));
}
void ContentSettingsHandler::InitializeHandler() {
......
......@@ -192,6 +192,9 @@ const char kComponentUpdaterDebug[] = "component-updater-debug";
// conflicts and warn the user.
const char kConflictingModulesCheck[] = "conflicting-modules-check";
// Toggles a new version of the content settings dialog in options.
const char kContentSettings2[] = "new-content-settings";
// The Country we should use. This is normally obtained from the operating
// system during first run and cached in the preferences afterwards. This is a
// string value, the 2 letter code from ISO 3166-1.
......
......@@ -66,6 +66,7 @@ extern const char kCloudPrintProxyId[];
extern const char kCloudPrintServiceURL[];
extern const char kComponentUpdaterDebug[];
extern const char kConflictingModulesCheck[];
extern const char kContentSettings2[];
extern const char kCountry[];
extern const char kCrashOnHangSeconds[];
extern const char kCrashOnHangThreads[];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment