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

Unified Diff: chromecast/browser/android/apk/src/org/chromium/chromecast/shell/CastBrowserHelper.java

Issue 1106363003: [Chromecast] Always receive notifications. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add comment. Created 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromecast/browser/android/apk/src/org/chromium/chromecast/shell/CastBrowserHelper.java
diff --git a/chromecast/browser/android/apk/src/org/chromium/chromecast/shell/CastBrowserHelper.java b/chromecast/browser/android/apk/src/org/chromium/chromecast/shell/CastBrowserHelper.java
index e9bbcc032d00b3737d3eb17f33e268a037f31f3f..937018d87624225e44d822c2e03b256f5bd4e77e 100644
--- a/chromecast/browser/android/apk/src/org/chromium/chromecast/shell/CastBrowserHelper.java
+++ b/chromecast/browser/android/apk/src/org/chromium/chromecast/shell/CastBrowserHelper.java
@@ -20,6 +20,7 @@ import org.chromium.content.browser.BrowserStartupController;
import org.chromium.content.browser.DeviceUtils;
import org.chromium.content.common.ContentSwitches;
import org.chromium.media.MediaDrmBridge;
+import org.chromium.net.NetworkChangeNotifier;
import java.util.UUID;
@@ -75,6 +76,9 @@ public class CastBrowserHelper {
Log.d(TAG, "Loading BrowserStartupController...");
BrowserStartupController.get(context, LibraryProcessType.PROCESS_BROWSER)
.startBrowserProcessesSync(false);
+ NetworkChangeNotifier.init(context);
+ // Cast shell always expects to receive notifications to track network state.
+ NetworkChangeNotifier.registerToReceiveNotificationsAlways();
sIsBrowserInitialized = true;
MediaDrmBridge.addKeySystemUuidMapping(PLAYREADY_KEY_SYSTEM_NAME, PLAYREADY_UUID);
return true;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698