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 #include "chrome/browser/ui/android/infobars/grouped_permission_infobar.h" | 5 #include "chrome/browser/ui/android/infobars/grouped_permission_infobar.h" |
6 | 6 |
7 #include "base/android/jni_android.h" | 7 #include "base/android/jni_android.h" |
8 #include "base/android/jni_array.h" | 8 #include "base/android/jni_array.h" |
9 #include "base/android/jni_string.h" | 9 #include "base/android/jni_string.h" |
10 #include "chrome/browser/android/resource_mapper.h" | 10 #include "chrome/browser/android/resource_mapper.h" |
11 #include "chrome/browser/permissions/grouped_permission_infobar_delegate.h" | 11 #include "chrome/browser/permissions/grouped_permission_infobar_delegate.h" |
12 #include "jni/GroupedPermissionInfoBar_jni.h" | 12 #include "jni/GroupedPermissionInfoBar_jni.h" |
13 | 13 |
14 GroupedPermissionInfoBar::GroupedPermissionInfoBar( | 14 GroupedPermissionInfoBar::GroupedPermissionInfoBar( |
15 std::unique_ptr<GroupedPermissionInfoBarDelegate> delegate) | 15 std::unique_ptr<GroupedPermissionInfoBarDelegate> delegate) |
16 : ConfirmInfoBar(std::move(delegate)) {} | 16 : PermissionInfoBar(std::move(delegate)) {} |
17 | 17 |
18 GroupedPermissionInfoBar::~GroupedPermissionInfoBar() { | 18 GroupedPermissionInfoBar::~GroupedPermissionInfoBar() { |
19 } | 19 } |
20 | 20 |
21 bool GroupedPermissionInfoBar::Register(JNIEnv* env) { | 21 bool GroupedPermissionInfoBar::Register(JNIEnv* env) { |
22 return RegisterNativesImpl(env); | 22 return RegisterNativesImpl(env); |
23 } | 23 } |
24 | 24 |
25 void GroupedPermissionInfoBar::SetPermissionState( | 25 void GroupedPermissionInfoBar::SetPermissionState( |
26 JNIEnv* env, | 26 JNIEnv* env, |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 return static_cast<GroupedPermissionInfoBarDelegate*>(delegate()); | 79 return static_cast<GroupedPermissionInfoBarDelegate*>(delegate()); |
80 } | 80 } |
81 | 81 |
82 std::unique_ptr<infobars::InfoBar> | 82 std::unique_ptr<infobars::InfoBar> |
83 GroupedPermissionInfoBarDelegate::CreateInfoBar( | 83 GroupedPermissionInfoBarDelegate::CreateInfoBar( |
84 infobars::InfoBarManager* infobar_manager, | 84 infobars::InfoBarManager* infobar_manager, |
85 std::unique_ptr<GroupedPermissionInfoBarDelegate> delegate) { | 85 std::unique_ptr<GroupedPermissionInfoBarDelegate> delegate) { |
86 return std::unique_ptr<infobars::InfoBar>( | 86 return std::unique_ptr<infobars::InfoBar>( |
87 new GroupedPermissionInfoBar(std::move(delegate))); | 87 new GroupedPermissionInfoBar(std::move(delegate))); |
88 } | 88 } |
OLD | NEW |