| 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 "config.h" | 5 #include "config.h" |
| 6 #include "modules/netinfo/NetworkInformation.h" | 6 #include "modules/netinfo/NetworkInformation.h" |
| 7 | 7 |
| 8 #include "core/dom/ExecutionContext.h" | 8 #include "core/dom/ExecutionContext.h" |
| 9 #include "core/events/Event.h" | 9 #include "core/events/Event.h" |
| 10 #include "core/page/NetworkStateNotifier.h" | 10 #include "core/page/NetworkStateNotifier.h" |
| 11 #include "modules/EventTargetModules.h" | 11 #include "modules/EventTargetModules.h" |
| 12 #include "wtf/text/WTFString.h" | 12 #include "wtf/text/WTFString.h" |
| 13 | 13 |
| 14 namespace { | 14 namespace { |
| 15 | 15 |
| 16 String connectionTypeToString(blink::WebConnectionType type) | 16 using namespace blink; |
| 17 |
| 18 String connectionTypeToString(WebConnectionType type) |
| 17 { | 19 { |
| 18 switch (type) { | 20 switch (type) { |
| 19 case blink::ConnectionTypeCellular: | 21 case ConnectionTypeCellular: |
| 20 return "cellular"; | 22 return "cellular"; |
| 21 case blink::ConnectionTypeBluetooth: | 23 case ConnectionTypeBluetooth: |
| 22 return "bluetooth"; | 24 return "bluetooth"; |
| 23 case blink::ConnectionTypeEthernet: | 25 case ConnectionTypeEthernet: |
| 24 return "ethernet"; | 26 return "ethernet"; |
| 25 case blink::ConnectionTypeWifi: | 27 case ConnectionTypeWifi: |
| 26 return "wifi"; | 28 return "wifi"; |
| 27 case blink::ConnectionTypeOther: | 29 case ConnectionTypeOther: |
| 28 return "other"; | 30 return "other"; |
| 29 case blink::ConnectionTypeNone: | 31 case ConnectionTypeNone: |
| 30 return "none"; | 32 return "none"; |
| 31 case blink::ConnectionTypeUnknown: | 33 case ConnectionTypeUnknown: |
| 32 return "unknown"; | 34 return "unknown"; |
| 33 } | 35 } |
| 34 ASSERT_NOT_REACHED(); | 36 ASSERT_NOT_REACHED(); |
| 35 return "none"; | 37 return "none"; |
| 36 } | 38 } |
| 37 | 39 |
| 38 } // namespace | 40 } // namespace |
| 39 | 41 |
| 40 namespace blink { | 42 namespace blink { |
| 41 | 43 |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 { | 150 { |
| 149 } | 151 } |
| 150 | 152 |
| 151 DEFINE_TRACE(NetworkInformation) | 153 DEFINE_TRACE(NetworkInformation) |
| 152 { | 154 { |
| 153 RefCountedGarbageCollectedEventTargetWithInlineData<NetworkInformation>::tra
ce(visitor); | 155 RefCountedGarbageCollectedEventTargetWithInlineData<NetworkInformation>::tra
ce(visitor); |
| 154 ActiveDOMObject::trace(visitor); | 156 ActiveDOMObject::trace(visitor); |
| 155 } | 157 } |
| 156 | 158 |
| 157 } // namespace blink | 159 } // namespace blink |
| OLD | NEW |