Index: components/renderer_context_menu/views/toolkit_delegate_views.cc |
diff --git a/components/renderer_context_menu/views/toolkit_delegate_views.cc b/components/renderer_context_menu/views/toolkit_delegate_views.cc |
index 8dcaaf9267ff30804229854a88bbdbfb7ccb418b..830c7c5206a8ff5d3d562d15a791c7233a3a5017 100644 |
--- a/components/renderer_context_menu/views/toolkit_delegate_views.cc |
+++ b/components/renderer_context_menu/views/toolkit_delegate_views.cc |
@@ -5,6 +5,7 @@ |
#include "components/renderer_context_menu/views/toolkit_delegate_views.h" |
#include "ui/gfx/geometry/rect.h" |
+#include "ui/gfx/image/image.h" |
#include "ui/views/controls/menu/menu_item_view.h" |
#include "ui/views/controls/menu/menu_model_adapter.h" |
#include "ui/views/controls/menu/menu_runner.h" |
@@ -57,3 +58,9 @@ void ToolkitDelegateViews::UpdateMenuItem(int command_id, |
parent->ChildrenChanged(); |
} |
+void ToolkitDelegateViews::SetIcon(int command_id, const gfx::ImageSkia& icon) { |
+ views::MenuItemView* item = menu_view_->GetMenuItemByID(command_id); |
+ if (!item) |
+ return; |
+ item->SetIcon(icon); |
+} |