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

Unified Diff: chrome/browser/ui/views/location_bar/click_handler.cc

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/views/location_bar/click_handler.cc
===================================================================
--- chrome/browser/ui/views/location_bar/click_handler.cc (revision 121706)
+++ chrome/browser/ui/views/location_bar/click_handler.cc (working copy)
@@ -4,6 +4,7 @@
#include "chrome/browser/ui/views/location_bar/click_handler.h"
+#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "chrome/browser/ui/views/location_bar/location_bar_view.h"
#include "content/public/browser/navigation_controller.h"
@@ -11,6 +12,7 @@
#include "content/public/browser/web_contents.h"
#include "ui/views/view.h"
+using content::NavigationController;
using content::NavigationEntry;
using content::WebContents;
@@ -30,10 +32,13 @@
return;
WebContents* tab = location_bar_->GetTabContentsWrapper()->web_contents();
- NavigationEntry* nav_entry = tab->GetController().GetActiveEntry();
+ const NavigationController& controller = tab->GetController();
+ NavigationEntry* nav_entry = controller.GetActiveEntry();
if (!nav_entry) {
NOTREACHED();
return;
}
- tab->ShowPageInfo(nav_entry->GetURL(), nav_entry->GetSSL(), true);
+
+ Browser* browser = Browser::GetBrowserForController(&controller, NULL);
+ browser->ShowPageInfo(nav_entry->GetURL(), nav_entry->GetSSL(), true);
}

Powered by Google App Engine
This is Rietveld 408576698