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

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

Issue 410293004: Split OptionsPage into Page and PageManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ugh just no 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 PageManager = cr.ui.pageManager.PageManager;
7 /** @const */ var ArrayDataModel = cr.ui.ArrayDataModel; 8 /** @const */ var ArrayDataModel = cr.ui.ArrayDataModel;
8 9
9 /** 10 /**
10 * Encapsulated handling of search engine management page. 11 * Encapsulated handling of search engine management page.
11 * @constructor 12 * @constructor
12 */ 13 */
13 function SearchEngineManager() { 14 function SearchEngineManager() {
14 this.activeNavTab = null; 15 this.activeNavTab = null;
15 OptionsPage.call(this, 'searchEngines', 16 Page.call(this, 'searchEngines',
16 loadTimeData.getString('searchEngineManagerPageTabTitle'), 17 loadTimeData.getString('searchEngineManagerPageTabTitle'),
17 'search-engine-manager-page'); 18 'search-engine-manager-page');
18 } 19 }
19 20
20 cr.addSingletonGetter(SearchEngineManager); 21 cr.addSingletonGetter(SearchEngineManager);
21 22
22 SearchEngineManager.prototype = { 23 SearchEngineManager.prototype = {
23 __proto__: OptionsPage.prototype, 24 __proto__: Page.prototype,
24 25
25 /** 26 /**
26 * List for default search engine options. 27 * List for default search engine options.
27 * @private 28 * @private
28 */ 29 */
29 defaultsList_: null, 30 defaultsList_: null,
30 31
31 /** 32 /**
32 * List for other search engine options. 33 * List for other search engine options.
33 * @private 34 * @private
34 */ 35 */
35 othersList_: null, 36 othersList_: null,
36 37
37 /** 38 /**
38 * List for extension keywords. 39 * List for extension keywords.
39 * @private 40 * @private
40 */ 41 */
41 extensionList_: null, 42 extensionList_: null,
42 43
43 /** @override */ 44 /** @override */
44 initializePage: function() { 45 initializePage: function() {
45 OptionsPage.prototype.initializePage.call(this); 46 Page.prototype.initializePage.call(this);
46 47
47 this.defaultsList_ = $('default-search-engine-list'); 48 this.defaultsList_ = $('default-search-engine-list');
48 this.setUpList_(this.defaultsList_); 49 this.setUpList_(this.defaultsList_);
49 50
50 this.othersList_ = $('other-search-engine-list'); 51 this.othersList_ = $('other-search-engine-list');
51 this.setUpList_(this.othersList_); 52 this.setUpList_(this.othersList_);
52 53
53 this.extensionList_ = $('extension-keyword-list'); 54 this.extensionList_ = $('extension-keyword-list');
54 this.setUpList_(this.extensionList_); 55 this.setUpList_(this.extensionList_);
55 56
56 $('search-engine-manager-confirm').onclick = function() { 57 $('search-engine-manager-confirm').onclick = function() {
57 OptionsPage.closeOverlay(); 58 PageManager.closeOverlay();
58 }; 59 };
59 }, 60 },
60 61
61 /** 62 /**
62 * Sets up the given list as a search engine list 63 * Sets up the given list as a search engine list
63 * @param {List} list The list to set up. 64 * @param {List} list The list to set up.
64 * @private 65 * @private
65 */ 66 */
66 setUpList_: function(list) { 67 setUpList_: function(list) {
67 options.search_engines.SearchEngineList.decorate(list); 68 options.search_engines.SearchEngineList.decorate(list);
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 validity, modelIndex); 123 validity, modelIndex);
123 }; 124 };
124 125
125 // Export 126 // Export
126 return { 127 return {
127 SearchEngineManager: SearchEngineManager 128 SearchEngineManager: SearchEngineManager
128 }; 129 };
129 130
130 }); 131 });
131 132
OLDNEW
« no previous file with comments | « chrome/browser/resources/options/reset_profile_settings_overlay.js ('k') | chrome/browser/resources/options/search_page.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698