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

Unified Diff: chrome/browser/ui/browser_command_controller.cc

Issue 1360323002: Add "Cast..." to overflow and contextual menus. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 5 years, 3 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/browser/ui/browser_command_controller.h ('k') | chrome/browser/ui/browser_commands.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser_command_controller.cc
diff --git a/chrome/browser/ui/browser_command_controller.cc b/chrome/browser/ui/browser_command_controller.cc
index 1de24d7bea1fa350677e3c66a3f9f033589c1f01..395cdc99b9e8ad502eac04addf8e0fe721dfd44c 100644
--- a/chrome/browser/ui/browser_command_controller.cc
+++ b/chrome/browser/ui/browser_command_controller.cc
@@ -778,6 +778,9 @@ void BrowserCommandController::ExecuteCommandWithDisposition(
ash::accelerators::ToggleTouchHudProjection();
break;
#endif
+ case IDC_ROUTE_MEDIA:
+ RouteMedia(browser_);
+ break;
default:
LOG(WARNING) << "Received Unimplemented Command: " << id;
@@ -821,6 +824,7 @@ void BrowserCommandController::TabBlockedStateChanged(
PrintingStateChanged();
FullscreenStateChanged();
UpdateCommandsForFind();
+ UpdateCommandsForMediaRouter();
}
////////////////////////////////////////////////////////////////////////////////
@@ -1137,6 +1141,7 @@ void BrowserCommandController::UpdateCommandsForTabState() {
UpdateCommandsForContentRestrictionState();
UpdateCommandsForBookmarkEditing();
UpdateCommandsForFind();
+ UpdateCommandsForMediaRouter();
// Update the zoom commands when an active tab is selected.
UpdateCommandsForZoomState();
}
@@ -1343,6 +1348,11 @@ void BrowserCommandController::UpdateCommandsForFind() {
command_updater_.UpdateCommandEnabled(IDC_FIND_PREVIOUS, enabled);
}
+void BrowserCommandController::UpdateCommandsForMediaRouter() {
+ command_updater_.UpdateCommandEnabled(IDC_ROUTE_MEDIA,
+ CanRouteMedia(browser_));
+}
+
void BrowserCommandController::AddInterstitialObservers(WebContents* contents) {
interstitial_observers_.push_back(new InterstitialObserver(this, contents));
}
« no previous file with comments | « chrome/browser/ui/browser_command_controller.h ('k') | chrome/browser/ui/browser_commands.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698