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

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

Issue 9386032: [uber page] Migrate the virtual keyboard sub-page to a dialog (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: var rename Created 8 years, 10 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
« no previous file with comments | « chrome/browser/resources/options2/options.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 ///////////////////////////////////////////////////////////////////////////// 6 /////////////////////////////////////////////////////////////////////////////
7 // OptionsPage class: 7 // OptionsPage class:
8 8
9 /** 9 /**
10 * Base class for options page. 10 * Base class for options page.
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 */ 287 */
288 OptionsPage.isOverlayVisible_ = function() { 288 OptionsPage.isOverlayVisible_ = function() {
289 return this.getVisibleOverlay_() != null; 289 return this.getVisibleOverlay_() != null;
290 }; 290 };
291 291
292 /** 292 /**
293 * Returns the currently visible overlay, or null if no page is visible. 293 * Returns the currently visible overlay, or null if no page is visible.
294 * @return {OptionPage} The visible overlay. 294 * @return {OptionPage} The visible overlay.
295 */ 295 */
296 OptionsPage.getVisibleOverlay_ = function() { 296 OptionsPage.getVisibleOverlay_ = function() {
297 var topmostPage = null;
297 for (var name in this.registeredOverlayPages) { 298 for (var name in this.registeredOverlayPages) {
298 var page = this.registeredOverlayPages[name]; 299 var page = this.registeredOverlayPages[name];
299 if (page.visible) 300 if (page.visible &&
300 return page; 301 (!topmostPage || page.nestingLevel > topmostPage.nestingLevel)) {
302 topmostPage = page;
303 }
301 } 304 }
302 return null; 305 return topmostPage;
303 }; 306 };
304 307
305 /** 308 /**
306 * Closes the visible overlay. Updates the history state after closing the 309 * Closes the visible overlay. Updates the history state after closing the
307 * overlay. 310 * overlay.
308 */ 311 */
309 OptionsPage.closeOverlay = function() { 312 OptionsPage.closeOverlay = function() {
310 var overlay = this.getVisibleOverlay_(); 313 var overlay = this.getVisibleOverlay_();
311 if (!overlay) 314 if (!overlay)
312 return; 315 return;
(...skipping 786 matching lines...) Expand 10 before | Expand all | Expand 10 after
1099 canShowPage: function() { 1102 canShowPage: function() {
1100 return true; 1103 return true;
1101 }, 1104 },
1102 }; 1105 };
1103 1106
1104 // Export 1107 // Export
1105 return { 1108 return {
1106 OptionsPage: OptionsPage 1109 OptionsPage: OptionsPage
1107 }; 1110 };
1108 }); 1111 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/options2/options.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698