OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/push_messaging/PushSubscriptionOptions.h" | 5 #include "modules/push_messaging/PushSubscriptionOptions.h" |
6 | 6 |
7 #include "bindings/core/v8/ExceptionState.h" | 7 #include "bindings/core/v8/ExceptionState.h" |
8 #include "core/dom/DOMArrayBuffer.h" | 8 #include "core/dom/DOMArrayBuffer.h" |
9 #include "core/dom/ExceptionCode.h" | 9 #include "core/dom/ExceptionCode.h" |
10 #include "modules/push_messaging/PushSubscriptionOptionsInit.h" | 10 #include "modules/push_messaging/PushSubscriptionOptionsInit.h" |
| 11 #include "platform/wtf/ASCIICType.h" |
11 #include "platform/wtf/Assertions.h" | 12 #include "platform/wtf/Assertions.h" |
12 #include "platform/wtf/text/WTFString.h" | 13 #include "platform/wtf/text/WTFString.h" |
13 #include "public/platform/WebString.h" | 14 #include "public/platform/WebString.h" |
14 #include "public/platform/modules/push_messaging/WebPushSubscriptionOptions.h" | 15 #include "public/platform/modules/push_messaging/WebPushSubscriptionOptions.h" |
15 #include "third_party/WebKit/Source/wtf/ASCIICType.h" | |
16 | 16 |
17 namespace blink { | 17 namespace blink { |
18 namespace { | 18 namespace { |
19 | 19 |
20 const int kMaxApplicationServerKeyLength = 255; | 20 const int kMaxApplicationServerKeyLength = 255; |
21 | 21 |
22 String BufferSourceToString( | 22 String BufferSourceToString( |
23 const ArrayBufferOrArrayBufferView& application_server_key, | 23 const ArrayBufferOrArrayBufferView& application_server_key, |
24 ExceptionState& exception_state) { | 24 ExceptionState& exception_state) { |
25 unsigned char* input; | 25 unsigned char* input; |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 : user_visible_only_(options.user_visible_only), | 77 : user_visible_only_(options.user_visible_only), |
78 application_server_key_( | 78 application_server_key_( |
79 DOMArrayBuffer::Create(options.application_server_key.Latin1().data(), | 79 DOMArrayBuffer::Create(options.application_server_key.Latin1().data(), |
80 options.application_server_key.length())) {} | 80 options.application_server_key.length())) {} |
81 | 81 |
82 DEFINE_TRACE(PushSubscriptionOptions) { | 82 DEFINE_TRACE(PushSubscriptionOptions) { |
83 visitor->Trace(application_server_key_); | 83 visitor->Trace(application_server_key_); |
84 } | 84 } |
85 | 85 |
86 } // namespace blink | 86 } // namespace blink |
OLD | NEW |