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

Unified Diff: net/android/network_change_notifier_delegate_android.h

Issue 816543004: Update from https://crrev.com/308996 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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: net/android/network_change_notifier_delegate_android.h
diff --git a/net/android/network_change_notifier_delegate_android.h b/net/android/network_change_notifier_delegate_android.h
index f56188894f489ef483ed1fea54023113fca4fc52..6668b27737a196d75e096db7963925bdd0f7e003 100644
--- a/net/android/network_change_notifier_delegate_android.h
+++ b/net/android/network_change_notifier_delegate_android.h
@@ -33,6 +33,9 @@ class NET_EXPORT_PRIVATE NetworkChangeNotifierDelegateAndroid {
// Updates the current connection type.
virtual void OnConnectionTypeChanged() = 0;
+
+ // Updates the current max bandwidth.
+ virtual void OnMaxBandwidthChanged(double max_bandwidth_mbps) = 0;
};
NetworkChangeNotifierDelegateAndroid();
@@ -47,6 +50,14 @@ class NET_EXPORT_PRIVATE NetworkChangeNotifierDelegateAndroid {
jint new_connection_type);
jint GetConnectionType(JNIEnv* env, jobject obj) const;
+ // Called from NetworkChangeNotifierAndroid.java on the JNI thread whenever
+ // the maximum bandwidth of the connection changes. This updates the current
+ // max bandwidth seen by this class and forwards the notification to the
+ // observers that subscribed through AddObserver().
+ void NotifyMaxBandwidthChanged(JNIEnv* env,
+ jobject obj,
+ jdouble new_max_bandwidth);
+
// These methods can be called on any thread. Note that the provided observer
// will be notified on the thread AddObserver() is called on.
void AddObserver(Observer* observer);
« no previous file with comments | « net/android/network_change_notifier_android_unittest.cc ('k') | net/android/network_change_notifier_delegate_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698