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

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

Issue 2506323002: MD Settings: show an extension-controlled-indicator for proxy (Closed)
Patch Set: Created 4 years, 1 month 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-ui' implements the UI for the Settings page. 7 * 'settings-ui' implements the UI for the Settings page.
8 * 8 *
9 * Example: 9 * Example:
10 * 10 *
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 // sync the URL parameter to the textbox. 136 // sync the URL parameter to the textbox.
137 if (urlSearchQuery != searchField.getValue()) { 137 if (urlSearchQuery != searchField.getValue()) {
138 // Setting the search box value without triggering a 'search-changed' 138 // Setting the search box value without triggering a 'search-changed'
139 // event, to prevent an unnecessary duplicate entry in |window.history|. 139 // event, to prevent an unnecessary duplicate entry in |window.history|.
140 searchField.setValue(urlSearchQuery, true /* noEvent */); 140 searchField.setValue(urlSearchQuery, true /* noEvent */);
141 } 141 }
142 142
143 this.$.main.searchContents(urlSearchQuery); 143 this.$.main.searchContents(urlSearchQuery);
144 }, 144 },
145 145
146 /** @return {SettingsPrefsElement} */
147 getPrefsElement: function() {
148 return this.$.prefs;
149 },
150
146 /** 151 /**
147 * Handles the 'search-changed' event fired from the toolbar. 152 * Handles the 'search-changed' event fired from the toolbar.
148 * @param {!Event} e 153 * @param {!Event} e
149 * @private 154 * @private
150 */ 155 */
151 onSearchChanged_: function(e) { 156 onSearchChanged_: function(e) {
152 // Trim leading whitespace only, to prevent searching for empty string. This 157 // Trim leading whitespace only, to prevent searching for empty string. This
153 // still allows the user to search for 'foo bar', while taking a long pause 158 // still allows the user to search for 'foo bar', while taking a long pause
154 // after typing 'foo '. 159 // after typing 'foo '.
155 var query = e.detail.replace(/^\s+/, ''); 160 var query = e.detail.replace(/^\s+/, '');
(...skipping 20 matching lines...) Expand all
176 onMenuButtonTap_: function() { 181 onMenuButtonTap_: function() {
177 this.$$('app-drawer').toggle(); 182 this.$$('app-drawer').toggle();
178 }, 183 },
179 184
180 /** @private */ 185 /** @private */
181 directionDelegateChanged_: function() { 186 directionDelegateChanged_: function() {
182 this.$$('app-drawer').align = this.directionDelegate.isRtl() ? 187 this.$$('app-drawer').align = this.directionDelegate.isRtl() ?
183 'right' : 'left'; 188 'right' : 'left';
184 }, 189 },
185 }); 190 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698