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

Unified Diff: chrome/browser/ui/cocoa/location_bar/location_icon_decoration.mm

Issue 9390015: Get rid of ShowPageInfo on WebContents and WebContentsDelegate. Chrome shouldn't have to go throu... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix gtk+mac Created 8 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
Index: chrome/browser/ui/cocoa/location_bar/location_icon_decoration.mm
===================================================================
--- chrome/browser/ui/cocoa/location_bar/location_icon_decoration.mm (revision 121706)
+++ chrome/browser/ui/cocoa/location_bar/location_icon_decoration.mm (working copy)
@@ -6,6 +6,7 @@
#include "base/sys_string_conversions.h"
#import "chrome/browser/bookmarks/bookmark_pasteboard_helper_mac.h"
+#include "chrome/browser/ui/browser.h"
#import "chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h"
#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/navigation_entry.h"
@@ -16,6 +17,7 @@
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/base/l10n/l10n_util_mac.h"
+using content::NavigationController;
using content::NavigationEntry;
using content::WebContents;
@@ -99,12 +101,14 @@
return true;
WebContents* tab = owner_->GetWebContents();
- NavigationEntry* nav_entry = tab->GetController().GetActiveEntry();
+ const NavigationController& controller = tab->GetController();
+ NavigationEntry* nav_entry = controller.GetActiveEntry();
if (!nav_entry) {
NOTREACHED();
return true;
}
- tab->ShowPageInfo(nav_entry->GetURL(), nav_entry->GetSSL(), true);
+ Browser* browser = Browser::GetBrowserForController(&controller, NULL);
+ browser->ShowPageInfo(nav_entry->GetURL(), nav_entry->GetSSL(), true);
return true;
}

Powered by Google App Engine
This is Rietveld 408576698