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

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

Issue 2984843003: MD Settings: Convert all usages of .bind(this) to use ES6 arrow function. (Closed)
Patch Set: Resolve conflicts. Created 3 years, 5 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 }, 92 },
93 93
94 listeners: { 94 listeners: {
95 'subpage-expand': 'onSubpageExpanded_', 95 'subpage-expand': 'onSubpageExpanded_',
96 }, 96 },
97 97
98 /** @override */ 98 /** @override */
99 attached: function() { 99 attached: function() {
100 this.currentRoute_ = settings.getCurrentRoute(); 100 this.currentRoute_ = settings.getCurrentRoute();
101 101
102 this.addEventListener('chrome-cleanup-dismissed', function(e) { 102 this.addEventListener('chrome-cleanup-dismissed', e => {
103 this.showChromeCleanup = false; 103 this.showChromeCleanup = false;
104 }.bind(this)); 104 });
105 105
106 if (settings.AndroidAppsBrowserProxyImpl) { 106 if (settings.AndroidAppsBrowserProxyImpl) {
107 cr.addWebUIListener( 107 cr.addWebUIListener(
108 'android-apps-info-update', this.androidAppsInfoUpdate_.bind(this)); 108 'android-apps-info-update', this.androidAppsInfoUpdate_.bind(this));
109 settings.AndroidAppsBrowserProxyImpl.getInstance() 109 settings.AndroidAppsBrowserProxyImpl.getInstance()
110 .requestAndroidAppsInfo(); 110 .requestAndroidAppsInfo();
111 } 111 }
112 }, 112 },
113 113
114 /** 114 /**
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 onSubpageExpanded_: function() { 240 onSubpageExpanded_: function() {
241 this.hasExpandedSection_ = true; 241 this.hasExpandedSection_ = true;
242 }, 242 },
243 243
244 /** 244 /**
245 * Render the advanced page now (don't wait for idle). 245 * Render the advanced page now (don't wait for idle).
246 * @private 246 * @private
247 */ 247 */
248 advancedToggleExpandedChanged_: function() { 248 advancedToggleExpandedChanged_: function() {
249 if (this.advancedToggleExpanded) { 249 if (this.advancedToggleExpanded) {
250 this.async(function() { 250 this.async(() => {
251 this.$$('#advancedPageTemplate').get(); 251 this.$$('#advancedPageTemplate').get();
252 }.bind(this)); 252 });
253 } 253 }
254 }, 254 },
255 255
256 /** 256 /**
257 * @param {boolean} inSearchMode 257 * @param {boolean} inSearchMode
258 * @param {boolean} hasExpandedSection 258 * @param {boolean} hasExpandedSection
259 * @return {boolean} 259 * @return {boolean}
260 * @private 260 * @private
261 */ 261 */
262 showAdvancedToggle_: function(inSearchMode, hasExpandedSection) { 262 showAdvancedToggle_: function(inSearchMode, hasExpandedSection) {
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 303
304 /** 304 /**
305 * @param {boolean} opened Whether the menu is expanded. 305 * @param {boolean} opened Whether the menu is expanded.
306 * @return {string} Icon name. 306 * @return {string} Icon name.
307 * @private 307 * @private
308 */ 308 */
309 getArrowIcon_: function(opened) { 309 getArrowIcon_: function(opened) {
310 return opened ? 'cr:arrow-drop-up' : 'cr:arrow-drop-down'; 310 return opened ? 'cr:arrow-drop-up' : 'cr:arrow-drop-down';
311 }, 311 },
312 }); 312 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698