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/page/NetworkStateNotifier.h" | 10 #include "core/page/NetworkStateNotifier.h" |
10 #include "modules/EventTargetModules.h" | 11 #include "modules/EventTargetModules.h" |
11 #include "wtf/text/WTFString.h" | 12 #include "wtf/text/WTFString.h" |
12 | 13 |
13 namespace { | 14 namespace { |
14 | 15 |
15 String connectionTypeToString(blink::WebConnectionType type) | 16 String connectionTypeToString(blink::WebConnectionType type) |
16 { | 17 { |
17 switch (type) { | 18 switch (type) { |
18 case blink::ConnectionTypeCellular: | 19 case blink::ConnectionTypeCellular: |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 NetworkInformation::NetworkInformation(ExecutionContext* context) | 141 NetworkInformation::NetworkInformation(ExecutionContext* context) |
141 : ActiveDOMObject(context) | 142 : ActiveDOMObject(context) |
142 , m_type(networkStateNotifier().connectionType()) | 143 , m_type(networkStateNotifier().connectionType()) |
143 , m_observing(false) | 144 , m_observing(false) |
144 , m_contextStopped(false) | 145 , m_contextStopped(false) |
145 { | 146 { |
146 ScriptWrappable::init(this); | 147 ScriptWrappable::init(this); |
147 } | 148 } |
148 | 149 |
149 } // namespace WebCore | 150 } // namespace WebCore |
OLD | NEW |