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

Unified Diff: Source/modules/netinfo/NetworkInformation.h

Issue 1308943005: [NetInfo] Add Blink support for connection.change, connection.downlinkMax, and wimax (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 5 years, 3 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 | « Source/core/testing/Internals.idl ('k') | Source/modules/netinfo/NetworkInformation.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/netinfo/NetworkInformation.h
diff --git a/Source/modules/netinfo/NetworkInformation.h b/Source/modules/netinfo/NetworkInformation.h
index 5369e568880d7c07b4a751bf15753539c82ce789..facefd66080435e549e7f88668f387775652a617 100644
--- a/Source/modules/netinfo/NetworkInformation.h
+++ b/Source/modules/netinfo/NetworkInformation.h
@@ -26,8 +26,10 @@ public:
~NetworkInformation() override;
String type() const;
+ double downlinkMax() const;
- void connectionTypeChange(WebConnectionType) override;
+ // NetworkStateObserver overrides.
+ void connectionChange(WebConnectionType, double downlinkMaxMbps) override;
// EventTarget overrides.
const AtomicString& interfaceName() const override;
@@ -42,7 +44,8 @@ public:
DECLARE_VIRTUAL_TRACE();
- DEFINE_ATTRIBUTE_EVENT_LISTENER(typechange);
+ DEFINE_ATTRIBUTE_EVENT_LISTENER(change);
+ DEFINE_ATTRIBUTE_EVENT_LISTENER(typechange); // Deprecated
private:
explicit NetworkInformation(ExecutionContext*);
@@ -52,6 +55,9 @@ private:
// Touched only on context thread.
WebConnectionType m_type;
+ // Touched only on context thread.
+ double m_downlinkMaxMbps;
+
// Whether this object is listening for events from NetworkStateNotifier.
bool m_observing;
« no previous file with comments | « Source/core/testing/Internals.idl ('k') | Source/modules/netinfo/NetworkInformation.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698