Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(294)

Side by Side Diff: chrome/browser/ui/website_settings/permission_bubble_request.h

Issue 1884073002: Add a new metric for how many times permissions prompts are shown. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix browser tests Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 #ifndef CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_BUBBLE_REQUEST_H_ 5 #ifndef CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_BUBBLE_REQUEST_H_
6 #define CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_BUBBLE_REQUEST_H_ 6 #define CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_BUBBLE_REQUEST_H_
7 7
8 #include "base/strings/string16.h" 8 #include "base/strings/string16.h"
9 #include "url/gurl.h" 9 #include "url/gurl.h"
10 10
11 namespace gfx { 11 namespace gfx {
12 enum class VectorIconId; 12 enum class VectorIconId;
13 } 13 }
14 14
15 // Used for UMA to record the types of permission prompts shown.
tsergeant 2016/04/15 00:54:10 Maybe add a note that this corresponds to the Perm
benwells 2016/04/18 01:02:06 Done.
16 enum class PermissionBubbleType {
17 UNKNOWN,
18 MULTIPLE,
19 PERMISSION,
20 QUOTA,
21 DOWNLOAD,
22 MEDIA_STREAM,
23 REGISTER_PROTOCOL_HANDLER,
24 NUM
25 };
26
15 // Describes the interface a feature utilizing permission bubbles should 27 // Describes the interface a feature utilizing permission bubbles should
16 // implement. A class of this type is registered with the permission bubble 28 // implement. A class of this type is registered with the permission bubble
17 // manager to receive updates about the result of the permissions request 29 // manager to receive updates about the result of the permissions request
18 // from the bubble. It should live until it is unregistered or until 30 // from the bubble. It should live until it is unregistered or until
19 // RequestFinished is called. 31 // RequestFinished is called.
20 // Note that no particular guarantees are made about what exact UI surface 32 // Note that no particular guarantees are made about what exact UI surface
21 // is presented to the user. The delegate may be coalesced with other bubble 33 // is presented to the user. The delegate may be coalesced with other bubble
22 // requests, or depending on the situation, not shown at all. 34 // requests, or depending on the situation, not shown at all.
23 class PermissionBubbleRequest { 35 class PermissionBubbleRequest {
24 public: 36 public:
(...skipping 30 matching lines...) Expand all
55 // Called when the user has cancelled the permission request. This 67 // Called when the user has cancelled the permission request. This
56 // corresponds to a denial, but is segregated in case the context needs to 68 // corresponds to a denial, but is segregated in case the context needs to
57 // be able to distinguish between an active refusal or an implicit refusal. 69 // be able to distinguish between an active refusal or an implicit refusal.
58 virtual void Cancelled() = 0; 70 virtual void Cancelled() = 0;
59 71
60 // The bubble this request was associated with was answered by the user. 72 // The bubble this request was associated with was answered by the user.
61 // It is safe for the request to be deleted at this point -- it will receive 73 // It is safe for the request to be deleted at this point -- it will receive
62 // no further message from the permission bubble system. This method will 74 // no further message from the permission bubble system. This method will
63 // eventually be called on every request which is not unregistered. 75 // eventually be called on every request which is not unregistered.
64 virtual void RequestFinished() = 0; 76 virtual void RequestFinished() = 0;
77
78 virtual PermissionBubbleType GetPermissionBubbleType() const;
65 }; 79 };
66 80
67 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_BUBBLE_REQUEST_H_ 81 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_BUBBLE_REQUEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698