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_PERMISSION_INFOBAR_H_ | 5 #ifndef CHROME_BROWSER_UI_ANDROID_INFOBARS_PERMISSION_INFOBAR_H_ |
6 #define CHROME_BROWSER_UI_ANDROID_INFOBARS_PERMISSION_INFOBAR_H_ | 6 #define CHROME_BROWSER_UI_ANDROID_INFOBARS_PERMISSION_INFOBAR_H_ |
7 | 7 |
8 #include "base/android/scoped_java_ref.h" | 8 #include "base/android/scoped_java_ref.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "chrome/browser/ui/android/infobars/confirm_infobar.h" | 10 #include "chrome/browser/ui/android/infobars/confirm_infobar.h" |
11 | 11 |
12 class PermissionInfobarDelegate; | 12 class PermissionInfoBarDelegate; |
13 | 13 |
14 class PermissionInfoBar : public ConfirmInfoBar { | 14 class PermissionInfoBar : public ConfirmInfoBar { |
15 public: | 15 public: |
16 explicit PermissionInfoBar( | 16 explicit PermissionInfoBar( |
17 std::unique_ptr<PermissionInfobarDelegate> delegate); | 17 std::unique_ptr<PermissionInfoBarDelegate> delegate); |
18 ~PermissionInfoBar() override; | 18 ~PermissionInfoBar() override; |
19 | 19 |
20 protected: | 20 protected: |
21 PermissionInfobarDelegate* GetDelegate(); | 21 PermissionInfoBarDelegate* GetDelegate(); |
22 | 22 |
23 // InfoBarAndroid overrides. | 23 // InfoBarAndroid overrides. |
24 base::android::ScopedJavaLocalRef<jobject> CreateRenderInfoBar( | 24 base::android::ScopedJavaLocalRef<jobject> CreateRenderInfoBar( |
25 JNIEnv* env) override; | 25 JNIEnv* env) override; |
26 | 26 |
27 private: | 27 private: |
28 void ProcessButton(int action) override; | 28 void ProcessButton(int action) override; |
29 | 29 |
30 DISALLOW_COPY_AND_ASSIGN(PermissionInfoBar); | 30 DISALLOW_COPY_AND_ASSIGN(PermissionInfoBar); |
31 }; | 31 }; |
32 | 32 |
33 #endif // CHROME_BROWSER_UI_ANDROID_INFOBARS_PERMISSION_INFOBAR_H_ | 33 #endif // CHROME_BROWSER_UI_ANDROID_INFOBARS_PERMISSION_INFOBAR_H_ |
OLD | NEW |