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

Unified Diff: chrome/browser/ui/webui/media_router/media_router_ui.h

Issue 1805813002: [Media Router] Wiring for searching route providers for new sinks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Android stub Created 4 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/ui/webui/media_router/media_router_ui.h
diff --git a/chrome/browser/ui/webui/media_router/media_router_ui.h b/chrome/browser/ui/webui/media_router/media_router_ui.h
index 6a68832647eed6cacb13417d44fd92677c6d6b17..f9b1a8945f49e259d27bc29b468c2414adc1b710 100644
--- a/chrome/browser/ui/webui/media_router/media_router_ui.h
+++ b/chrome/browser/ui/webui/media_router/media_router_ui.h
@@ -117,6 +117,14 @@ class MediaRouterUI : public ConstrainedWebDialogUI,
// Calls MediaRouter to clear the given issue.
void ClearIssue(const Issue::Id& issue_id);
+ // Calls MediaRouter to search route providers for sinks matching
+ // |search_criteria| with the source that is currently associated with
+ // |cast_mode|. The user's domain |domain| is also used.
+ bool SearchSinksAndCreateRoute(const MediaSink::Id& sink_id,
+ const std::string& search_criteria,
+ const std::string& domain,
+ MediaCastMode cast_mode);
+
// Returns the hostname of the default source's parent frame URL.
std::string GetPresentationRequestSourceName() const;
std::string GetTruncatedPresentationRequestSourceName() const;
@@ -208,6 +216,10 @@ class MediaRouterUI : public ConstrainedWebDialogUI,
const base::string16& presentation_request_source_name,
const RouteRequestResult& result);
+ // Callback passed to MediaRouter to receive the sink ID of the sink found by
+ // SearchSinksAndCreateRoute().
+ void OnSearchSinkResponseReceived(const std::string& sink_id);
+
// Creates and sends an issue if route creation timed out.
void SendIssueForRouteTimeout(
MediaCastMode cast_mode,
@@ -221,14 +233,16 @@ class MediaRouterUI : public ConstrainedWebDialogUI,
const PresentationRequest& presentation_request) override;
void OnDefaultPresentationRemoved() override;
- // Creates a brand new route or, if a |route_id| is supplied, connects to a
- // non-local route. This is used for connecting to a non-local route.
- // Returns true if a route request is successfully submitted.
- // OnRouteResponseReceived() will be invoked when the route request
- // completes.
- bool CreateOrConnectRoute(const MediaSink::Id& sink_id,
- MediaCastMode cast_mode,
- const MediaRoute::Id& route_id);
+ // Populates common route-related parameters for CreateRoute(),
+ // ConnectRoute(), and SearchSinksAndCreateRoute().
+ bool GetCreateOrConnectRouteParameters(
apacible 2016/04/08 21:02:12 Rename this to be more general? Previously it was
btolsch 2016/04/08 21:55:04 The use by SearchSinksAndCreateRoute() is identica
apacible 2016/04/08 22:07:47 Something like SetRouteParamters()?
btolsch 2016/04/11 08:19:35 Done.
+ const MediaSink::Id& sink_id,
+ MediaCastMode cast_mode,
+ MediaSource::Id* source_id,
+ GURL* origin,
+ std::vector<MediaRouteResponseCallback>* route_response_callbacks,
+ base::TimeDelta* timeout,
+ bool* off_the_record);
// Updates the set of supported cast modes and sends the updated set to
// |handler_|.

Powered by Google App Engine
This is Rietveld 408576698