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

Unified Diff: chrome/browser/ui/android/context_menu_helper.cc

Issue 2239063004: Fix an issue that "save video" context menu appears for MSE video (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix java test on marshellow tablet Created 4 years, 4 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 | « chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ContextMenuParams.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/android/context_menu_helper.cc
diff --git a/chrome/browser/ui/android/context_menu_helper.cc b/chrome/browser/ui/android/context_menu_helper.cc
index 5d6b16cbf3d9ede9441828ea22439c6c19248eef..cc0ced1a5b7c2d3bcd322dcd6fc57719a2d0d489 100644
--- a/chrome/browser/ui/android/context_menu_helper.cc
+++ b/chrome/browser/ui/android/context_menu_helper.cc
@@ -18,6 +18,7 @@
#include "content/public/common/context_menu_params.h"
#include "jni/ContextMenuHelper_jni.h"
#include "jni/ContextMenuParams_jni.h"
+#include "third_party/WebKit/public/web/WebContextMenuData.h"
#include "ui/android/window_android.h"
#include "ui/gfx/geometry/point.h"
@@ -89,7 +90,7 @@ ContextMenuHelper::CreateJavaContextMenuParams(
bool image_was_fetched_lo_fi =
it != params.properties.end() &&
it->second == data_reduction_proxy::chrome_proxy_lo_fi_directive();
-
+ bool can_save = params.media_flags & blink::WebContextMenuData::MediaCanSave;
JNIEnv* env = base::android::AttachCurrentThread();
base::android::ScopedJavaLocalRef<jobject> jmenu_info =
ContextMenuParamsAndroid::Java_ContextMenuParams_create(
@@ -103,7 +104,8 @@ ContextMenuHelper::CreateJavaContextMenuParams(
ConvertUTF16ToJavaString(env, params.title_text).obj(),
image_was_fetched_lo_fi,
ConvertUTF8ToJavaString(env, sanitizedReferrer.spec()).obj(),
- params.referrer_policy);
+ params.referrer_policy,
+ can_save);
return jmenu_info;
}
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ContextMenuParams.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698