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

Unified Diff: chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa.mm

Issue 2684643002: Convert ContentSettingBubbleWebContentsObserverBridge to use the new navigation callbacks. (Closed)
Patch Set: Created 3 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa.mm
diff --git a/chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa.mm b/chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa.mm
index 444110b26530b3d97979bc5cb27a71346569191d..50f1885853b1b9d6740eab35638660c5eadec3fb 100644
--- a/chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa.mm
+++ b/chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa.mm
@@ -21,6 +21,7 @@
#import "chrome/browser/ui/cocoa/location_bar/content_setting_decoration.h"
#include "chrome/grit/generated_resources.h"
#include "components/content_settings/core/browser/host_content_settings_map.h"
+#include "content/public/browser/navigation_handle.h"
#include "content/public/browser/plugin_service.h"
#include "content/public/browser/web_contents_observer.h"
#include "skia/ext/skia_utils_mac.h"
@@ -187,9 +188,12 @@ class ContentSettingBubbleWebContentsObserverBridge
protected:
// WebContentsObserver:
- void DidNavigateMainFrame(
- const content::LoadCommittedDetails& details,
- const content::FrameNavigateParams& params) override {
+ void DidFinishNavigation(
+ content::NavigationHandle* navigation_handle) override {
+ if (!navigation_handle->IsInMainFrame() ||
+ !navigation_handle->HasCommitted()) {
+ return;
+ }
// Content settings are based on the main frame, so if it switches then
// close up shop.
[controller_ closeBubble:nil];
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698