| 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 #include "modules/netinfo/WorkerNavigatorNetworkInformation.h" | 5 #include "modules/netinfo/WorkerNavigatorNetworkInformation.h" |
| 6 | 6 |
| 7 #include "bindings/core/v8/ScriptState.h" | |
| 8 #include "core/dom/ExecutionContext.h" | 7 #include "core/dom/ExecutionContext.h" |
| 9 #include "core/workers/WorkerNavigator.h" | 8 #include "core/workers/WorkerNavigator.h" |
| 10 #include "modules/netinfo/NetworkInformation.h" | 9 #include "modules/netinfo/NetworkInformation.h" |
| 10 #include "platform/bindings/ScriptState.h" |
| 11 | 11 |
| 12 namespace blink { | 12 namespace blink { |
| 13 | 13 |
| 14 WorkerNavigatorNetworkInformation::WorkerNavigatorNetworkInformation( | 14 WorkerNavigatorNetworkInformation::WorkerNavigatorNetworkInformation( |
| 15 WorkerNavigator& navigator, | 15 WorkerNavigator& navigator, |
| 16 ExecutionContext* context) | 16 ExecutionContext* context) |
| 17 : Supplement<WorkerNavigator>(navigator) {} | 17 : Supplement<WorkerNavigator>(navigator) {} |
| 18 | 18 |
| 19 WorkerNavigatorNetworkInformation& WorkerNavigatorNetworkInformation::From( | 19 WorkerNavigatorNetworkInformation& WorkerNavigatorNetworkInformation::From( |
| 20 WorkerNavigator& navigator, | 20 WorkerNavigator& navigator, |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 | 55 |
| 56 NetworkInformation* WorkerNavigatorNetworkInformation::connection( | 56 NetworkInformation* WorkerNavigatorNetworkInformation::connection( |
| 57 ExecutionContext* context) { | 57 ExecutionContext* context) { |
| 58 ASSERT(context); | 58 ASSERT(context); |
| 59 if (!connection_) | 59 if (!connection_) |
| 60 connection_ = NetworkInformation::Create(context); | 60 connection_ = NetworkInformation::Create(context); |
| 61 return connection_.Get(); | 61 return connection_.Get(); |
| 62 } | 62 } |
| 63 | 63 |
| 64 } // namespace blink | 64 } // namespace blink |
| OLD | NEW |