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 7d7207c41db64c03a951433bbebdc06d793eac99..732aa8c6db5d3a0a35208d8cc0c8e878caeb0bdb 100644 |
--- a/chrome/browser/renderer_context_menu/render_view_context_menu.cc |
+++ b/chrome/browser/renderer_context_menu/render_view_context_menu.cc |
@@ -1370,9 +1370,13 @@ bool RenderViewContextMenu::IsCommandIdEnabled(int id) const { |
return !!(params_.edit_flags & WebContextMenuData::CanCopy); |
case IDC_CONTENT_CONTEXT_PASTE: |
- case IDC_CONTENT_CONTEXT_PASTE_AND_MATCH_STYLE: |
- return !!(params_.edit_flags & WebContextMenuData::CanPaste); |
- |
+ case IDC_CONTENT_CONTEXT_PASTE_AND_MATCH_STYLE: { |
+ std::vector<base::string16> types; |
+ bool ignore; |
+ ui::Clipboard::GetForCurrentThread()->ReadAvailableTypes( |
darin (slow to review)
2014/08/06 16:31:33
This is potentially an expensive call, right? Shou
|
+ ui::CLIPBOARD_TYPE_COPY_PASTE, &types, &ignore); |
+ return !types.empty(); |
+ } |
case IDC_CONTENT_CONTEXT_DELETE: |
return !!(params_.edit_flags & WebContextMenuData::CanDelete); |