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

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

Issue 410293004: Split OptionsPage into Page and PageManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed feedback 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 | 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 /** @const */ var OptionsPage = options.OptionsPage; 6 /** @const */ var Page = cr.ui.pageManager.Page;
7 /** @const */ var SettingsDialog = options.SettingsDialog; 7 /** @const */ var SettingsDialog = options.SettingsDialog;
8 8
9 /** 9 /**
10 * HomePageOverlay class 10 * HomePageOverlay class
11 * Dialog that allows users to set the home page. 11 * Dialog that allows users to set the home page.
12 * @extends {SettingsDialog} 12 * @extends {SettingsDialog}
13 */ 13 */
14 function HomePageOverlay() { 14 function HomePageOverlay() {
15 SettingsDialog.call(this, 'homePageOverlay', 15 SettingsDialog.call(this, 'homePageOverlay',
16 loadTimeData.getString('homePageOverlayTabTitle'), 16 loadTimeData.getString('homePageOverlayTabTitle'),
(...skipping 10 matching lines...) Expand all
27 * An autocomplete list that can be attached to the home page URL field. 27 * An autocomplete list that can be attached to the home page URL field.
28 * @type {cr.ui.AutocompleteList} 28 * @type {cr.ui.AutocompleteList}
29 * @private 29 * @private
30 */ 30 */
31 autocompleteList_: null, 31 autocompleteList_: null,
32 32
33 /** 33 /**
34 * Initialize the page. 34 * Initialize the page.
35 */ 35 */
36 initializePage: function() { 36 initializePage: function() {
37 // Call base class implementation to start preference initialization.
38 SettingsDialog.prototype.initializePage.call(this); 37 SettingsDialog.prototype.initializePage.call(this);
39 38
40 var self = this; 39 var self = this;
41 options.Preferences.getInstance().addEventListener( 40 options.Preferences.getInstance().addEventListener(
42 'homepage_is_newtabpage', 41 'homepage_is_newtabpage',
43 this.handleHomepageIsNTPPrefChange.bind(this)); 42 this.handleHomepageIsNTPPrefChange.bind(this));
44 43
45 var urlField = $('homepage-url-field'); 44 var urlField = $('homepage-url-field');
46 urlField.addEventListener('keydown', function(event) { 45 urlField.addEventListener('keydown', function(event) {
47 // Don't auto-submit when the user selects something from the 46 // Don't auto-submit when the user selects something from the
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 HomePageOverlay.updateAutocompleteSuggestions = function() { 145 HomePageOverlay.updateAutocompleteSuggestions = function() {
147 var instance = HomePageOverlay.getInstance(); 146 var instance = HomePageOverlay.getInstance();
148 instance.updateAutocompleteSuggestions_.apply(instance, arguments); 147 instance.updateAutocompleteSuggestions_.apply(instance, arguments);
149 }; 148 };
150 149
151 // Export 150 // Export
152 return { 151 return {
153 HomePageOverlay: HomePageOverlay 152 HomePageOverlay: HomePageOverlay
154 }; 153 };
155 }); 154 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698