| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 * @enum {number} | 8 * @enum {number} |
| 9 * @private | 9 * @private |
| 10 */ | 10 */ |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 | 98 |
| 99 /** | 99 /** |
| 100 * Sets the invitation store's Google Cloud Print interface. | 100 * Sets the invitation store's Google Cloud Print interface. |
| 101 * @param {!cloudprint.CloudPrintInterface} cloudPrintInterface Interface | 101 * @param {!cloudprint.CloudPrintInterface} cloudPrintInterface Interface |
| 102 * to set. | 102 * to set. |
| 103 */ | 103 */ |
| 104 setCloudPrintInterface: function(cloudPrintInterface) { | 104 setCloudPrintInterface: function(cloudPrintInterface) { |
| 105 this.cloudPrintInterface_ = cloudPrintInterface; | 105 this.cloudPrintInterface_ = cloudPrintInterface; |
| 106 this.tracker_.add( | 106 this.tracker_.add( |
| 107 this.cloudPrintInterface_, | 107 this.cloudPrintInterface_, |
| 108 cloudprint.CloudPrintInterface.EventType.INVITES_DONE, | 108 cloudprint.CloudPrintInterfaceEventType.INVITES_DONE, |
| 109 this.onCloudPrintInvitesDone_.bind(this)); | 109 this.onCloudPrintInvitesDone_.bind(this)); |
| 110 this.tracker_.add( | 110 this.tracker_.add( |
| 111 this.cloudPrintInterface_, | 111 this.cloudPrintInterface_, |
| 112 cloudprint.CloudPrintInterface.EventType.INVITES_FAILED, | 112 cloudprint.CloudPrintInterfaceEventType.INVITES_FAILED, |
| 113 this.onCloudPrintInvitesDone_.bind(this)); | 113 this.onCloudPrintInvitesDone_.bind(this)); |
| 114 this.tracker_.add( | 114 this.tracker_.add( |
| 115 this.cloudPrintInterface_, | 115 this.cloudPrintInterface_, |
| 116 cloudprint.CloudPrintInterface.EventType.PROCESS_INVITE_DONE, | 116 cloudprint.CloudPrintInterfaceEventType.PROCESS_INVITE_DONE, |
| 117 this.onCloudPrintProcessInviteDone_.bind(this)); | 117 this.onCloudPrintProcessInviteDone_.bind(this)); |
| 118 this.tracker_.add( | 118 this.tracker_.add( |
| 119 this.cloudPrintInterface_, | 119 this.cloudPrintInterface_, |
| 120 cloudprint.CloudPrintInterface.EventType.PROCESS_INVITE_FAILED, | 120 cloudprint.CloudPrintInterfaceEventType.PROCESS_INVITE_FAILED, |
| 121 this.onCloudPrintProcessInviteFailed_.bind(this)); | 121 this.onCloudPrintProcessInviteFailed_.bind(this)); |
| 122 }, | 122 }, |
| 123 | 123 |
| 124 /** Initiates loading of cloud printer sharing invitations. */ | 124 /** Initiates loading of cloud printer sharing invitations. */ |
| 125 startLoadingInvitations: function() { | 125 startLoadingInvitations: function() { |
| 126 if (!this.cloudPrintInterface_) | 126 if (!this.cloudPrintInterface_) |
| 127 return; | 127 return; |
| 128 if (!this.userInfo_.activeUser) | 128 if (!this.userInfo_.activeUser) |
| 129 return; | 129 return; |
| 130 if (this.loadStatus_.hasOwnProperty(this.userInfo_.activeUser)) { | 130 if (this.loadStatus_.hasOwnProperty(this.userInfo_.activeUser)) { |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 cr.dispatchSimpleEvent( | 218 cr.dispatchSimpleEvent( |
| 219 this, InvitationStore.EventType.INVITATION_PROCESSED); | 219 this, InvitationStore.EventType.INVITATION_PROCESSED); |
| 220 } | 220 } |
| 221 }; | 221 }; |
| 222 | 222 |
| 223 // Export | 223 // Export |
| 224 return { | 224 return { |
| 225 InvitationStore: InvitationStore | 225 InvitationStore: InvitationStore |
| 226 }; | 226 }; |
| 227 }); | 227 }); |
| OLD | NEW |