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

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

Issue 2862583010: [Reland 1] Save pdf file instead of web page through context menu for embedded pdf file (Closed)
Patch Set: remove flaky test Created 3 years, 7 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/renderer_context_menu/render_view_context_menu_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_context_menu/render_view_context_menu.cc
diff --git a/chrome/browser/renderer_context_menu/render_view_context_menu.cc b/chrome/browser/renderer_context_menu/render_view_context_menu.cc
index eb26154d038e8095c4502287832c56336799913c..2d32b98f7bfc944159d0e608c5f0c0bb5291baf0 100644
--- a/chrome/browser/renderer_context_menu/render_view_context_menu.cc
+++ b/chrome/browser/renderer_context_menu/render_view_context_menu.cc
@@ -1171,8 +1171,11 @@ void RenderViewContextMenu::AppendMediaItems() {
void RenderViewContextMenu::AppendPluginItems() {
if (params_.page_url == params_.src_url ||
- guest_view::GuestViewBase::IsGuest(source_web_contents_)) {
- // Full page plugin, so show page menu items.
+ (guest_view::GuestViewBase::IsGuest(source_web_contents_) &&
+ (!embedder_web_contents_ || !embedder_web_contents_->IsSavable()))) {
+ // Both full page and embedded plugins are hosted as guest now,
+ // the difference is a full page plugin is not considered as savable.
+ // For full page plugin, we show page menu items.
if (params_.link_url.is_empty() && params_.selection_text.empty())
AppendPageItems();
} else {
« no previous file with comments | « no previous file | chrome/browser/renderer_context_menu/render_view_context_menu_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698