| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 // <include src="data.js"> | 5 // <include src="data.js"> |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * @type {number} | 8 * @type {number} |
| 9 * @const | 9 * @const |
| 10 */ | 10 */ |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 // Clear the system information if the user doesn't want it to be sent. | 174 // Clear the system information if the user doesn't want it to be sent. |
| 175 this.feedbackInfo_.systemInformation = null; | 175 this.feedbackInfo_.systemInformation = null; |
| 176 } | 176 } |
| 177 | 177 |
| 178 /** @const */ var ID = this.id_; | 178 /** @const */ var ID = this.id_; |
| 179 /** @const */ var FLOW = this.feedbackInfo_.flow; | 179 /** @const */ var FLOW = this.feedbackInfo_.flow; |
| 180 chrome.feedbackPrivate.sendFeedback(this.feedbackInfo_, | 180 chrome.feedbackPrivate.sendFeedback(this.feedbackInfo_, |
| 181 function(result) { | 181 function(result) { |
| 182 if (result == ReportStatus.SUCCESS) { | 182 if (result == ReportStatus.SUCCESS) { |
| 183 console.log('Feedback: Report sent for request with ID ' + ID); | 183 console.log('Feedback: Report sent for request with ID ' + ID); |
| 184 if (FLOW != FeedbackFlow.LOGIN) | 184 if (FLOW != chrome.feedbackPrivate.FeedbackFlow.LOGIN) |
| 185 window.open(FEEDBACK_LANDING_PAGE, '_blank'); | 185 window.open(FEEDBACK_LANDING_PAGE, '_blank'); |
| 186 } else { | 186 } else { |
| 187 console.log('Feedback: Report for request with ID ' + ID + | 187 console.log('Feedback: Report for request with ID ' + ID + |
| 188 ' will be sent later.'); | 188 ' will be sent later.'); |
| 189 } | 189 } |
| 190 }); | 190 }); |
| 191 } | 191 } |
| 192 | 192 |
| 193 /** | 193 /** |
| 194 * Handles the event when the feedback UI window corresponding to this | 194 * Handles the event when the feedback UI window corresponding to this |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 // Observe when the window is closed. | 291 // Observe when the window is closed. |
| 292 appWindow.onClosed.addListener(function() { | 292 appWindow.onClosed.addListener(function() { |
| 293 request.onWindowClosed(); | 293 request.onWindowClosed(); |
| 294 }); | 294 }); |
| 295 }); | 295 }); |
| 296 } | 296 } |
| 297 | 297 |
| 298 chrome.runtime.onMessage.addListener(feedbackReadyHandler); | 298 chrome.runtime.onMessage.addListener(feedbackReadyHandler); |
| 299 chrome.runtime.onMessageExternal.addListener(requestFeedbackHandler); | 299 chrome.runtime.onMessageExternal.addListener(requestFeedbackHandler); |
| 300 chrome.feedbackPrivate.onFeedbackRequested.addListener(startFeedbackUI); | 300 chrome.feedbackPrivate.onFeedbackRequested.addListener(startFeedbackUI); |
| OLD | NEW |