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

Unified Diff: chrome/browser/tab_contents/render_view_context_menu.cc

Issue 10978016: Remove two functions on WebContentsDelegate which didn't belong in content. They were only called f… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: don't log history for prerender on android Created 8 years, 3 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/tab_contents/render_view_context_menu.cc
===================================================================
--- chrome/browser/tab_contents/render_view_context_menu.cc (revision 158566)
+++ chrome/browser/tab_contents/render_view_context_menu.cc (working copy)
@@ -1488,17 +1488,18 @@
}
switch (id) {
- case IDC_CONTENT_CONTEXT_OPENLINKNEWTAB:
+ case IDC_CONTENT_CONTEXT_OPENLINKNEWTAB: {
+ Browser* browser =
+ browser::FindBrowserWithWebContents(source_web_contents_);
OpenURL(
params_.link_url,
params_.frame_url.is_empty() ? params_.page_url : params_.frame_url,
params_.frame_id,
- source_web_contents_->GetDelegate() &&
- source_web_contents_->GetDelegate()->IsApplication() ?
- NEW_FOREGROUND_TAB : NEW_BACKGROUND_TAB,
+ !browser || browser->is_app() ?
+ NEW_FOREGROUND_TAB : NEW_BACKGROUND_TAB,
content::PAGE_TRANSITION_LINK);
break;
-
+ }
case IDC_CONTENT_CONTEXT_OPENLINKNEWWINDOW:
OpenURL(
params_.link_url,

Powered by Google App Engine
This is Rietveld 408576698