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

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

Issue 6303003: DOMUI Prefs: Implement inline editability for startup pages (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: CSS tweak Created 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 cr.define('options', function() { 5 cr.define('options', function() {
6 const OptionsPage = options.OptionsPage; 6 const OptionsPage = options.OptionsPage;
7 const ArrayDataModel = cr.ui.ArrayDataModel; 7 const ArrayDataModel = cr.ui.ArrayDataModel;
8 const ListSelectionModel = cr.ui.ListSelectionModel; 8 const ListSingleSelectionModel = cr.ui.ListSingleSelectionModel;
9 9
10 // 10 //
11 // BrowserOptions class 11 // BrowserOptions class
12 // Encapsulated handling of browser options page. 12 // Encapsulated handling of browser options page.
13 // 13 //
14 function BrowserOptions() { 14 function BrowserOptions() {
15 OptionsPage.call(this, 'browser', templateData.browserPage, 'browserPage'); 15 OptionsPage.call(this, 'browser', templateData.browserPage, 'browserPage');
16 } 16 }
17 17
18 cr.addSingletonGetter(BrowserOptions); 18 cr.addSingletonGetter(BrowserOptions);
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 79
80 if (!cr.isChromeOS) { 80 if (!cr.isChromeOS) {
81 $('defaultBrowserUseAsDefaultButton').onclick = function(event) { 81 $('defaultBrowserUseAsDefaultButton').onclick = function(event) {
82 chrome.send('becomeDefaultBrowser'); 82 chrome.send('becomeDefaultBrowser');
83 }; 83 };
84 } 84 }
85 85
86 var list = $('startupPagesShortList'); 86 var list = $('startupPagesShortList');
87 options.browser_options.StartupPageList.decorate(list); 87 options.browser_options.StartupPageList.decorate(list);
88 list.autoExpands = true; 88 list.autoExpands = true;
89 list.selectionModel = new ListSelectionModel; 89 list.selectionModel = new ListSingleSelectionModel;
90 90
91 // Check if we are in the guest mode. 91 // Check if we are in the guest mode.
92 if (cr.commandLine.options['--bwsi']) { 92 if (cr.commandLine.options['--bwsi']) {
93 // Hide the startup section. 93 // Hide the startup section.
94 $('startupSection').classList.add('hidden'); 94 $('startupSection').classList.add('hidden');
95 } else { 95 } else {
96 // Initialize control enabled states. 96 // Initialize control enabled states.
97 Preferences.getInstance().addEventListener('session.restore_on_startup', 97 Preferences.getInstance().addEventListener('session.restore_on_startup',
98 this.updateCustomStartupPageControlStates_.bind(this)); 98 this.updateCustomStartupPageControlStates_.bind(this));
99 Preferences.getInstance().addEventListener('homepage_is_newtabpage', 99 Preferences.getInstance().addEventListener('homepage_is_newtabpage',
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 BrowserOptions.getInstance().updateStartupPages_(pages); 377 BrowserOptions.getInstance().updateStartupPages_(pages);
378 StartupPageManager.getInstance().updateStartupPages_(pages); 378 StartupPageManager.getInstance().updateStartupPages_(pages);
379 }; 379 };
380 380
381 // Export 381 // Export
382 return { 382 return {
383 BrowserOptions: BrowserOptions 383 BrowserOptions: BrowserOptions
384 }; 384 };
385 385
386 }); 386 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/options/browser_options.html ('k') | chrome/browser/resources/options/browser_options_page.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698