Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(758)

Unified Diff: chrome/browser/ui/website_settings/permission_bubble_manager.h

Issue 292453009: Handles iframe permissions requests separately, in a subsequent bubble. (Closed) Base URL: https://chromium.googlesource.com/chromium/src
Patch Set: fixed duplicate logic Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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.

Powered by Google App Engine
This is Rietveld 408576698