| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_PERMISSION_INFOBAR_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_PERMISSIONS_PERMISSION_INFOBAR_DELEGATE_H_ |
| 6 #define CHROME_BROWSER_PERMISSIONS_PERMISSION_INFOBAR_DELEGATE_H_ | 6 #define CHROME_BROWSER_PERMISSIONS_PERMISSION_INFOBAR_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 const PermissionSetCallback& callback); | 48 const PermissionSetCallback& callback); |
| 49 | 49 |
| 50 static std::unique_ptr<PermissionInfoBarDelegate> CreateDelegate( | 50 static std::unique_ptr<PermissionInfoBarDelegate> CreateDelegate( |
| 51 content::PermissionType type, | 51 content::PermissionType type, |
| 52 const GURL& requesting_frame, | 52 const GURL& requesting_frame, |
| 53 bool user_gesture, | 53 bool user_gesture, |
| 54 Profile* profile, | 54 Profile* profile, |
| 55 const PermissionSetCallback& callback); | 55 const PermissionSetCallback& callback); |
| 56 | 56 |
| 57 ~PermissionInfoBarDelegate() override; | 57 ~PermissionInfoBarDelegate() override; |
| 58 virtual std::vector<int> content_settings() const; | 58 virtual std::vector<int> content_settings_types() const; |
| 59 | 59 |
| 60 // Returns true if the infobar should display a toggle to allow users to | 60 // Returns true if the infobar should display a toggle to allow users to |
| 61 // opt-out of persisting their accept/deny decision. | 61 // opt-out of persisting their accept/deny decision. |
| 62 bool ShouldShowPersistenceToggle() const; | 62 bool ShouldShowPersistenceToggle() const; |
| 63 | 63 |
| 64 // Sets whether or not a decided permission should be persisted to content | 64 // Sets whether or not a decided permission should be persisted to content |
| 65 // settings. | 65 // settings. |
| 66 void set_persist(bool persist) { persist_ = persist; } | 66 void set_persist(bool persist) { persist_ = persist; } |
| 67 bool persist() const { return persist_; } | 67 bool persist() const { return persist_; } |
| 68 | 68 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 bool persist_; | 101 bool persist_; |
| 102 | 102 |
| 103 DISALLOW_COPY_AND_ASSIGN(PermissionInfoBarDelegate); | 103 DISALLOW_COPY_AND_ASSIGN(PermissionInfoBarDelegate); |
| 104 }; | 104 }; |
| 105 | 105 |
| 106 // Implemented in platform-specific code. | 106 // Implemented in platform-specific code. |
| 107 std::unique_ptr<infobars::InfoBar> CreatePermissionInfoBar( | 107 std::unique_ptr<infobars::InfoBar> CreatePermissionInfoBar( |
| 108 std::unique_ptr<PermissionInfoBarDelegate> delegate); | 108 std::unique_ptr<PermissionInfoBarDelegate> delegate); |
| 109 | 109 |
| 110 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_INFOBAR_DELEGATE_H_ | 110 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_INFOBAR_DELEGATE_H_ |
| OLD | NEW |