Chromium Code Reviews| 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 30 matching lines...) Expand all Loading... | |
| 41 | 41 |
| 42 // Message text to display for an individual permission at |position|. | 42 // Message text to display for an individual permission at |position|. |
| 43 base::string16 GetMessageTextFragment(size_t position) const; | 43 base::string16 GetMessageTextFragment(size_t position) const; |
| 44 | 44 |
| 45 // Toggle accept value for an individual permission at |position|. | 45 // Toggle accept value for an individual permission at |position|. |
| 46 void ToggleAccept(size_t position, bool new_value); | 46 void ToggleAccept(size_t position, bool new_value); |
| 47 | 47 |
| 48 // ConfirmInfoBarDelegate: | 48 // ConfirmInfoBarDelegate: |
| 49 base::string16 GetMessageText() const override; | 49 base::string16 GetMessageText() const override; |
| 50 | 50 |
| 51 bool Accept() override; | |
| 52 bool Cancel() override; | |
|
raymes
2016/10/19 00:25:41
Is it worth leaving these out until the CL when th
lshang
2016/10/20 05:03:09
Done.
| |
| 53 | |
| 51 protected: | 54 protected: |
| 52 bool GetAcceptState(size_t position); | 55 bool GetAcceptState(size_t position); |
| 53 | 56 |
| 54 private: | 57 private: |
| 55 GroupedPermissionInfoBarDelegate( | 58 GroupedPermissionInfoBarDelegate( |
| 56 const GURL& requesting_origin, | 59 const GURL& requesting_origin, |
| 57 const std::vector<PermissionRequest*>& requests); | 60 const std::vector<PermissionRequest*>& requests); |
| 58 | 61 |
| 59 // ConfirmInfoBarDelegate: | 62 // ConfirmInfoBarDelegate: |
| 60 InfoBarIdentifier GetIdentifier() const override; | 63 InfoBarIdentifier GetIdentifier() const override; |
| 61 Type GetInfoBarType() const override; | 64 Type GetInfoBarType() const override; |
| 62 int GetButtons() const override; | 65 int GetButtons() const override; |
| 63 base::string16 GetButtonLabel(InfoBarButton button) const override; | 66 base::string16 GetButtonLabel(InfoBarButton button) const override; |
| 64 | 67 |
| 65 const GURL requesting_origin_; | 68 const GURL requesting_origin_; |
| 66 const std::vector<PermissionRequest*> requests_; | 69 const std::vector<PermissionRequest*> requests_; |
| 67 std::vector<bool> accept_states_; | 70 std::vector<bool> accept_states_; |
| 68 // Whether the accept/deny decision is persisted. | 71 // Whether the accept/deny decision is persisted. |
| 69 bool persist_; | 72 bool persist_; |
| 70 | 73 |
| 71 DISALLOW_COPY_AND_ASSIGN(GroupedPermissionInfoBarDelegate); | 74 DISALLOW_COPY_AND_ASSIGN(GroupedPermissionInfoBarDelegate); |
| 72 }; | 75 }; |
| 73 | 76 |
| 74 #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 |