diff options
Diffstat (limited to 'chromium/third_party/WebKit/Source/modules/netinfo/WorkerNavigatorNetworkInformation.h')
-rw-r--r-- | chromium/third_party/WebKit/Source/modules/netinfo/WorkerNavigatorNetworkInformation.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/chromium/third_party/WebKit/Source/modules/netinfo/WorkerNavigatorNetworkInformation.h b/chromium/third_party/WebKit/Source/modules/netinfo/WorkerNavigatorNetworkInformation.h new file mode 100644 index 00000000000..0b48bcf317a --- /dev/null +++ b/chromium/third_party/WebKit/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 |