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 a1e4bc7bf9376a04ca8be4eacf359fa1196b61c6..2008836d32217b762c8368573ffa87f76e14fdf0 100644 |
--- a/chrome/browser/renderer_context_menu/render_view_context_menu.cc |
+++ b/chrome/browser/renderer_context_menu/render_view_context_menu.cc |
@@ -145,6 +145,10 @@ |
#include "chrome/browser/media/router/media_router_metrics.h" |
#endif |
+#if defined(OS_CHROMEOS) |
+#include "chrome/browser/renderer_context_menu/arc_app_menu_observer_chromeos.h" |
+#endif |
+ |
using base::UserMetricsAction; |
using blink::WebContextMenuData; |
using blink::WebMediaPlayerAction; |
@@ -278,9 +282,13 @@ const struct UmaEnumCommandIdPair { |
{71, -1, IDC_OPEN_LINK_IN_PROFILE_FIRST}, |
{72, -1, IDC_CONTENT_CONTEXT_GENERATEPASSWORD}, |
{73, -1, IDC_SPELLCHECK_MULTI_LINGUAL}, |
+ {74, -1, IDC_CONTENT_CONTEXT_ARC_APP1}, |
+ {75, -1, IDC_CONTENT_CONTEXT_ARC_APP2}, |
+ {76, -1, IDC_CONTENT_CONTEXT_ARC_APP3}, |
+ {77, -1, IDC_CONTENT_CONTEXT_ARC_SUB_MENU}, |
// Add new items here and use |enum_id| from the next line. |
// Also, add new items to RenderViewContextMenuItem enum in histograms.xml. |
- {74, -1, 0}, // Must be the last. Increment |enum_id| when new IDC |
+ {78, -1, 0}, // Must be the last. Increment |enum_id| when new IDC |
// was added. |
}; |
@@ -961,6 +969,8 @@ void RenderViewContextMenu::AppendLinkItems() { |
&profile_link_submenu_model_); |
} |
} |
+#else |
+ AppendArcLinkItems(); |
#endif // !defined(OS_CHROMEOS) |
menu_model_.AddSeparator(ui::NORMAL_SEPARATOR); |
menu_model_.AddItemWithStringId(IDC_CONTENT_CONTEXT_SAVELINKAS, |
@@ -981,6 +991,15 @@ void RenderViewContextMenu::AppendLinkItems() { |
} |
} |
+#if defined(OS_CHROMEOS) |
+void RenderViewContextMenu::AppendArcLinkItems() { |
+ if (!arc_app_menu_observer_.get()) |
+ arc_app_menu_observer_.reset(new ArcAppMenuObserver(this)); |
+ observers_.AddObserver(arc_app_menu_observer_.get()); |
+ arc_app_menu_observer_->InitMenu(params_); |
+} |
+#endif // defined(OS_CHROMEOS) |
+ |
void RenderViewContextMenu::AppendImageItems() { |
std::map<std::string, std::string>::const_iterator it = |
params_.properties.find(data_reduction_proxy::chrome_proxy_header()); |