Commit ac386d69 authored by Derek Cheng's avatar Derek Cheng Committed by Commit Bot

[Media Router] Only use new mirroring controls if remoting is enabled.

The new controls (which contains option to enable/disable remoting)
should not be shown if the user does not have remoting enabled.

Bug: 774245
Change-Id: I9f77f360f7af89736bb3be7efb5537dbbff4951e
Reviewed-on: https://chromium-review.googlesource.com/798357
Commit-Queue: Derek Cheng <imcheng@chromium.org>
Reviewed-by: default avatarmark a. foltz <mfoltz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#520738}
parent 5d7fc945
......@@ -26,6 +26,7 @@
#include "chrome/browser/media/router/route_message_observer.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/sessions/session_tab_helper.h"
#include "chrome/common/chrome_features.h"
#include "chrome/common/media_router/media_source_helper.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/render_frame_host.h"
......@@ -369,7 +370,11 @@ scoped_refptr<MediaRouteController> MediaRouterMojoImpl::GetRouteController(
route_controller = new HangoutsMediaRouteController(route_id, context_);
break;
case RouteControllerType::kMirroring:
route_controller = new MirroringMediaRouteController(route_id, context_);
// TODO(imcheng): Remove this check when remoting is default enabled.
route_controller =
base::FeatureList::IsEnabled(features::kMediaRemoting)
? new MirroringMediaRouteController(route_id, context_)
: new MediaRouteController(route_id, context_);
break;
}
DCHECK(route_controller);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment