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

Unified Diff: chrome/browser/media/router/mojo/media_router_mojo_impl.h

Issue 2837363002: [Media Router] Use DialMediaSinkService in MediaRouterMojoImpl (Closed)
Patch Set: resolve code review comments from Mark 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
Index: chrome/browser/media/router/mojo/media_router_mojo_impl.h
diff --git a/chrome/browser/media/router/mojo/media_router_mojo_impl.h b/chrome/browser/media/router/mojo/media_router_mojo_impl.h
index 8f311c9a84260ca91ba3c3d2472c90688953bbed..2eab9ffd98f4d8763ee061295ef5d5e769547c67 100644
--- a/chrome/browser/media/router/mojo/media_router_mojo_impl.h
+++ b/chrome/browser/media/router/mojo/media_router_mojo_impl.h
@@ -29,6 +29,7 @@
#include "chrome/common/media_router/issue.h"
#include "chrome/common/media_router/mojo/media_router.mojom.h"
#include "chrome/common/media_router/route_request_result.h"
+#include "content/public/browser/browser_thread.h"
#include "mojo/public/cpp/bindings/binding.h"
namespace content {
@@ -43,6 +44,7 @@ class Extension;
namespace media_router {
enum class MediaRouteProviderWakeReason;
+class DialMediaSinkService;
// MediaRouter implementation that delegates calls to the component extension.
// Also handles the suspension and wakeup of the component extension.
@@ -214,8 +216,8 @@ class MediaRouterMojoImpl : public MediaRouterBase,
// Standard constructor, used by
// MediaRouterMojoImplFactory::GetApiForBrowserContext.
- explicit MediaRouterMojoImpl(
- extensions::EventPageTracker* event_page_tracker);
+ explicit MediaRouterMojoImpl(extensions::EventPageTracker* event_page_tracker,
Kevin M 2017/05/03 21:07:28 Remove "explicit" (>1 arg ctor)
zhaobin 2017/05/04 23:52:36 Done.
+ content::BrowserContext* context);
// Binds |this| to a Mojo interface request, so that clients can acquire a
// handle to a MediaRouterMojoImpl instance via the Mojo service connector.
@@ -389,6 +391,9 @@ class MediaRouterMojoImpl : public MediaRouterBase,
void OnFirewallCheckComplete(bool firewall_can_use_local_ports);
#endif
+ // Start browser side sink discovery.
+ void StartDiscovery();
+
// Requests MRPM to update media sinks. This allows MRPs that only do
// discovery on sink queries an opportunity to update discovery results
// even if the MRP SinkAvailability is marked UNAVAILABLE.
@@ -459,6 +464,11 @@ class MediaRouterMojoImpl : public MediaRouterBase,
// extension.
std::unordered_map<MediaRoute::Id, MediaRouteController*> route_controllers_;
+ // Media sink service for DIAL devices.
+ scoped_refptr<DialMediaSinkService> dial_media_sink_service_;
+
+ content::BrowserContext* context_;
+
#if defined(OS_WIN)
// A pair of flags to ensure that mDNS discovery is only enabled on Windows
// when there will be appropriate context for the user to associate a firewall

Powered by Google App Engine
This is Rietveld 408576698