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_UI_WEBSITE_SETTINGS_PERMISSION_BUBBLE_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_BUBBLE_MANAGER_H_ |
6 #define CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_BUBBLE_MANAGER_H_ | 6 #define CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_BUBBLE_MANAGER_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 content::RenderFrameHost* render_frame_host) override; | 78 content::RenderFrameHost* render_frame_host) override; |
79 | 79 |
80 // If a page on which permissions requests are pending is navigated, | 80 // If a page on which permissions requests are pending is navigated, |
81 // they will be finalized as if canceled by the user. | 81 // they will be finalized as if canceled by the user. |
82 void NavigationEntryCommitted( | 82 void NavigationEntryCommitted( |
83 const content::LoadCommittedDetails& details) override; | 83 const content::LoadCommittedDetails& details) override; |
84 void WebContentsDestroyed() override; | 84 void WebContentsDestroyed() override; |
85 | 85 |
86 // PermissionBubbleView::Delegate: | 86 // PermissionBubbleView::Delegate: |
87 void ToggleAccept(int request_index, bool new_value) override; | 87 void ToggleAccept(int request_index, bool new_value) override; |
88 void SetCustomizationMode() override; | |
89 void Accept() override; | 88 void Accept() override; |
90 void Deny() override; | 89 void Deny() override; |
91 void Closing() override; | 90 void Closing() override; |
92 | 91 |
93 // Posts a task which will allow the bubble to become visible if it is needed. | 92 // Posts a task which will allow the bubble to become visible if it is needed. |
94 void ScheduleShowBubble(); | 93 void ScheduleShowBubble(); |
95 | 94 |
96 // Shows the bubble if it is not already visible and there are pending | 95 // Shows the bubble if it is not already visible and there are pending |
97 // requests. | 96 // requests. |
98 void TriggerShowBubble(); | 97 void TriggerShowBubble(); |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 std::vector<PermissionBubbleRequest*> requests_; | 129 std::vector<PermissionBubbleRequest*> requests_; |
131 std::vector<PermissionBubbleRequest*> queued_requests_; | 130 std::vector<PermissionBubbleRequest*> queued_requests_; |
132 std::vector<PermissionBubbleRequest*> queued_frame_requests_; | 131 std::vector<PermissionBubbleRequest*> queued_frame_requests_; |
133 | 132 |
134 // URL of the main frame in the WebContents to which this manager is attached. | 133 // URL of the main frame in the WebContents to which this manager is attached. |
135 // TODO(gbillock): if there are iframes in the page, we need to deal with it. | 134 // TODO(gbillock): if there are iframes in the page, we need to deal with it. |
136 GURL request_url_; | 135 GURL request_url_; |
137 bool request_url_has_loaded_; | 136 bool request_url_has_loaded_; |
138 | 137 |
139 std::vector<bool> accept_states_; | 138 std::vector<bool> accept_states_; |
140 bool customization_mode_; | |
141 | 139 |
142 base::WeakPtrFactory<PermissionBubbleManager> weak_factory_; | 140 base::WeakPtrFactory<PermissionBubbleManager> weak_factory_; |
143 }; | 141 }; |
144 | 142 |
145 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_BUBBLE_MANAGER_H_ | 143 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_BUBBLE_MANAGER_H_ |
OLD | NEW |