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

Side by Side Diff: chrome/browser/permissions/permission_dialog_delegate.h

Issue 2463393003: Record permission prompt gesture metrics on Android. (Closed)
Patch Set: Address comments Created 4 years, 1 month 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_PERMISSIONS_PERMISSION_DIALOG_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_PERMISSIONS_PERMISSION_DIALOG_DELEGATE_H_
6 #define CHROME_BROWSER_PERMISSIONS_PERMISSION_DIALOG_DELEGATE_H_ 6 #define CHROME_BROWSER_PERMISSIONS_PERMISSION_DIALOG_DELEGATE_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/android/scoped_java_ref.h" 10 #include "base/android/scoped_java_ref.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 const GURL& requesting_frame, 45 const GURL& requesting_frame,
46 bool user_gesture, 46 bool user_gesture,
47 Profile* profile, 47 Profile* profile,
48 const PermissionSetCallback& callback); 48 const PermissionSetCallback& callback);
49 49
50 // Creates a modal dialog for a media stream permission request. 50 // Creates a modal dialog for a media stream permission request.
51 // TODO(dominickn): remove this when media stream requests are eventually 51 // TODO(dominickn): remove this when media stream requests are eventually
52 // folded in with other permission requests. 52 // folded in with other permission requests.
53 static void CreateMediaStreamDialog( 53 static void CreateMediaStreamDialog(
54 content::WebContents* web_contents, 54 content::WebContents* web_contents,
55 bool user_gesture,
55 std::unique_ptr<MediaStreamDevicesController> controller); 56 std::unique_ptr<MediaStreamDevicesController> controller);
56 57
57 // Returns true if we should show the user a modal permission prompt rather 58 // Returns true if we should show the user a modal permission prompt rather
58 // than an infobar. 59 // than an infobar.
59 static bool ShouldShowDialog(bool has_user_gesture); 60 static bool ShouldShowDialog(bool has_user_gesture);
60 61
61 // JNI methods. 62 // JNI methods.
62 static bool RegisterPermissionDialogDelegate(JNIEnv* env); 63 static bool RegisterPermissionDialogDelegate(JNIEnv* env);
63 void Accept(JNIEnv* env, const JavaParamRef<jobject>& obj, jboolean persist); 64 void Accept(JNIEnv* env, const JavaParamRef<jobject>& obj, jboolean persist);
64 void Cancel(JNIEnv* env, const JavaParamRef<jobject>& obj, jboolean persist); 65 void Cancel(JNIEnv* env, const JavaParamRef<jobject>& obj, jboolean persist);
(...skipping 14 matching lines...) Expand all
79 80
80 // The InfoBarDelegate which this class is wrapping. 81 // The InfoBarDelegate which this class is wrapping.
81 // TODO(dominickn,lshang) replace this with PermissionPromptAndroid as the 82 // TODO(dominickn,lshang) replace this with PermissionPromptAndroid as the
82 // permission prompt refactoring continues. 83 // permission prompt refactoring continues.
83 std::unique_ptr<PermissionInfoBarDelegate> infobar_delegate_; 84 std::unique_ptr<PermissionInfoBarDelegate> infobar_delegate_;
84 85
85 DISALLOW_COPY_AND_ASSIGN(PermissionDialogDelegate); 86 DISALLOW_COPY_AND_ASSIGN(PermissionDialogDelegate);
86 }; 87 };
87 88
88 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_DIALOG_DELEGATE_H_ 89 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_DIALOG_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698