| 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];
|
|
|