OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 namespace feedbackPrivate { |
| 6 |
| 7 dictionary AttachedFile { |
| 8 DOMString name; |
| 9 [instanceOf=Blob] object data; |
| 10 }; |
| 11 |
| 12 dictionary SystemInformation { |
| 13 DOMString key; |
| 14 DOMString value; |
| 15 }; |
| 16 |
| 17 dictionary FeedbackInfo { |
| 18 // File to attach to the feedback report. |
| 19 AttachedFile? attachedFile; |
| 20 |
| 21 // An optional tag to label what type this feedback is. |
| 22 DOMString? categoryTag; |
| 23 |
| 24 // The feedback text describing the user issue. |
| 25 DOMString description; |
| 26 |
| 27 // The e-mail of the user that initiated this feedback. |
| 28 DOMString? email; |
| 29 |
| 30 // The URL of the page that this issue was being experienced on. |
| 31 DOMString? pageUrl; |
| 32 |
| 33 // Optional product ID to override the Chrome [OS] product id that is |
| 34 // usually passed to the feedback server. |
| 35 DOMString? productId; |
| 36 |
| 37 // Screenshot to send with this feedback. |
| 38 [instanceOf=Blob] object? screenshot; |
| 39 |
| 40 // An array of key/value pairs providing system information for this |
| 41 // feedback report. |
| 42 SystemInformation[]? systemInformation; |
| 43 |
| 44 // TODO(rkc): Remove these once we have bindings to send blobs to Chrome. |
| 45 // Used internally to store the blob Url after parameter customization. |
| 46 DOMString attachedFileBlobUrl; |
| 47 DOMString screenshotBlobUrl; |
| 48 }; |
| 49 |
| 50 // Status of the sending of a feedback report. |
| 51 enum Status {success, delayed}; |
| 52 |
| 53 callback GetUserEmailCallback = void(DOMString email); |
| 54 callback GetSystemInformationCallback = |
| 55 void(SystemInformation[] systemInformation); |
| 56 callback SendFeedbackCallback = void(Status status); |
| 57 callback GetStringsCallback = void(object result); |
| 58 |
| 59 interface Functions { |
| 60 // Returns the email of the currently active or logged in user. |
| 61 static void getUserEmail(GetUserEmailCallback callback); |
| 62 |
| 63 // Returns the system information dictionary. |
| 64 static void getSystemInformation(GetSystemInformationCallback callback); |
| 65 |
| 66 // Sends a feedback report. |
| 67 static void sendFeedback(FeedbackInfo feedback, |
| 68 SendFeedbackCallback callback); |
| 69 }; |
| 70 |
| 71 interface Events { |
| 72 // Fired when the a user requests the launch of the feedback UI. We're |
| 73 // using an event for this versus using the override API since we want |
| 74 // to be invoked, but not showing a UI, so the feedback extension can |
| 75 // take a screenshot of the user's desktop. |
| 76 static void onFeedbackRequested(FeedbackInfo feedback); |
| 77 }; |
| 78 }; |
OLD | NEW |