| 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 "core/dom/ExecutionContext.h" | 7 #include "core/dom/ExecutionContext.h" |
| 8 #include "core/workers/WorkerNavigator.h" | 8 #include "core/workers/WorkerNavigator.h" |
| 9 #include "modules/netinfo/NetworkInformation.h" | 9 #include "modules/netinfo/NetworkInformation.h" |
| 10 #include "platform/bindings/ScriptState.h" | 10 #include "platform/bindings/ScriptState.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 .connection(context); | 48 .connection(context); |
| 49 } | 49 } |
| 50 | 50 |
| 51 DEFINE_TRACE(WorkerNavigatorNetworkInformation) { | 51 DEFINE_TRACE(WorkerNavigatorNetworkInformation) { |
| 52 visitor->Trace(connection_); | 52 visitor->Trace(connection_); |
| 53 Supplement<WorkerNavigator>::Trace(visitor); | 53 Supplement<WorkerNavigator>::Trace(visitor); |
| 54 } | 54 } |
| 55 | 55 |
| 56 NetworkInformation* WorkerNavigatorNetworkInformation::connection( | 56 NetworkInformation* WorkerNavigatorNetworkInformation::connection( |
| 57 ExecutionContext* context) { | 57 ExecutionContext* context) { |
| 58 ASSERT(context); | 58 DCHECK(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 |