| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 base::string16 GetMessageTextFragment(size_t position) const; | 42 base::string16 GetMessageTextFragment(size_t position) const; |
| 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 base::string16 GetLinkText() const override; |
| 52 | 53 |
| 53 protected: | 54 protected: |
| 54 bool GetAcceptState(size_t position); | 55 bool GetAcceptState(size_t position); |
| 55 | 56 |
| 56 private: | 57 private: |
| 57 GroupedPermissionInfoBarDelegate(PermissionPromptAndroid* permission_prompt, | 58 GroupedPermissionInfoBarDelegate(PermissionPromptAndroid* permission_prompt, |
| 58 const GURL& requesting_origin); | 59 const GURL& requesting_origin); |
| 59 | 60 |
| 60 // ConfirmInfoBarDelegate: | 61 // ConfirmInfoBarDelegate: |
| 61 InfoBarIdentifier GetIdentifier() const override; | 62 InfoBarIdentifier GetIdentifier() const override; |
| 62 Type GetInfoBarType() const override; | 63 Type GetInfoBarType() const override; |
| 63 int GetButtons() const override; | 64 int GetButtons() const override; |
| 64 base::string16 GetButtonLabel(InfoBarButton button) const override; | 65 base::string16 GetButtonLabel(InfoBarButton button) const override; |
| 66 GURL GetLinkURL() const override; |
| 65 | 67 |
| 66 // InfoBarDelegate: | 68 // InfoBarDelegate: |
| 67 bool EqualsDelegate(infobars::InfoBarDelegate* delegate) const override; | 69 bool EqualsDelegate(infobars::InfoBarDelegate* delegate) const override; |
| 68 | 70 |
| 69 const GURL requesting_origin_; | 71 const GURL requesting_origin_; |
| 70 // Whether the accept/deny decision is persisted. | 72 // Whether the accept/deny decision is persisted. |
| 71 bool persist_; | 73 bool persist_; |
| 72 PermissionPromptAndroid* permission_prompt_; | 74 PermissionPromptAndroid* permission_prompt_; |
| 73 | 75 |
| 74 DISALLOW_COPY_AND_ASSIGN(GroupedPermissionInfoBarDelegate); | 76 DISALLOW_COPY_AND_ASSIGN(GroupedPermissionInfoBarDelegate); |
| 75 }; | 77 }; |
| 76 | 78 |
| 77 #endif // CHROME_BROWSER_PERMISSIONS_GROUPED_PERMISSION_INFOBAR_DELEGATE_ANDROI
D_H_ | 79 #endif // CHROME_BROWSER_PERMISSIONS_GROUPED_PERMISSION_INFOBAR_DELEGATE_ANDROI
D_H_ |
| OLD | NEW |