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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/media/router/MediaRouteProvider.java

Issue 2801033002: Revert of Android: Remove GetApplicationContext part 2 (Closed)
Patch Set: 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.chrome.browser.media.router; 5 package org.chromium.chrome.browser.media.router;
6 6
7 import android.content.Context;
8
7 /** 9 /**
8 * An interface components providing media sinks and routes need to implement to hooks up into 10 * An interface components providing media sinks and routes need to implement to hooks up into
9 * {@link ChromeMediaRouter}. 11 * {@link ChromeMediaRouter}.
10 */ 12 */
11 public interface MediaRouteProvider { 13 public interface MediaRouteProvider {
12 /** 14 /**
13 * Builder for {@link MediaRouteProvider}. 15 * Builder for {@link MediaRouteProvider}.
14 */ 16 */
15 interface Builder { 17 interface Builder {
16 MediaRouteProvider create(MediaRouteManager manager); 18 MediaRouteProvider create(Context applicationContext, MediaRouteManager manager);
17 } 19 }
18 /** 20 /**
19 * @param sourceId The id of the source to check. 21 * @param sourceId The id of the source to check.
20 * @return if the specified source is supported by this route provider. 22 * @return if the specified source is supported by this route provider.
21 */ 23 */
22 boolean supportsSource(String sourceId); 24 boolean supportsSource(String sourceId);
23 25
24 /** 26 /**
25 * Initiates the discovery of media sinks corresponding to the given source id. Does nothing if 27 * Initiates the discovery of media sinks corresponding to the given source id. Does nothing if
26 * the source id is not supported by the MRP. 28 * the source id is not supported by the MRP.
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 void detachRoute(String routeId); 75 void detachRoute(String routeId);
74 76
75 /** 77 /**
76 * Sends a message to the route with the given id. The route must be created by this provider. 78 * Sends a message to the route with the given id. The route must be created by this provider.
77 * @param routeId The id of the route to send the message to. 79 * @param routeId The id of the route to send the message to.
78 * @param message The message to send. 80 * @param message The message to send.
79 * @param nativeCallbackId The id of the result callback tracked by the nati ve side. 81 * @param nativeCallbackId The id of the result callback tracked by the nati ve side.
80 */ 82 */
81 void sendStringMessage(String routeId, String message, int nativeCallbackId) ; 83 void sendStringMessage(String routeId, String message, int nativeCallbackId) ;
82 } 84 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698