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

Side by Side Diff: chrome/browser/resources/options2/options.js

Issue 9554007: [uber page] Remove obsolete subpage logic. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: code review tweaks Created 8 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 var AddLanguageOverlay = options.AddLanguageOverlay; 5 var AddLanguageOverlay = options.AddLanguageOverlay;
6 var AlertOverlay = options.AlertOverlay; 6 var AlertOverlay = options.AlertOverlay;
7 var AutofillEditAddressOverlay = options.AutofillEditAddressOverlay; 7 var AutofillEditAddressOverlay = options.AutofillEditAddressOverlay;
8 var AutofillEditCreditCardOverlay = options.AutofillEditCreditCardOverlay; 8 var AutofillEditCreditCardOverlay = options.AutofillEditCreditCardOverlay;
9 var AutofillOptions = options.AutofillOptions; 9 var AutofillOptions = options.AutofillOptions;
10 var BrowserOptions = options.BrowserOptions; 10 var BrowserOptions = options.BrowserOptions;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 cr.ui.decorate('input[pref][type=text]', options.PrefTextField); 44 cr.ui.decorate('input[pref][type=text]', options.PrefTextField);
45 cr.ui.decorate('input[pref][type=url]', options.PrefTextField); 45 cr.ui.decorate('input[pref][type=url]', options.PrefTextField);
46 cr.ui.decorate('button[pref]', options.PrefButton); 46 cr.ui.decorate('button[pref]', options.PrefButton);
47 cr.ui.decorate('#content-settings-page input[type=radio]:not(.handler-radio)', 47 cr.ui.decorate('#content-settings-page input[type=radio]:not(.handler-radio)',
48 options.ContentSettingsRadio); 48 options.ContentSettingsRadio);
49 cr.ui.decorate('#content-settings-page input[type=radio].handler-radio', 49 cr.ui.decorate('#content-settings-page input[type=radio].handler-radio',
50 options.HandlersEnabledRadio); 50 options.HandlersEnabledRadio);
51 cr.ui.decorate('span.controlled-setting-indicator', 51 cr.ui.decorate('span.controlled-setting-indicator',
52 options.ControlledSettingIndicator); 52 options.ControlledSettingIndicator);
53 53
54 var menuOffPattern = /(^\?|&)menu=off($|&)/;
55 var menuDisabled = menuOffPattern.test(window.location.search);
56 // document.documentElement.setAttribute('hide-menu', menuDisabled);
57 // We can't use an attribute on the html element because of webkit bug
58 // 12519. Instead, we add a class.
59 if (menuDisabled)
60 document.documentElement.classList.add('hide-menu');
61
62 localStrings = new LocalStrings(); 54 localStrings = new LocalStrings();
63 55
64 // Top level pages. 56 // Top level pages.
65 OptionsPage.register(SearchPage.getInstance()); 57 OptionsPage.register(SearchPage.getInstance());
66 OptionsPage.register(BrowserOptions.getInstance()); 58 OptionsPage.register(BrowserOptions.getInstance());
67 59
68 // Overlays. 60 // Overlays.
69 OptionsPage.registerOverlay(AddLanguageOverlay.getInstance(), 61 OptionsPage.registerOverlay(AddLanguageOverlay.getInstance(),
70 LanguageOptions.getInstance()); 62 LanguageOptions.getInstance());
71 OptionsPage.registerOverlay(AlertOverlay.getInstance()); 63 OptionsPage.registerOverlay(AlertOverlay.getInstance());
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 options.OptionsPage.willClose(); 224 options.OptionsPage.willClose();
233 }; 225 };
234 226
235 /** 227 /**
236 * Listener for the |popstate| event. 228 * Listener for the |popstate| event.
237 * @param {Event} e The |popstate| event. 229 * @param {Event} e The |popstate| event.
238 */ 230 */
239 window.onpopstate = function(e) { 231 window.onpopstate = function(e) {
240 options.OptionsPage.setState(e.state); 232 options.OptionsPage.setState(e.state);
241 }; 233 };
OLDNEW
« no previous file with comments | « chrome/browser/resources/options2/options.html ('k') | chrome/browser/resources/options2/options_page.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698