| OLD | NEW |
| 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_UI_ANDROID_INFOBARS_GROUPED_PERMISSION_INFOBAR_H_ | 5 #ifndef CHROME_BROWSER_UI_ANDROID_INFOBARS_GROUPED_PERMISSION_INFOBAR_H_ |
| 6 #define CHROME_BROWSER_UI_ANDROID_INFOBARS_GROUPED_PERMISSION_INFOBAR_H_ | 6 #define CHROME_BROWSER_UI_ANDROID_INFOBARS_GROUPED_PERMISSION_INFOBAR_H_ |
| 7 | 7 |
| 8 #include <jni.h> | 8 #include <jni.h> |
| 9 | 9 |
| 10 #include "base/android/scoped_java_ref.h" | 10 #include "base/android/scoped_java_ref.h" |
| 11 #include "chrome/browser/ui/android/infobars/confirm_infobar.h" | 11 #include "chrome/browser/ui/android/infobars/confirm_infobar.h" |
| 12 | 12 |
| 13 class GroupedPermissionInfoBarDelegate; | 13 class GroupedPermissionInfoBarDelegate; |
| 14 | 14 |
| 15 class GroupedPermissionInfoBar : public ConfirmInfoBar { | 15 class GroupedPermissionInfoBar : public ConfirmInfoBar { |
| 16 public: | 16 public: |
| 17 explicit GroupedPermissionInfoBar( | 17 explicit GroupedPermissionInfoBar( |
| 18 std::unique_ptr<GroupedPermissionInfoBarDelegate> delegate); | 18 std::unique_ptr<GroupedPermissionInfoBarDelegate> delegate); |
| 19 ~GroupedPermissionInfoBar() override; | 19 ~GroupedPermissionInfoBar() override; |
| 20 | 20 |
| 21 void SetPermissionState( | |
| 22 JNIEnv* env, | |
| 23 const base::android::JavaParamRef<jobject>& obj, | |
| 24 const base::android::JavaParamRef<jbooleanArray>& permissions); | |
| 25 | |
| 26 static bool Register(JNIEnv* env); | |
| 27 | |
| 28 private: | 21 private: |
| 29 void ProcessButton(int action) override; | 22 void ProcessButton(int action) override; |
| 30 | 23 |
| 31 // InfoBarAndroid: | 24 // InfoBarAndroid: |
| 32 base::android::ScopedJavaLocalRef<jobject> CreateRenderInfoBar( | 25 base::android::ScopedJavaLocalRef<jobject> CreateRenderInfoBar( |
| 33 JNIEnv* env) override; | 26 JNIEnv* env) override; |
| 34 void SetJavaInfoBar( | |
| 35 const base::android::JavaRef<jobject>& java_info_bar) override; | |
| 36 | 27 |
| 37 GroupedPermissionInfoBarDelegate* GetDelegate(); | 28 GroupedPermissionInfoBarDelegate* GetDelegate(); |
| 38 | 29 |
| 39 DISALLOW_COPY_AND_ASSIGN(GroupedPermissionInfoBar); | 30 DISALLOW_COPY_AND_ASSIGN(GroupedPermissionInfoBar); |
| 40 }; | 31 }; |
| 41 | 32 |
| 42 #endif // CHROME_BROWSER_UI_ANDROID_INFOBARS_GROUPED_PERMISSION_INFOBAR_H_ | 33 #endif // CHROME_BROWSER_UI_ANDROID_INFOBARS_GROUPED_PERMISSION_INFOBAR_H_ |
| OLD | NEW |