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

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

Issue 423533003: Use PageManager in About page (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix settings app browser test Created 6 years, 4 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
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 Page = cr.ui.pageManager.Page; 7 var Page = cr.ui.pageManager.Page;
8 var PageManager = cr.ui.pageManager.PageManager; 8 var PageManager = cr.ui.pageManager.PageManager;
9 var ArrayDataModel = cr.ui.ArrayDataModel; 9 var ArrayDataModel = cr.ui.ArrayDataModel;
10 var RepeatingButton = cr.ui.RepeatingButton; 10 var RepeatingButton = cr.ui.RepeatingButton;
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 * @type {?number} 72 * @type {?number}
73 * @private 73 * @private
74 */ 74 */
75 sectionHeightChangeTimeout_: null, 75 sectionHeightChangeTimeout_: null,
76 76
77 /** @override */ 77 /** @override */
78 initializePage: function() { 78 initializePage: function() {
79 Page.prototype.initializePage.call(this); 79 Page.prototype.initializePage.call(this);
80 var self = this; 80 var self = this;
81 81
82 if (window.top != window) {
83 // The options page is not in its own window.
84 document.body.classList.add('uber-frame');
85 PageManager.horizontalOffset = 155;
86 }
87
82 // Ensure that navigation events are unblocked on uber page. A reload of 88 // Ensure that navigation events are unblocked on uber page. A reload of
83 // the settings page while an overlay is open would otherwise leave uber 89 // the settings page while an overlay is open would otherwise leave uber
84 // page in a blocked state, where tab switching is not possible. 90 // page in a blocked state, where tab switching is not possible.
85 uber.invokeMethodOnParent('stopInterceptingEvents'); 91 uber.invokeMethodOnParent('stopInterceptingEvents');
86 92
87 window.addEventListener('message', this.handleWindowMessage_.bind(this)); 93 window.addEventListener('message', this.handleWindowMessage_.bind(this));
88 94
89 if (loadTimeData.getBoolean('allowAdvancedSettings')) { 95 if (loadTimeData.getBoolean('allowAdvancedSettings')) {
90 $('advanced-settings-expander').onclick = function() { 96 $('advanced-settings-expander').onclick = function() {
91 var showAdvanced = 97 var showAdvanced =
(...skipping 1817 matching lines...) Expand 10 before | Expand all | Expand 10 after
1909 BrowserOptions.getLoggedInUsername = function() { 1915 BrowserOptions.getLoggedInUsername = function() {
1910 return BrowserOptions.getInstance().username_; 1916 return BrowserOptions.getInstance().username_;
1911 }; 1917 };
1912 } 1918 }
1913 1919
1914 // Export 1920 // Export
1915 return { 1921 return {
1916 BrowserOptions: BrowserOptions 1922 BrowserOptions: BrowserOptions
1917 }; 1923 };
1918 }); 1924 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/options/alert_overlay.js ('k') | chrome/browser/resources/options/options.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698