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

Side by Side Diff: chrome/browser/resources/settings/basic_page/basic_page.js

Issue 2697453008: [MD settings] expand subpages to 100% (Closed)
Patch Set: async Created 3 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 /** 5 /**
6 * @fileoverview 6 * @fileoverview
7 * 'settings-basic-page' is the settings page containing the actual settings. 7 * 'settings-basic-page' is the settings page containing the actual settings.
8 */ 8 */
9 Polymer({ 9 Polymer({
10 is: 'settings-basic-page', 10 is: 'settings-basic-page',
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 * @param {string} query The text to search for. 95 * @param {string} query The text to search for.
96 * @return {!Promise<!settings.SearchRequest>} A signal indicating that 96 * @return {!Promise<!settings.SearchRequest>} A signal indicating that
97 * searching finished. 97 * searching finished.
98 */ 98 */
99 searchContents: function(query) { 99 searchContents: function(query) {
100 var whenSearchDone = settings.getSearchManager().search( 100 var whenSearchDone = settings.getSearchManager().search(
101 query, assert(this.$$('#basicPage'))); 101 query, assert(this.$$('#basicPage')));
102 102
103 if (this.pageVisibility.advancedSettings !== false) { 103 if (this.pageVisibility.advancedSettings !== false) {
104 assert(whenSearchDone === settings.getSearchManager().search( 104 assert(whenSearchDone === settings.getSearchManager().search(
105 query, assert(this.$.advancedPageTemplate.get()))); 105 query, assert(this.$$('#advancedPageTemplate').get())));
106 } 106 }
107 107
108 return whenSearchDone; 108 return whenSearchDone;
109 }, 109 },
110 110
111 /** @private */ 111 /** @private */
112 onResetDone_: function() { 112 onResetDone_: function() {
113 this.showResetProfileBanner_ = false; 113 this.showResetProfileBanner_ = false;
114 }, 114 },
115 115
(...skipping 13 matching lines...) Expand all
129 */ 129 */
130 onSubpageExpanded_: function() { 130 onSubpageExpanded_: function() {
131 this.hasExpandedSection_ = true; 131 this.hasExpandedSection_ = true;
132 }, 132 },
133 133
134 /** 134 /**
135 * Render the advanced page now (don't wait for idle). 135 * Render the advanced page now (don't wait for idle).
136 * @private 136 * @private
137 */ 137 */
138 advancedToggleExpandedChanged_: function() { 138 advancedToggleExpandedChanged_: function() {
139 if (this.advancedToggleExpanded) 139 if (this.advancedToggleExpanded) {
140 this.$.advancedPageTemplate.get(); 140 this.async(function() {
141 this.$$('#advancedPageTemplate').get();
142 }.bind(this));
143 }
141 }, 144 },
142 145
143 /** 146 /**
144 * @param {boolean} inSearchMode 147 * @param {boolean} inSearchMode
145 * @param {boolean} hasExpandedSection 148 * @param {boolean} hasExpandedSection
146 * @return {boolean} 149 * @return {boolean}
147 * @private 150 * @private
148 */ 151 */
149 showAdvancedToggle_: function(inSearchMode, hasExpandedSection) { 152 showAdvancedToggle_: function(inSearchMode, hasExpandedSection) {
150 return !inSearchMode && !hasExpandedSection; 153 return !inSearchMode && !hasExpandedSection;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 192
190 /** 193 /**
191 * @param {boolean} opened Whether the menu is expanded. 194 * @param {boolean} opened Whether the menu is expanded.
192 * @return {string} Icon name. 195 * @return {string} Icon name.
193 * @private 196 * @private
194 */ 197 */
195 getArrowIcon_: function(opened) { 198 getArrowIcon_: function(opened) {
196 return opened ? 'cr:arrow-drop-up' : 'cr:arrow-drop-down'; 199 return opened ? 'cr:arrow-drop-up' : 'cr:arrow-drop-down';
197 }, 200 },
198 }); 201 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/settings/basic_page/basic_page.html ('k') | chrome/test/data/webui/settings/settings_main_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698