Index: chrome/browser/ui/website_settings/permission_bubble_manager.h |
diff --git a/chrome/browser/ui/website_settings/permission_bubble_manager.h b/chrome/browser/ui/website_settings/permission_bubble_manager.h |
index 2e0eafc82426f6d748ba0792e3f1416b65c8f7f3..72c7f1c421a33c12ca5e6a3029dfbce54f92e686 100644 |
--- a/chrome/browser/ui/website_settings/permission_bubble_manager.h |
+++ b/chrome/browser/ui/website_settings/permission_bubble_manager.h |
@@ -65,10 +65,10 @@ class PermissionBubbleManager |
explicit PermissionBubbleManager(content::WebContents* web_contents); |
// WebContentsObserver: |
- |
- // TODO(leng): Finalize policy for permission requests with iFrames. |
- // DocumentLoadedInFrame() might be needed as well. |
virtual void DocumentOnLoadCompletedInMainFrame() OVERRIDE; |
+ virtual void DocumentLoadedInFrame( |
+ int64 frame_id, |
+ content::RenderViewHost* render_view_host) OVERRIDE; |
// If a page on which permissions requests are pending is navigated, |
// they will be finalized as if canceled by the user. |
@@ -83,7 +83,12 @@ class PermissionBubbleManager |
virtual void Deny() OVERRIDE; |
virtual void Closing() OVERRIDE; |
- void ShowBubble(); |
+ // Posts a task which will allow the bubble to become visible if it is needed. |
+ void ScheduleShowBubble(); |
+ |
+ // Shows the bubble if it is not already visible and there are pending |
+ // requests. |
+ void TriggerShowBubble(); |
// Finalize the pending permissions request. |
void FinalizeBubble(); |
@@ -93,6 +98,13 @@ class PermissionBubbleManager |
// from the requesting page. |
void CancelPendingQueue(); |
+ // Returns whether or not |request| has already been added to |queue|. |
+ // If |exact_duplicate| is non-null, it will be set to true if |request| |
+ // is the same object as an existing request in |queue|. |
+ bool ExistingRequest(PermissionBubbleRequest* request, |
+ const std::vector<PermissionBubbleRequest*>& queue, |
+ bool* exact_dupcliate); |
Greg Billock
2014/05/21 17:09:19
sp
leng
2014/05/22 00:08:47
Done.
|
+ |
// Whether or not we are showing the bubble in this tab. |
bool bubble_showing_; |
@@ -101,6 +113,7 @@ class PermissionBubbleManager |
std::vector<PermissionBubbleRequest*> requests_; |
std::vector<PermissionBubbleRequest*> queued_requests_; |
+ std::vector<PermissionBubbleRequest*> queued_frame_requests_; |
// URL of the main frame in the WebContents to which this manager is attached. |
// TODO(gbillock): if there are iframes in the page, we need to deal with it. |