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/NavigatorNetworkInformation.h" | 5 #include "modules/netinfo/NavigatorNetworkInformation.h" |
6 | 6 |
7 #include "core/frame/LocalDOMWindow.h" | 7 #include "core/frame/LocalDOMWindow.h" |
8 #include "core/frame/LocalFrame.h" | 8 #include "core/frame/LocalFrame.h" |
9 #include "core/frame/Navigator.h" | 9 #include "core/frame/Navigator.h" |
10 #include "modules/netinfo/NetworkInformation.h" | 10 #include "modules/netinfo/NetworkInformation.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 | 42 |
43 NetworkInformation* NavigatorNetworkInformation::connection(Navigator& navigator
) | 43 NetworkInformation* NavigatorNetworkInformation::connection(Navigator& navigator
) |
44 { | 44 { |
45 return NavigatorNetworkInformation::from(navigator).connection(); | 45 return NavigatorNetworkInformation::from(navigator).connection(); |
46 } | 46 } |
47 | 47 |
48 NetworkInformation* NavigatorNetworkInformation::connection() | 48 NetworkInformation* NavigatorNetworkInformation::connection() |
49 { | 49 { |
50 if (!m_connection && frame()) { | 50 if (!m_connection && frame()) { |
51 ASSERT(frame()->domWindow()); | 51 ASSERT(frame()->domWindow()); |
52 m_connection = NetworkInformation::create(frame()->domWindow()->executio
nContext()); | 52 m_connection = NetworkInformation::create(frame()->domWindow()->getExecu
tionContext()); |
53 } | 53 } |
54 return m_connection.get(); | 54 return m_connection.get(); |
55 } | 55 } |
56 | 56 |
57 DEFINE_TRACE(NavigatorNetworkInformation) | 57 DEFINE_TRACE(NavigatorNetworkInformation) |
58 { | 58 { |
59 visitor->trace(m_connection); | 59 visitor->trace(m_connection); |
60 HeapSupplement<Navigator>::trace(visitor); | 60 HeapSupplement<Navigator>::trace(visitor); |
61 DOMWindowProperty::trace(visitor); | 61 DOMWindowProperty::trace(visitor); |
62 } | 62 } |
63 | 63 |
64 } // namespace blink | 64 } // namespace blink |
OLD | NEW |