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

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

Issue 2724513002: (Not for review) Dummy C++ side Custom Controls implementation (Closed)
Patch Set: . Created 3 years, 10 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 73d7187e6f62bfb30c800eb0ea41bf29b462bd12..44754cf615b4ecab38c5559dafb0277b350ebc2e 100644
--- a/chrome/browser/media/router/mojo/media_router_mojo_impl.h
+++ b/chrome/browser/media/router/mojo/media_router_mojo_impl.h
@@ -108,6 +108,12 @@ class MediaRouterMojoImpl : public MediaRouterBase,
const std::string& search_input,
const std::string& domain,
const MediaSinkSearchResponseCallback& sink_callback) override;
+ MediaRouteController* GetControllerForRoute(
+ const MediaRoute::Id& route_id) override;
+
+ bool GetMediaRouteController(const MediaRoute::Id& route_id,
+ mojom::MediaControllerRequest controller);
+ void DestroyMediaRouteController(const MediaRoute::Id& route_id);
const std::string& media_route_provider_extension_id() const {
return media_route_provider_extension_id_;
@@ -365,6 +371,11 @@ class MediaRouterMojoImpl : public MediaRouterBase,
void UpdateMediaSinks(const MediaSource::Id& source_id);
void DoUpdateMediaSinks(const MediaSource::Id& source_id);
+ // Removes controllers from |route_controllers_| whose media routes do not
+ // appear in |routes|.
+ void RemoveInvalidMediaRouteControllers(
+ const std::vector<MediaRoute>& routes);
+
// Pending requests queued to be executed once component extension
// becomes ready.
std::deque<base::Closure> pending_requests_;
@@ -418,6 +429,9 @@ class MediaRouterMojoImpl : public MediaRouterBase,
// initial event page wakeup attempt.
bool provider_version_was_recorded_ = false;
+ std::unordered_map<MediaRoute::Id, std::unique_ptr<MediaRouteController>>
+ route_controllers_;
+
#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
« no previous file with comments | « chrome/browser/media/router/mojo/media_router.mojom ('k') | chrome/browser/media/router/mojo/media_router_mojo_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698