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
3 // found in the LICENSE file.
5 // Use the <code>chrome.feedbackPrivate</code> API to provide Chrome [OS]
6 // feedback to the Google Feedback servers.
7 namespace feedbackPrivate
{
9 dictionary AttachedFile
{
11 [instanceOf
=Blob
] object? data
;
14 dictionary SystemInformation
{
19 dictionary FeedbackInfo
{
20 // File to attach to the feedback report.
21 AttachedFile? attachedFile
;
23 // An optional tag to label what type this feedback is.
24 DOMString? categoryTag
;
26 // The feedback text describing the user issue.
27 DOMString description
;
29 // The e-mail of the user that initiated this feedback.
32 // The URL of the page that this issue was being experienced on.
35 // Optional product ID to override the Chrome [OS] product id that is
36 // usually passed to the feedback server.
39 // Screenshot to send with this feedback.
40 [instanceOf
=Blob
] object? screenshot
;
42 // Optional id for performance trace data that can be included in this
46 // An array of key/value pairs providing system information for this
48 SystemInformation
[]? systemInformation
;
50 // True if we have permission to add histograms to this feedback report.
51 boolean sendHistograms
;
53 // TODO(rkc): Remove these once we have bindings to send blobs to Chrome.
54 // Used internally to store the blob uuid after parameter customization.
55 DOMString? attachedFileBlobUuid
;
56 DOMString? screenshotBlobUuid
;
59 // Status of the sending of a feedback report.
60 enum Status
{success
, delayed
};
62 callback GetUserEmailCallback
= void(DOMString email
);
63 callback GetSystemInformationCallback
=
64 void(SystemInformation
[] systemInformation
);
65 callback SendFeedbackCallback
= void(Status status
);
66 callback GetStringsCallback
= void(object result
);
69 // Returns the email of the currently active or logged in user.
70 static
void getUserEmail
(GetUserEmailCallback
callback);
72 // Returns the system information dictionary.
73 static
void getSystemInformation
(GetSystemInformationCallback
callback);
75 // Sends a feedback report.
76 static
void sendFeedback
(FeedbackInfo feedback
,
77 SendFeedbackCallback
callback);
79 // Gets localized translated strings for feedback. It returns the
80 // strings as a dictionary mapping from string identifier to the
81 // translated string to use in the feedback app UI.
82 static
void getStrings
(GetStringsCallback
callback);
86 // Fired when the a user requests the launch of the feedback UI. We're
87 // using an event for this versus using the override API since we want
88 // to be invoked, but not showing a UI, so the feedback extension can
89 // take a screenshot of the user's desktop.
90 static
void onFeedbackRequested
(FeedbackInfo feedback
);