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_PERMISSIONS_GROUPED_PERMISSION_INFOBAR_DELEGATE_ANDROID_H
_ | 5 #ifndef CHROME_BROWSER_PERMISSIONS_GROUPED_PERMISSION_INFOBAR_DELEGATE_ANDROID_H
_ |
6 #define CHROME_BROWSER_PERMISSIONS_GROUPED_PERMISSION_INFOBAR_DELEGATE_ANDROID_H
_ | 6 #define CHROME_BROWSER_PERMISSIONS_GROUPED_PERMISSION_INFOBAR_DELEGATE_ANDROID_H
_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 | 43 |
44 // Toggle accept value for an individual permission at |position|. | 44 // Toggle accept value for an individual permission at |position|. |
45 void ToggleAccept(size_t position, bool new_value); | 45 void ToggleAccept(size_t position, bool new_value); |
46 | 46 |
47 // ConfirmInfoBarDelegate: | 47 // ConfirmInfoBarDelegate: |
48 base::string16 GetMessageText() const override; | 48 base::string16 GetMessageText() const override; |
49 bool Accept() override; | 49 bool Accept() override; |
50 bool Cancel() override; | 50 bool Cancel() override; |
51 void InfoBarDismissed() override; | 51 void InfoBarDismissed() override; |
52 | 52 |
53 void PermissionPromptDestroyed(); | |
54 | |
55 protected: | 53 protected: |
56 bool GetAcceptState(size_t position); | 54 bool GetAcceptState(size_t position); |
57 | 55 |
58 private: | 56 private: |
59 GroupedPermissionInfoBarDelegate(PermissionPromptAndroid* permission_prompt, | 57 GroupedPermissionInfoBarDelegate(PermissionPromptAndroid* permission_prompt, |
60 const GURL& requesting_origin); | 58 const GURL& requesting_origin); |
61 | 59 |
62 // ConfirmInfoBarDelegate: | 60 // ConfirmInfoBarDelegate: |
63 InfoBarIdentifier GetIdentifier() const override; | 61 InfoBarIdentifier GetIdentifier() const override; |
64 Type GetInfoBarType() const override; | 62 Type GetInfoBarType() const override; |
65 int GetButtons() const override; | 63 int GetButtons() const override; |
66 base::string16 GetButtonLabel(InfoBarButton button) const override; | 64 base::string16 GetButtonLabel(InfoBarButton button) const override; |
67 | 65 |
| 66 // InfoBarDelegate: |
| 67 bool EqualsDelegate(infobars::InfoBarDelegate* delegate) const override; |
| 68 |
68 const GURL requesting_origin_; | 69 const GURL requesting_origin_; |
69 // Whether the accept/deny decision is persisted. | 70 // Whether the accept/deny decision is persisted. |
70 bool persist_; | 71 bool persist_; |
71 PermissionPromptAndroid* permission_prompt_; | 72 PermissionPromptAndroid* permission_prompt_; |
72 | 73 |
73 DISALLOW_COPY_AND_ASSIGN(GroupedPermissionInfoBarDelegate); | 74 DISALLOW_COPY_AND_ASSIGN(GroupedPermissionInfoBarDelegate); |
74 }; | 75 }; |
75 | 76 |
76 #endif // CHROME_BROWSER_PERMISSIONS_GROUPED_PERMISSION_INFOBAR_DELEGATE_ANDROI
D_H_ | 77 #endif // CHROME_BROWSER_PERMISSIONS_GROUPED_PERMISSION_INFOBAR_DELEGATE_ANDROI
D_H_ |
OLD | NEW |