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

Side by Side Diff: chrome/browser/resources/print_preview/settings/destination_settings.js

Issue 2939273002: DO NOT SUBMIT: what chrome/browser/resources/ could eventually look like with clang-format (Closed)
Patch Set: Created 3 years, 6 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 (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.exportPath('print_preview'); 5 cr.exportPath('print_preview');
6 6
7 /** 7 /**
8 * CSS classes used by the component. 8 * CSS classes used by the component.
9 * @enum {string} 9 * @enum {string}
10 * @private 10 * @private
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 var changeButton = this.getElement().getElementsByClassName( 91 var changeButton = this.getElement().getElementsByClassName(
92 print_preview.DestinationSettingsClasses_.CHANGE_BUTTON)[0]; 92 print_preview.DestinationSettingsClasses_.CHANGE_BUTTON)[0];
93 this.tracker.add( 93 this.tracker.add(
94 changeButton, 'click', this.onChangeButtonClick_.bind(this)); 94 changeButton, 'click', this.onChangeButtonClick_.bind(this));
95 this.tracker.add( 95 this.tracker.add(
96 this.destinationStore_, 96 this.destinationStore_,
97 print_preview.DestinationStore.EventType.DESTINATION_SELECT, 97 print_preview.DestinationStore.EventType.DESTINATION_SELECT,
98 this.onDestinationSelect_.bind(this)); 98 this.onDestinationSelect_.bind(this));
99 this.tracker_.add( 99 this.tracker_.add(
100 this.destinationStore_, 100 this.destinationStore_,
101 print_preview.DestinationStore.EventType. 101 print_preview.DestinationStore.EventType
102 CACHED_SELECTED_DESTINATION_INFO_READY, 102 .CACHED_SELECTED_DESTINATION_INFO_READY,
103 this.onSelectedDestinationNameSet_.bind(this)); 103 this.onSelectedDestinationNameSet_.bind(this));
104 }, 104 },
105 105
106 /** 106 /**
107 * Called when the "Change" button is clicked. Dispatches the 107 * Called when the "Change" button is clicked. Dispatches the
108 * CHANGE_BUTTON_ACTIVATE event. 108 * CHANGE_BUTTON_ACTIVATE event.
109 * @private 109 * @private
110 */ 110 */
111 onChangeButtonClick_: function() { 111 onChangeButtonClick_: function() {
112 cr.dispatchSimpleEvent( 112 cr.dispatchSimpleEvent(
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 var destinationName = 161 var destinationName =
162 this.destinationStore_.selectedDestination.displayName; 162 this.destinationStore_.selectedDestination.displayName;
163 var nameEl = this.getElement().getElementsByClassName( 163 var nameEl = this.getElement().getElementsByClassName(
164 print_preview.DestinationSettingsClasses_.THOBBER_NAME)[0]; 164 print_preview.DestinationSettingsClasses_.THOBBER_NAME)[0];
165 nameEl.textContent = destinationName; 165 nameEl.textContent = destinationName;
166 nameEl.title = destinationName; 166 nameEl.title = destinationName;
167 } 167 }
168 }; 168 };
169 169
170 // Export 170 // Export
171 return { 171 return {DestinationSettings: DestinationSettings};
172 DestinationSettings: DestinationSettings
173 };
174 }); 172 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698