| 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 23 matching lines...) Expand all Loading... |
| 34 // Returns true if the infobar should display a toggle to allow users to | 34 // Returns true if the infobar should display a toggle to allow users to |
| 35 // opt-out of persisting their accept/deny decision. | 35 // opt-out of persisting their accept/deny decision. |
| 36 bool ShouldShowPersistenceToggle() const; | 36 bool ShouldShowPersistenceToggle() const; |
| 37 | 37 |
| 38 ContentSettingsType GetContentSettingType(size_t position) const; | 38 ContentSettingsType GetContentSettingType(size_t position) const; |
| 39 int GetIconIdForPermission(size_t position) const; | 39 int GetIconIdForPermission(size_t position) const; |
| 40 | 40 |
| 41 // Message text to display for an individual permission at |position|. | 41 // Message text to display for an individual permission at |position|. |
| 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|. | |
| 45 void ToggleAccept(size_t position, bool new_value); | |
| 46 | |
| 47 // ConfirmInfoBarDelegate: | 44 // ConfirmInfoBarDelegate: |
| 48 base::string16 GetMessageText() const override; | 45 base::string16 GetMessageText() const override; |
| 49 bool Accept() override; | 46 bool Accept() override; |
| 50 bool Cancel() override; | 47 bool Cancel() override; |
| 51 void InfoBarDismissed() override; | 48 void InfoBarDismissed() override; |
| 52 | 49 |
| 53 protected: | 50 protected: |
| 54 bool GetAcceptState(size_t position); | 51 bool GetAcceptState(size_t position); |
| 55 | 52 |
| 56 private: | 53 private: |
| (...skipping 11 matching lines...) Expand all Loading... |
| 68 | 65 |
| 69 const GURL requesting_origin_; | 66 const GURL requesting_origin_; |
| 70 // Whether the accept/deny decision is persisted. | 67 // Whether the accept/deny decision is persisted. |
| 71 bool persist_; | 68 bool persist_; |
| 72 PermissionPromptAndroid* permission_prompt_; | 69 PermissionPromptAndroid* permission_prompt_; |
| 73 | 70 |
| 74 DISALLOW_COPY_AND_ASSIGN(GroupedPermissionInfoBarDelegate); | 71 DISALLOW_COPY_AND_ASSIGN(GroupedPermissionInfoBarDelegate); |
| 75 }; | 72 }; |
| 76 | 73 |
| 77 #endif // CHROME_BROWSER_PERMISSIONS_GROUPED_PERMISSION_INFOBAR_DELEGATE_ANDROI
D_H_ | 74 #endif // CHROME_BROWSER_PERMISSIONS_GROUPED_PERMISSION_INFOBAR_DELEGATE_ANDROI
D_H_ |
| OLD | NEW |