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

Unified Diff: content/renderer/context_menu_params_builder.cc

Issue 1105263004: "Load image" context menu item to reload a LoFi image. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: try again Created 5 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 | « content/public/renderer/content_renderer_client.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/context_menu_params_builder.cc
diff --git a/content/renderer/context_menu_params_builder.cc b/content/renderer/context_menu_params_builder.cc
index 63dcd4d1e7b6b3c5b903b9dac8906f4e88882da2..601d8400fa247bb6f05483ad2c86e58ec30eb310 100644
--- a/content/renderer/context_menu_params_builder.cc
+++ b/content/renderer/context_menu_params_builder.cc
@@ -7,6 +7,7 @@
#include "base/logging.h"
#include "content/common/ssl_status_serialization.h"
#include "content/public/common/context_menu_params.h"
+#include "content/public/renderer/content_renderer_client.h"
#include "content/renderer/dom_utils.h"
#include "content/renderer/history_serialization.h"
#include "content/renderer/menu_item_builder.h"
@@ -43,6 +44,11 @@ ContextMenuParams ContextMenuParamsBuilder::Build(
params.referrer_policy = data.referrerPolicy;
params.suggested_filename = data.suggestedFilename;
+ if (!data.imageResponse.isNull()) {
+ GetContentClient()->renderer()->AddImageContextMenuProperties(
+ data.imageResponse, &params.properties);
+ }
+
for (size_t i = 0; i < data.dictionarySuggestions.size(); ++i)
params.dictionary_suggestions.push_back(data.dictionarySuggestions[i]);
« no previous file with comments | « content/public/renderer/content_renderer_client.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698