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

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

Issue 2872853004: Remove usage of the generic multiple permissions update string. (Closed)
Patch Set: Feedback Created 3 years, 7 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_UPDATE_INFOBAR_DELEGATE_ANDROID_H_ 5 #ifndef CHROME_BROWSER_PERMISSIONS_PERMISSION_UPDATE_INFOBAR_DELEGATE_ANDROID_H_
6 #define CHROME_BROWSER_PERMISSIONS_PERMISSION_UPDATE_INFOBAR_DELEGATE_ANDROID_H_ 6 #define CHROME_BROWSER_PERMISSIONS_PERMISSION_UPDATE_INFOBAR_DELEGATE_ANDROID_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 13 matching lines...) Expand all
24 // permissions for previously allowed ContentSettingsTypes. 24 // permissions for previously allowed ContentSettingsTypes.
25 class PermissionUpdateInfoBarDelegate : public ConfirmInfoBarDelegate { 25 class PermissionUpdateInfoBarDelegate : public ConfirmInfoBarDelegate {
26 public: 26 public:
27 using PermissionUpdatedCallback = base::Callback<void(bool)>; 27 using PermissionUpdatedCallback = base::Callback<void(bool)>;
28 28
29 // Creates an infobar to resolve conflicts in Android runtime permissions. 29 // Creates an infobar to resolve conflicts in Android runtime permissions.
30 // The necessary runtime permissions are generated based on the list of 30 // The necessary runtime permissions are generated based on the list of
31 // ContentSettingsTypes passed in. Returns the infobar if it was successfully 31 // ContentSettingsTypes passed in. Returns the infobar if it was successfully
32 // added. 32 // added.
33 // 33 //
34 // This function can only be called with one of
35 // CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC,
36 // CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA or
37 // CONTENT_SETTINGS_TYPE_GEOLOCATION, or with both
38 // CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC and
39 // CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA.
40 //
34 // The |callback| will not be triggered if this is deleted. 41 // The |callback| will not be triggered if this is deleted.
35 static infobars::InfoBar* Create( 42 static infobars::InfoBar* Create(
36 content::WebContents* web_contents, 43 content::WebContents* web_contents,
37 const std::vector<ContentSettingsType>& content_settings_types, 44 const std::vector<ContentSettingsType>& content_settings_types,
38 const PermissionUpdatedCallback& callback); 45 const PermissionUpdatedCallback& callback);
39 46
40 // Creates an infobar to resolve conflicts in Android runtime permissions. 47 // Creates an infobar to resolve conflicts in Android runtime permissions.
41 // Returns the infobar if it was successfully added. 48 // Returns the infobar if it was successfully added.
42 // 49 //
43 // The |callback| will not be triggered if this is deleted. 50 // The |callback| will not be triggered if this is deleted.
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 93
87 base::android::ScopedJavaGlobalRef<jobject> java_delegate_; 94 base::android::ScopedJavaGlobalRef<jobject> java_delegate_;
88 std::vector<std::string> android_permissions_; 95 std::vector<std::string> android_permissions_;
89 int permission_msg_id_; 96 int permission_msg_id_;
90 PermissionUpdatedCallback callback_; 97 PermissionUpdatedCallback callback_;
91 98
92 DISALLOW_COPY_AND_ASSIGN(PermissionUpdateInfoBarDelegate); 99 DISALLOW_COPY_AND_ASSIGN(PermissionUpdateInfoBarDelegate);
93 }; 100 };
94 101
95 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_UPDATE_INFOBAR_DELEGATE_ANDROID _H_ 102 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_UPDATE_INFOBAR_DELEGATE_ANDROID _H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698