Update CrOS OOBE throbber to MD throbber; delete old asset
[chromium-blink-merge.git] / chrome / common / extensions / api / experience_sampling_private.json
blobc6a171f9a295ced874e964a2deb272d0ceffac8f
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
3 // found in the LICENSE file.
6   {
7     "namespace": "experienceSamplingPrivate",
8     "description": "The experienceSamplingPrivate API listens for when various types of UI elements are displayed and closed (interstitials, infobars, etc.) and pass these events along to whitelisted extensions, along with information about the user’s decisions.",
9     "types": [
10       {
11         "id": "UIElement",
12         "type": "object",
13         "description": "Information about an element of the UI.",
14         "properties": {
15           "name": {"type": "string", "description": "The type of interesting UI element."},
16           "destination": {"type": "string", "description": "URL that was being navigated to when the UI was shown."},
17           "referrer": {"type": "string", "description": "URL that was being navigated from when the UI was shown."},
18           "time": {"type": "number", "description": "Time when the UI element was first displayed (in ms since epoch)."}
19         }
20       },
21       {
22         "id": "BrowserInfo",
23         "type": "object",
24         "description": "Information about the current browser context.",
25         "properties": {
26           "variations": {
27             "type": "string", 
28             "description": "The experimental variations (trial and group names) active in Chrome."
29           }
30         }
31       },
32       {
33         "id": "UserDecision",
34         "type": "object",
35         "properties": {
36           "name": {"type": "string", "description": "What the user decided to do."},
37           "details": {"type": "boolean", "description": "Whether the user opened the additional details."},
38           "learn_more": {"type": "boolean", "description": "Whether the user clicked the Learn More link."},
39           "time": {"type": "number", "description": "Time when the user made the decision (in ms since epoch)."}
40         }
41       }
42     ],
43     "functions": [
44       {
45         "name": "getBrowserInfo",
46         "type": "function",
47         "description": "Retrives information about the current browser context (experimental variation information), passing a BrowserInfo object to the callback function.",
48         "parameters": [
49           {
50             "name": "callback",
51             "type": "function",
52             "parameters": [
53               {
54                 "name": "info",
55                 "$ref": "BrowserInfo",
56                 "description": "The current browser context."
57               }
58             ]
59           }
60         ]
61       }
62     ],
63     "events": [
64       {
65         "name": "onDisplayed",
66         "type": "function",
67         "description": "Fired when an interesting piece of UI is shown to the user.",
68         "parameters": [
69           {
70             "name": "element",
71             "description": "The interesting piece of UI.",
72             "$ref": "UIElement"
73           }
74         ]
75       },
76       {
77         "name": "onDecision",
78         "type": "function",
79         "description": "Fired when a user makes a decision about an interesting piece of UI.",
80         "parameters": [
81           {
82             "name": "element",
83             "description": "The interesting piece of UI.",
84             "$ref": "UIElement"
85           },
86           {
87             "name": "decision",
88             "description": "The decision the user made.",
89             "$ref": "UserDecision"
90           }
91         ]
92       }
93     ]
94   }