| 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 // Message text to display for an individual permission at |position|. | 44 // Message text to display for an individual permission at |position|. |
| 45 base::string16 GetMessageTextFragment(size_t position) const; | 45 base::string16 GetMessageTextFragment(size_t position) const; |
| 46 | 46 |
| 47 // Toggle accept value for an individual permission at |position|. | 47 // Toggle accept value for an individual permission at |position|. |
| 48 void ToggleAccept(size_t position, bool new_value); | 48 void ToggleAccept(size_t position, bool new_value); |
| 49 | 49 |
| 50 // ConfirmInfoBarDelegate: | 50 // ConfirmInfoBarDelegate: |
| 51 base::string16 GetMessageText() const override; | 51 base::string16 GetMessageText() const override; |
| 52 bool Accept() override; | 52 bool Accept() override; |
| 53 bool Cancel() override; | 53 bool Cancel() override; |
| 54 void InfoBarDismissed() override; |
| 54 | 55 |
| 55 void PermissionPromptDestroyed(); | 56 void PermissionPromptDestroyed(); |
| 56 | 57 |
| 57 protected: | 58 protected: |
| 58 bool GetAcceptState(size_t position); | 59 bool GetAcceptState(size_t position); |
| 59 | 60 |
| 60 private: | 61 private: |
| 61 GroupedPermissionInfoBarDelegate( | 62 GroupedPermissionInfoBarDelegate( |
| 62 PermissionPromptAndroid* permission_prompt, | 63 PermissionPromptAndroid* permission_prompt, |
| 63 const GURL& requesting_origin, | 64 const GURL& requesting_origin, |
| 64 const std::vector<PermissionRequest*>& requests); | 65 const std::vector<PermissionRequest*>& requests); |
| 65 | 66 |
| 66 // ConfirmInfoBarDelegate: | 67 // ConfirmInfoBarDelegate: |
| 67 InfoBarIdentifier GetIdentifier() const override; | 68 InfoBarIdentifier GetIdentifier() const override; |
| 68 Type GetInfoBarType() const override; | 69 Type GetInfoBarType() const override; |
| 69 int GetButtons() const override; | 70 int GetButtons() const override; |
| 70 base::string16 GetButtonLabel(InfoBarButton button) const override; | 71 base::string16 GetButtonLabel(InfoBarButton button) const override; |
| 71 | 72 |
| 72 const GURL requesting_origin_; | 73 const GURL requesting_origin_; |
| 73 const std::vector<PermissionRequest*> requests_; | 74 const std::vector<PermissionRequest*> requests_; |
| 74 // Whether the accept/deny decision is persisted. | 75 // Whether the accept/deny decision is persisted. |
| 75 bool persist_; | 76 bool persist_; |
| 76 PermissionPromptAndroid* permission_prompt_; | 77 PermissionPromptAndroid* permission_prompt_; |
| 77 | 78 |
| 78 DISALLOW_COPY_AND_ASSIGN(GroupedPermissionInfoBarDelegate); | 79 DISALLOW_COPY_AND_ASSIGN(GroupedPermissionInfoBarDelegate); |
| 79 }; | 80 }; |
| 80 | 81 |
| 81 #endif // CHROME_BROWSER_PERMISSIONS_GROUPED_PERMISSION_INFOBAR_DELEGATE_ANDROI
D_H_ | 82 #endif // CHROME_BROWSER_PERMISSIONS_GROUPED_PERMISSION_INFOBAR_DELEGATE_ANDROI
D_H_ |
| OLD | NEW |