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

Unified Diff: chrome/browser/ui/toolbar/media_router_contextual_menu.cc

Issue 2104463002: [Media Router] Add a context menu item to access the chrome://cast page (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed review comments. Explicitly whitelisted the new menu item to Windows, OSX and ChromeOS. Created 4 years, 6 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/app/media_router_strings.grdp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/toolbar/media_router_contextual_menu.cc
diff --git a/chrome/browser/ui/toolbar/media_router_contextual_menu.cc b/chrome/browser/ui/toolbar/media_router_contextual_menu.cc
index d0990e20b8568b7028064e75d5a44c9abf2a2855..ead82edcf45e724553568c7bc34979b0f1a15405 100644
--- a/chrome/browser/ui/toolbar/media_router_contextual_menu.cc
+++ b/chrome/browser/ui/toolbar/media_router_contextual_menu.cc
@@ -14,6 +14,7 @@
#include "chrome/browser/ui/toolbar/component_toolbar_actions_factory.h"
#include "chrome/browser/ui/toolbar/media_router_contextual_menu.h"
#include "chrome/browser/ui/toolbar/toolbar_actions_model.h"
+#include "chrome/common/url_constants.h"
#include "chrome/grit/chromium_strings.h"
#include "chrome/grit/generated_resources.h"
#include "extensions/common/constants.h"
@@ -42,6 +43,10 @@ MediaRouterContextualMenu::MediaRouterContextualMenu(Browser* browser)
menu_model_.AddItemWithStringId(IDC_MEDIA_ROUTER_REMOVE_TOOLBAR_ACTION,
IDS_EXTENSIONS_UNINSTALL);
menu_model_.AddSeparator(ui::NORMAL_SEPARATOR);
+#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_CHROMEOS)
msw 2016/06/27 20:51:37 q: Is this not supported on Linux desktop?
sheretov 2016/06/27 21:16:59 Correct: not supported on Linux. https://cs.chrom
+ menu_model_.AddItemWithStringId(IDC_MEDIA_ROUTER_MANAGE_DEVICES,
+ IDS_MEDIA_ROUTER_MANAGE_DEVICES);
+#endif
#if defined(GOOGLE_CHROME_BUILD)
menu_model_.AddCheckItemWithStringId(IDC_MEDIA_ROUTER_CLOUD_SERVICES_TOGGLE,
IDS_MEDIA_ROUTER_CLOUD_SERVICES_TOGGLE);
@@ -126,6 +131,11 @@ void MediaRouterContextualMenu::ExecuteCommand(int command_id,
case IDC_MEDIA_ROUTER_LEARN_MORE:
chrome::ShowSingletonTab(browser_, GURL(kCastLearnMorePageUrl));
break;
+#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_CHROMEOS)
+ case IDC_MEDIA_ROUTER_MANAGE_DEVICES:
+ chrome::ShowSingletonTab(browser_, GURL(chrome::kChromeUICastURL));
+ break;
+#endif
case IDC_MEDIA_ROUTER_REMOVE_TOOLBAR_ACTION:
RemoveMediaRouterComponentAction();
break;
« no previous file with comments | « chrome/app/media_router_strings.grdp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698