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

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

Issue 299883004: Adds WebWorker support to NetInfo v3. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@netinfo3
Patch Set: Regolding webexposed/ layout tests Created 6 years, 7 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: Source/modules/netinfo/WorkerNavigatorNetworkInformation.h
diff --git a/Source/modules/netinfo/WorkerNavigatorNetworkInformation.h b/Source/modules/netinfo/WorkerNavigatorNetworkInformation.h
new file mode 100644
index 0000000000000000000000000000000000000000..0b48bcf317a5c899c572e17e32c292bbae5f9e98
--- /dev/null
+++ b/Source/modules/netinfo/WorkerNavigatorNetworkInformation.h
@@ -0,0 +1,40 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef WorkerNavigatorNetworkInformation_h
+#define WorkerNavigatorNetworkInformation_h
+
+#include "platform/Supplementable.h"
+
+namespace WebCore {
+
+class ExecutionContext;
+class NetworkInformation;
+class WorkerNavigator;
+
+class WorkerNavigatorNetworkInformation FINAL
+ : public NoBaseWillBeGarbageCollectedFinalized<WorkerNavigatorNetworkInformation>
+ , public WillBeHeapSupplement<WorkerNavigator> {
+ WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(WorkerNavigatorNetworkInformation);
+
+public:
+ virtual ~WorkerNavigatorNetworkInformation();
+ static WorkerNavigatorNetworkInformation& from(WorkerNavigator&, ExecutionContext*);
+ static WorkerNavigatorNetworkInformation* toWorkerNavigatorNetworkInformation(WorkerNavigator&, ExecutionContext*);
+ static const char* supplementName();
+
+ static NetworkInformation* connection(ExecutionContext*, WorkerNavigator&);
+
+ virtual void trace(Visitor*) OVERRIDE;
+
+private:
+ WorkerNavigatorNetworkInformation(WorkerNavigator&, ExecutionContext*);
+ NetworkInformation* connection(ExecutionContext*);
+
+ RefPtrWillBeMember<NetworkInformation> m_connection;
+};
+
+} // namespace WebCore
+
+#endif // WorkerNavigatorNetworkInformation_h
« no previous file with comments | « Source/modules/netinfo/NetworkInformation.idl ('k') | Source/modules/netinfo/WorkerNavigatorNetworkInformation.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698