| 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 #ifndef PresentationConnection_h | 5 #ifndef PresentationConnection_h |
| 6 #define PresentationConnection_h | 6 #define PresentationConnection_h |
| 7 | 7 |
| 8 #include "core/events/EventTarget.h" | 8 #include "core/events/EventTarget.h" |
| 9 #include "core/fileapi/Blob.h" | 9 #include "core/fileapi/Blob.h" |
| 10 #include "core/fileapi/FileError.h" | 10 #include "core/fileapi/FileError.h" |
| 11 #include "core/frame/DOMWindowProperty.h" | 11 #include "core/frame/DOMWindowProperty.h" |
| 12 #include "platform/heap/Handle.h" | 12 #include "platform/heap/Handle.h" |
| 13 #include "public/platform/modules/presentation/WebPresentationConnectionClient.h
" | 13 #include "public/platform/modules/presentation/WebPresentationConnectionClient.h
" |
| 14 #include "wtf/OwnPtr.h" | |
| 15 #include "wtf/text/WTFString.h" | 14 #include "wtf/text/WTFString.h" |
| 15 #include <memory> |
| 16 | 16 |
| 17 namespace WTF { | 17 namespace WTF { |
| 18 class AtomicString; | 18 class AtomicString; |
| 19 } // namespace WTF | 19 } // namespace WTF |
| 20 | 20 |
| 21 namespace blink { | 21 namespace blink { |
| 22 | 22 |
| 23 class DOMArrayBuffer; | 23 class DOMArrayBuffer; |
| 24 class DOMArrayBufferView; | 24 class DOMArrayBufferView; |
| 25 class PresentationController; | 25 class PresentationController; |
| 26 class PresentationRequest; | 26 class PresentationRequest; |
| 27 | 27 |
| 28 class PresentationConnection final | 28 class PresentationConnection final |
| 29 : public EventTargetWithInlineData | 29 : public EventTargetWithInlineData |
| 30 , public DOMWindowProperty { | 30 , public DOMWindowProperty { |
| 31 USING_GARBAGE_COLLECTED_MIXIN(PresentationConnection); | 31 USING_GARBAGE_COLLECTED_MIXIN(PresentationConnection); |
| 32 DEFINE_WRAPPERTYPEINFO(); | 32 DEFINE_WRAPPERTYPEINFO(); |
| 33 public: | 33 public: |
| 34 // For CallbackPromiseAdapter. | 34 // For CallbackPromiseAdapter. |
| 35 using WebType = OwnPtr<WebPresentationConnectionClient>; | 35 using WebType = std::unique_ptr<WebPresentationConnectionClient>; |
| 36 | 36 |
| 37 static PresentationConnection* take(ScriptPromiseResolver*, PassOwnPtr<WebPr
esentationConnectionClient>, PresentationRequest*); | 37 static PresentationConnection* take(ScriptPromiseResolver*, std::unique_ptr<
WebPresentationConnectionClient>, PresentationRequest*); |
| 38 static PresentationConnection* take(PresentationController*, PassOwnPtr<WebP
resentationConnectionClient>, PresentationRequest*); | 38 static PresentationConnection* take(PresentationController*, std::unique_ptr
<WebPresentationConnectionClient>, PresentationRequest*); |
| 39 ~PresentationConnection() override; | 39 ~PresentationConnection() override; |
| 40 | 40 |
| 41 // EventTarget implementation. | 41 // EventTarget implementation. |
| 42 const AtomicString& interfaceName() const override; | 42 const AtomicString& interfaceName() const override; |
| 43 ExecutionContext* getExecutionContext() const override; | 43 ExecutionContext* getExecutionContext() const override; |
| 44 | 44 |
| 45 DECLARE_VIRTUAL_TRACE(); | 45 DECLARE_VIRTUAL_TRACE(); |
| 46 | 46 |
| 47 const String& id() const { return m_id; } | 47 const String& id() const { return m_id; } |
| 48 const WTF::AtomicString& state() const; | 48 const WTF::AtomicString& state() const; |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 // For Blob data handling. | 114 // For Blob data handling. |
| 115 Member<BlobLoader> m_blobLoader; | 115 Member<BlobLoader> m_blobLoader; |
| 116 HeapDeque<Member<Message>> m_messages; | 116 HeapDeque<Member<Message>> m_messages; |
| 117 | 117 |
| 118 BinaryType m_binaryType; | 118 BinaryType m_binaryType; |
| 119 }; | 119 }; |
| 120 | 120 |
| 121 } // namespace blink | 121 } // namespace blink |
| 122 | 122 |
| 123 #endif // PresentationConnection_h | 123 #endif // PresentationConnection_h |
| OLD | NEW |