OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef WorkerNavigatorNetworkInformation_h | 5 #ifndef WorkerNavigatorNetworkInformation_h |
6 #define WorkerNavigatorNetworkInformation_h | 6 #define WorkerNavigatorNetworkInformation_h |
7 | 7 |
8 #include "platform/Supplementable.h" | 8 #include "platform/Supplementable.h" |
9 | 9 |
10 namespace blink { | 10 namespace blink { |
11 | 11 |
12 class ExecutionContext; | 12 class ExecutionContext; |
13 class NetworkInformation; | 13 class NetworkInformation; |
14 class WorkerNavigator; | 14 class WorkerNavigator; |
15 | 15 |
16 class WorkerNavigatorNetworkInformation final : public GarbageCollected<WorkerNa
vigatorNetworkInformation>, public HeapSupplement<WorkerNavigator> { | 16 class WorkerNavigatorNetworkInformation final : public GarbageCollected<WorkerNa
vigatorNetworkInformation>, public Supplement<WorkerNavigator> { |
17 USING_GARBAGE_COLLECTED_MIXIN(WorkerNavigatorNetworkInformation); | 17 USING_GARBAGE_COLLECTED_MIXIN(WorkerNavigatorNetworkInformation); |
18 public: | 18 public: |
19 static WorkerNavigatorNetworkInformation& from(WorkerNavigator&, ExecutionCo
ntext*); | 19 static WorkerNavigatorNetworkInformation& from(WorkerNavigator&, ExecutionCo
ntext*); |
20 static WorkerNavigatorNetworkInformation* toWorkerNavigatorNetworkInformatio
n(WorkerNavigator&, ExecutionContext*); | 20 static WorkerNavigatorNetworkInformation* toWorkerNavigatorNetworkInformatio
n(WorkerNavigator&, ExecutionContext*); |
21 static const char* supplementName(); | 21 static const char* supplementName(); |
22 | 22 |
23 static NetworkInformation* connection(ExecutionContext*, WorkerNavigator&); | 23 static NetworkInformation* connection(ExecutionContext*, WorkerNavigator&); |
24 | 24 |
25 DECLARE_VIRTUAL_TRACE(); | 25 DECLARE_VIRTUAL_TRACE(); |
26 | 26 |
27 private: | 27 private: |
28 WorkerNavigatorNetworkInformation(WorkerNavigator&, ExecutionContext*); | 28 WorkerNavigatorNetworkInformation(WorkerNavigator&, ExecutionContext*); |
29 NetworkInformation* connection(ExecutionContext*); | 29 NetworkInformation* connection(ExecutionContext*); |
30 | 30 |
31 Member<NetworkInformation> m_connection; | 31 Member<NetworkInformation> m_connection; |
32 }; | 32 }; |
33 | 33 |
34 } // namespace blink | 34 } // namespace blink |
35 | 35 |
36 #endif // WorkerNavigatorNetworkInformation_h | 36 #endif // WorkerNavigatorNetworkInformation_h |
OLD | NEW |