| 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 "core/workers/WorkerNavigator.h" | 8 #include "core/workers/WorkerNavigator.h" |
| 9 #include "platform/Supplementable.h" | 9 #include "platform/Supplementable.h" |
| 10 | 10 |
| 11 namespace blink { | 11 namespace blink { |
| 12 | 12 |
| 13 class ExecutionContext; | |
| 14 class NetworkInformation; | 13 class NetworkInformation; |
| 14 class ScriptState; |
| 15 class WorkerNavigator; | 15 class WorkerNavigator; |
| 16 | 16 |
| 17 class WorkerNavigatorNetworkInformation final | 17 class WorkerNavigatorNetworkInformation final |
| 18 : public GarbageCollected<WorkerNavigatorNetworkInformation>, | 18 : public GarbageCollected<WorkerNavigatorNetworkInformation>, |
| 19 public Supplement<WorkerNavigator> { | 19 public Supplement<WorkerNavigator> { |
| 20 USING_GARBAGE_COLLECTED_MIXIN(WorkerNavigatorNetworkInformation); | 20 USING_GARBAGE_COLLECTED_MIXIN(WorkerNavigatorNetworkInformation); |
| 21 | 21 |
| 22 public: | 22 public: |
| 23 static WorkerNavigatorNetworkInformation& from(WorkerNavigator&, | 23 static WorkerNavigatorNetworkInformation& from(WorkerNavigator&, |
| 24 ExecutionContext*); | 24 ExecutionContext*); |
| 25 static WorkerNavigatorNetworkInformation* toWorkerNavigatorNetworkInformation( | 25 static WorkerNavigatorNetworkInformation* toWorkerNavigatorNetworkInformation( |
| 26 WorkerNavigator&, | 26 WorkerNavigator&, |
| 27 ExecutionContext*); | 27 ExecutionContext*); |
| 28 static const char* supplementName(); | 28 static const char* supplementName(); |
| 29 | 29 |
| 30 static NetworkInformation* connection(ExecutionContext*, WorkerNavigator&); | 30 static NetworkInformation* connection(ScriptState*, WorkerNavigator&); |
| 31 | 31 |
| 32 DECLARE_VIRTUAL_TRACE(); | 32 DECLARE_VIRTUAL_TRACE(); |
| 33 | 33 |
| 34 private: | 34 private: |
| 35 WorkerNavigatorNetworkInformation(WorkerNavigator&, ExecutionContext*); | 35 WorkerNavigatorNetworkInformation(WorkerNavigator&, ExecutionContext*); |
| 36 NetworkInformation* connection(ExecutionContext*); | 36 NetworkInformation* connection(ExecutionContext*); |
| 37 | 37 |
| 38 Member<NetworkInformation> m_connection; | 38 Member<NetworkInformation> m_connection; |
| 39 }; | 39 }; |
| 40 | 40 |
| 41 } // namespace blink | 41 } // namespace blink |
| 42 | 42 |
| 43 #endif // WorkerNavigatorNetworkInformation_h | 43 #endif // WorkerNavigatorNetworkInformation_h |
| OLD | NEW |