| 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/beacon/NavigatorBeacon.h" | 6 #include "modules/beacon/NavigatorBeacon.h" |
| 7 | 7 |
| 8 #include "bindings/core/v8/ExceptionState.h" | 8 #include "bindings/core/v8/ExceptionState.h" |
| 9 #include "bindings/modules/v8/UnionTypesModules.h" | 9 #include "bindings/modules/v8/UnionTypesModules.h" |
| 10 #include "core/dom/DOMArrayBufferView.h" | 10 #include "core/dom/DOMArrayBufferView.h" |
| 11 #include "core/dom/ExceptionCode.h" | 11 #include "core/dom/ExceptionCode.h" |
| 12 #include "core/dom/ExecutionContext.h" | 12 #include "core/dom/ExecutionContext.h" |
| 13 #include "core/fileapi/Blob.h" | 13 #include "core/fileapi/Blob.h" |
| 14 #include "core/frame/LocalFrame.h" | 14 #include "core/frame/LocalFrame.h" |
| 15 #include "core/frame/Settings.h" | 15 #include "core/frame/Settings.h" |
| 16 #include "core/frame/UseCounter.h" | 16 #include "core/frame/UseCounter.h" |
| 17 #include "core/frame/csp/ContentSecurityPolicy.h" | 17 #include "core/frame/csp/ContentSecurityPolicy.h" |
| 18 #include "core/html/DOMFormData.h" | 18 #include "core/html/FormData.h" |
| 19 #include "core/loader/BeaconLoader.h" | 19 #include "core/loader/BeaconLoader.h" |
| 20 | 20 |
| 21 namespace blink { | 21 namespace blink { |
| 22 | 22 |
| 23 NavigatorBeacon::NavigatorBeacon(Navigator& navigator) | 23 NavigatorBeacon::NavigatorBeacon(Navigator& navigator) |
| 24 : LocalFrameLifecycleObserver(navigator.frame()) | 24 : LocalFrameLifecycleObserver(navigator.frame()) |
| 25 , m_transmittedBytes(0) | 25 , m_transmittedBytes(0) |
| 26 { | 26 { |
| 27 } | 27 } |
| 28 | 28 |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 allowed = BeaconLoader::sendBeacon(impl.frame(), allowance, url, data.ge
tAsString(), bytes); | 120 allowed = BeaconLoader::sendBeacon(impl.frame(), allowance, url, data.ge
tAsString(), bytes); |
| 121 else if (data.isFormData()) | 121 else if (data.isFormData()) |
| 122 allowed = BeaconLoader::sendBeacon(impl.frame(), allowance, url, data.ge
tAsFormData(), bytes); | 122 allowed = BeaconLoader::sendBeacon(impl.frame(), allowance, url, data.ge
tAsFormData(), bytes); |
| 123 else | 123 else |
| 124 allowed = BeaconLoader::sendBeacon(impl.frame(), allowance, url, String(
), bytes); | 124 allowed = BeaconLoader::sendBeacon(impl.frame(), allowance, url, String(
), bytes); |
| 125 | 125 |
| 126 return impl.beaconResult(context, allowed, bytes); | 126 return impl.beaconResult(context, allowed, bytes); |
| 127 } | 127 } |
| 128 | 128 |
| 129 } // namespace blink | 129 } // namespace blink |
| OLD | NEW |