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

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

Issue 1273423004: Shows a launch spinner next to a sink once it is selected to create a route. The launch spinner sur… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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/media_router_mojo_impl.h
diff --git a/chrome/browser/media/router/media_router_mojo_impl.h b/chrome/browser/media/router/media_router_mojo_impl.h
index 723163ec4d159197a67664a3b28b7c95c26d0eb2..71e36a7beeb138070a3fdf7d47d3490c6d74b791 100644
--- a/chrome/browser/media/router/media_router_mojo_impl.h
+++ b/chrome/browser/media/router/media_router_mojo_impl.h
@@ -6,6 +6,7 @@
#define CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_MOJO_IMPL_H_
#include <map>
+#include <set>
#include <string>
#include <vector>
@@ -96,6 +97,10 @@ class MediaRouterMojoImpl : public MediaRouter,
instance_id_ = instance_id;
}
+ const std::set<MediaSink::Id>& sink_ids_in_launch() const {
Kevin M 2015/08/08 00:35:56 ISTM that this doesn't belong at this layer - ther
haibinlu 2015/08/08 01:25:38 It cannot. It has to survive UI close and reopen.
+ return sink_ids_in_launch_;
+ }
+
private:
friend class MediaRouterFactory;
friend class MediaRouterMojoTest;
@@ -172,6 +177,12 @@ class MediaRouterMojoImpl : public MediaRouter,
mojo::Array<interfaces::MediaSinkPtr> sinks) override;
void OnRoutesUpdated(mojo::Array<interfaces::MediaRoutePtr> routes) override;
+ void RouteResponseReceived(
+ const std::vector<MediaRouteResponseCallback>& callbacks,
+ const MediaSink::Id& sink_id,
+ interfaces::MediaRoutePtr media_route,
+ const mojo::String& error_text);
+
// Pending requests queued to be executed once component extension
// becomes ready.
std::vector<base::Closure> pending_requests_;
@@ -198,6 +209,9 @@ class MediaRouterMojoImpl : public MediaRouter,
// via event_page_tracker_.
std::string media_route_provider_extension_id_;
+ // The Ids of the sinks to which media router are creating routes.
+ std::set<MediaSink::Id> sink_ids_in_launch_;
+
// Allows the extension to be monitored for suspend, and woken.
// This is a reference to a BrowserContext keyed service that outlives this
// instance.

Powered by Google App Engine
This is Rietveld 408576698