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

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

Issue 12494033: Provide a link to restart chrome when changing gpu settings (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 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 cr.define('options', function() { 5 cr.define('options', function() {
6 var OptionsPage = options.OptionsPage; 6 var OptionsPage = options.OptionsPage;
7 var ArrayDataModel = cr.ui.ArrayDataModel; 7 var ArrayDataModel = cr.ui.ArrayDataModel;
8 var RepeatingButton = cr.ui.RepeatingButton; 8 var RepeatingButton = cr.ui.RepeatingButton;
9 9
10 // 10 //
(...skipping 24 matching lines...) Expand all
35 * |onShowHomeButtonChanged_|. 35 * |onShowHomeButtonChanged_|.
36 * @type {boolean} 36 * @type {boolean}
37 * @private 37 * @private
38 */ 38 */
39 onShowHomeButtonChangedCalled_: false, 39 onShowHomeButtonChangedCalled_: false,
40 40
41 /** 41 /**
42 * Track if page initialization is complete. All C++ UI handlers have the 42 * Track if page initialization is complete. All C++ UI handlers have the
43 * chance to manipulate page content within their InitializePage methods. 43 * chance to manipulate page content within their InitializePage methods.
44 * This flag is set to true after all initializers have been called. 44 * This flag is set to true after all initializers have been called.
45 * @type (boolean} 45 * @type {boolean}
46 * @private 46 * @private
47 */ 47 */
48 initializationComplete_: false, 48 initializationComplete_: false,
49 49
50 /** @override */ 50 /** @override */
51 initializePage: function() { 51 initializePage: function() {
52 OptionsPage.prototype.initializePage.call(this); 52 OptionsPage.prototype.initializePage.call(this);
53 var self = this; 53 var self = this;
54 54
55 // Ensure that navigation events are unblocked on uber page. A reload of 55 // Ensure that navigation events are unblocked on uber page. A reload of
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
460 if (cr.isChromeOS) { 460 if (cr.isChromeOS) {
461 if (loadTimeData.getBoolean('enableKioskSection')) { 461 if (loadTimeData.getBoolean('enableKioskSection')) {
462 $('kiosk-section').hidden = false; 462 $('kiosk-section').hidden = false;
463 463
464 $('manage-kiosk-apps-button').onclick = function(event) { 464 $('manage-kiosk-apps-button').onclick = function(event) {
465 OptionsPage.navigateToPage('kioskAppsOverlay'); 465 OptionsPage.navigateToPage('kioskAppsOverlay');
466 }; 466 };
467 } 467 }
468 } 468 }
469 469
470 // System section.
471 if (!cr.isChromeOS) {
472 $('gpu-mode-reset-restart').hidden = true;
Dan Beam 2013/03/22 00:34:40 ^ update this when you open the page, IMO
473 $('gpu-mode-checkbox').onclick = function(event) {
Dan Beam 2013/03/22 00:34:40 s/onclick/onchange/, unfortunately this isn't work
474 $('gpu-mode-reset-restart').hidden =
475 loadTimeData.getBoolean('gpuModeAtStart') ==
Dan Beam 2013/03/22 00:34:40 gpuEnabledAtStart might be a better name (i was ju
476 event.currentTarget.checked;
477 };
478 $('gpu-mode-reset-restart-link').onclick = function(event) {
479 event.preventDefault();
480 chrome.send('restartBrowser');
481 };
482 }
483
470 if (loadTimeData.getBoolean('managedUsersEnabled') && 484 if (loadTimeData.getBoolean('managedUsersEnabled') &&
471 loadTimeData.getBoolean('profileIsManaged')) { 485 loadTimeData.getBoolean('profileIsManaged')) {
472 $('managed-user-settings-section').hidden = false; 486 $('managed-user-settings-section').hidden = false;
473 487
474 $('open-managed-user-settings-button').onclick = function(event) { 488 $('open-managed-user-settings-button').onclick = function(event) {
475 OptionsPage.navigateToPage('managedUser'); 489 OptionsPage.navigateToPage('managedUser');
476 }; 490 };
477 } 491 }
478 }, 492 },
479 493
(...skipping 960 matching lines...) Expand 10 before | Expand all | Expand 10 after
1440 BrowserOptions.getLoggedInUsername = function() { 1454 BrowserOptions.getLoggedInUsername = function() {
1441 return BrowserOptions.getInstance().username_; 1455 return BrowserOptions.getInstance().username_;
1442 }; 1456 };
1443 } 1457 }
1444 1458
1445 // Export 1459 // Export
1446 return { 1460 return {
1447 BrowserOptions: BrowserOptions 1461 BrowserOptions: BrowserOptions
1448 }; 1462 };
1449 }); 1463 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/options/browser_options.html ('k') | chrome/browser/ui/webui/options/browser_options_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698