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

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

Issue 2617663002: WIP: run clang-format-js on lots of things (Closed)
Patch Set: merge Created 3 years, 11 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.define('print_preview', function() { 5 cr.define('print_preview', function() {
6 'use strict'; 6 'use strict';
7 7
8 // TODO(rltoscano): This class needs a throbber while loading the destination 8 // TODO(rltoscano): This class needs a throbber while loading the destination
9 // or another solution is persist the settings of the printer so that next 9 // or another solution is persist the settings of the printer so that next
10 // load is fast. 10 // load is fast.
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 print_preview.SettingsSection.prototype.enterDocument.call(this); 88 print_preview.SettingsSection.prototype.enterDocument.call(this);
89 var changeButton = this.getElement().getElementsByClassName( 89 var changeButton = this.getElement().getElementsByClassName(
90 DestinationSettings.Classes_.CHANGE_BUTTON)[0]; 90 DestinationSettings.Classes_.CHANGE_BUTTON)[0];
91 this.tracker.add( 91 this.tracker.add(
92 changeButton, 'click', this.onChangeButtonClick_.bind(this)); 92 changeButton, 'click', this.onChangeButtonClick_.bind(this));
93 this.tracker.add( 93 this.tracker.add(
94 this.destinationStore_, 94 this.destinationStore_,
95 print_preview.DestinationStore.EventType.DESTINATION_SELECT, 95 print_preview.DestinationStore.EventType.DESTINATION_SELECT,
96 this.onDestinationSelect_.bind(this)); 96 this.onDestinationSelect_.bind(this));
97 this.tracker_.add( 97 this.tracker_.add(
98 this.destinationStore_, 98 this.destinationStore_, print_preview.DestinationStore.EventType
99 print_preview.DestinationStore.EventType. 99 .CACHED_SELECTED_DESTINATION_INFO_READY,
100 CACHED_SELECTED_DESTINATION_INFO_READY,
101 this.onSelectedDestinationNameSet_.bind(this)); 100 this.onSelectedDestinationNameSet_.bind(this));
102 }, 101 },
103 102
104 /** 103 /**
105 * Called when the "Change" button is clicked. Dispatches the 104 * Called when the "Change" button is clicked. Dispatches the
106 * CHANGE_BUTTON_ACTIVATE event. 105 * CHANGE_BUTTON_ACTIVATE event.
107 * @private 106 * @private
108 */ 107 */
109 onChangeButtonClick_: function() { 108 onChangeButtonClick_: function() {
110 cr.dispatchSimpleEvent( 109 cr.dispatchSimpleEvent(
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 var destinationName = 158 var destinationName =
160 this.destinationStore_.selectedDestination.displayName; 159 this.destinationStore_.selectedDestination.displayName;
161 var nameEl = this.getElement().getElementsByClassName( 160 var nameEl = this.getElement().getElementsByClassName(
162 DestinationSettings.Classes_.THOBBER_NAME)[0]; 161 DestinationSettings.Classes_.THOBBER_NAME)[0];
163 nameEl.textContent = destinationName; 162 nameEl.textContent = destinationName;
164 nameEl.title = destinationName; 163 nameEl.title = destinationName;
165 } 164 }
166 }; 165 };
167 166
168 // Export 167 // Export
169 return { 168 return {DestinationSettings: DestinationSettings};
170 DestinationSettings: DestinationSettings
171 };
172 }); 169 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698