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

Unified Diff: chrome/browser/renderer_context_menu/render_view_context_menu.cc

Issue 2760403003: Remove enable_media_router. (Closed)
Patch Set: . Created 3 years, 8 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/profiles/profile_impl.cc ('k') | chrome/browser/ui/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 e56a7f0d8a72fec1dcccdec53daef69924354848..0c8b59878cb0487b0f76db41d1f7a7529cb9040e 100644
--- a/chrome/browser/renderer_context_menu/render_view_context_menu.cc
+++ b/chrome/browser/renderer_context_menu/render_view_context_menu.cc
@@ -32,6 +32,9 @@
#include "chrome/browser/download/download_service.h"
#include "chrome/browser/download/download_service_factory.h"
#include "chrome/browser/download/download_stats.h"
+#include "chrome/browser/media/router/media_router_dialog_controller.h"
+#include "chrome/browser/media/router/media_router_feature.h"
+#include "chrome/browser/media/router/media_router_metrics.h"
#include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h"
#include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_factory.h"
#include "chrome/browser/password_manager/chrome_password_manager_client.h"
@@ -146,12 +149,6 @@
#endif // BUILDFLAG(ENABLE_PRINT_PREVIEW)
#endif // BUILDFLAG(ENABLE_PRINTING)
-#if defined(ENABLE_MEDIA_ROUTER)
-#include "chrome/browser/media/router/media_router_dialog_controller.h"
-#include "chrome/browser/media/router/media_router_feature.h"
-#include "chrome/browser/media/router/media_router_metrics.h"
-#endif
-
#if defined(GOOGLE_CHROME_BUILD)
#include "chrome/grit/theme_resources.h"
#include "ui/base/resource/resource_bundle.h"
@@ -1292,12 +1289,10 @@ void RenderViewContextMenu::AppendPrintItem() {
}
void RenderViewContextMenu::AppendMediaRouterItem() {
-#if defined(ENABLE_MEDIA_ROUTER)
if (media_router::MediaRouterEnabled(browser_context_)) {
menu_model_.AddItemWithStringId(IDC_ROUTE_MEDIA,
IDS_MEDIA_ROUTER_MENU_ITEM_TITLE);
}
-#endif // defined(ENABLE_MEDIA_ROUTER)
}
void RenderViewContextMenu::AppendRotationItems() {
@@ -2135,7 +2130,6 @@ bool RenderViewContextMenu::IsPrintPreviewEnabled() const {
}
bool RenderViewContextMenu::IsRouteMediaEnabled() const {
-#if defined(ENABLE_MEDIA_ROUTER)
if (!media_router::MediaRouterEnabled(browser_context_))
return false;
@@ -2155,9 +2149,6 @@ bool RenderViewContextMenu::IsRouteMediaEnabled() const {
const web_modal::WebContentsModalDialogManager* manager =
web_modal::WebContentsModalDialogManager::FromWebContents(web_contents);
return !manager || !manager->IsDialogActive();
-#else
- return false;
-#endif // defined(ENABLE_MEDIA_ROUTER)
}
bool RenderViewContextMenu::IsOpenLinkOTREnabled() const {
@@ -2425,7 +2416,6 @@ void RenderViewContextMenu::ExecPrint() {
}
void RenderViewContextMenu::ExecRouteMedia() {
-#if defined(ENABLE_MEDIA_ROUTER)
if (!media_router::MediaRouterEnabled(browser_context_))
return;
@@ -2438,7 +2428,6 @@ void RenderViewContextMenu::ExecRouteMedia() {
dialog_controller->ShowMediaRouterDialog();
media_router::MediaRouterMetrics::RecordMediaRouterDialogOrigin(
media_router::MediaRouterDialogOpenOrigin::CONTEXTUAL_MENU);
-#endif // defined(ENABLE_MEDIA_ROUTER)
}
void RenderViewContextMenu::ExecTranslate() {
« no previous file with comments | « chrome/browser/profiles/profile_impl.cc ('k') | chrome/browser/ui/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698