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

Unified Diff: chrome/browser/tab_contents/render_view_context_menu.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
« no previous file with comments | « no previous file | chrome/browser/ui/browser.h » ('j') | chrome/browser/ui/gtk/location_bar_view_gtk.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/tab_contents/render_view_context_menu.cc
===================================================================
--- chrome/browser/tab_contents/render_view_context_menu.cc (revision 121706)
+++ chrome/browser/tab_contents/render_view_context_menu.cc (working copy)
@@ -90,6 +90,7 @@
using content::ChildProcessSecurityPolicy;
using content::DownloadManager;
+using content::NavigationController;
using content::NavigationEntry;
using content::OpenURLParams;
using content::SSLStatus;
@@ -1678,10 +1679,10 @@
break;
case IDC_CONTENT_CONTEXT_VIEWPAGEINFO: {
- NavigationEntry* nav_entry =
- source_web_contents_->GetController().GetActiveEntry();
- source_web_contents_->ShowPageInfo(nav_entry->GetURL(),
- nav_entry->GetSSL(), true);
+ NavigationController* controller = &source_web_contents_->GetController();
+ NavigationEntry* nav_entry = controller->GetActiveEntry();
+ Browser* browser = Browser::GetBrowserForController(controller, NULL);
+ browser->ShowPageInfo(nav_entry->GetURL(), nav_entry->GetSSL(), true);
break;
}
@@ -1721,9 +1722,9 @@
break;
case IDC_CONTENT_CONTEXT_VIEWFRAMEINFO: {
- source_web_contents_->ShowPageInfo(params_.frame_url,
- params_.security_info,
- false); // Don't show the history.
+ Browser* browser = Browser::GetBrowserForController(
+ &source_web_contents_->GetController(), NULL);
+ browser->ShowPageInfo(params_.frame_url, params_.security_info, false);
break;
}
« no previous file with comments | « no previous file | chrome/browser/ui/browser.h » ('j') | chrome/browser/ui/gtk/location_bar_view_gtk.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698