| 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 PresentationSession_h | 5 #ifndef PresentationSession_h |
| 6 #define PresentationSession_h | 6 #define PresentationSession_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/WebPresentationSessionClient.h" | 13 #include "public/platform/modules/presentation/WebPresentationSessionClient.h" |
| 14 #include "wtf/OwnPtr.h" |
| 14 #include "wtf/text/WTFString.h" | 15 #include "wtf/text/WTFString.h" |
| 15 | 16 |
| 16 namespace WTF { | 17 namespace WTF { |
| 17 class AtomicString; | 18 class AtomicString; |
| 18 } // namespace WTF | 19 } // namespace WTF |
| 19 | 20 |
| 20 namespace blink { | 21 namespace blink { |
| 21 | 22 |
| 22 class DOMArrayBuffer; | 23 class DOMArrayBuffer; |
| 23 class DOMArrayBufferView; | 24 class DOMArrayBufferView; |
| 24 class PresentationController; | 25 class PresentationController; |
| 25 | 26 |
| 26 class PresentationSession final | 27 class PresentationSession final |
| 27 : public RefCountedGarbageCollectedEventTargetWithInlineData<PresentationSes
sion> | 28 : public RefCountedGarbageCollectedEventTargetWithInlineData<PresentationSes
sion> |
| 28 , public DOMWindowProperty { | 29 , public DOMWindowProperty { |
| 29 REFCOUNTED_GARBAGE_COLLECTED_EVENT_TARGET(PresentationSession); | 30 REFCOUNTED_GARBAGE_COLLECTED_EVENT_TARGET(PresentationSession); |
| 30 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(PresentationSession); | 31 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(PresentationSession); |
| 31 DEFINE_WRAPPERTYPEINFO(); | 32 DEFINE_WRAPPERTYPEINFO(); |
| 32 public: | 33 public: |
| 33 // For CallbackPromiseAdapter. | 34 // For CallbackPromiseAdapter. |
| 34 using WebType = WebPresentationSessionClient; | 35 using WebType = OwnPtr<WebPresentationSessionClient>; |
| 35 | 36 |
| 36 static PresentationSession* take(ScriptPromiseResolver*, PassOwnPtr<WebPrese
ntationSessionClient>); | 37 static PresentationSession* take(ScriptPromiseResolver*, PassOwnPtr<WebPrese
ntationSessionClient>); |
| 37 static PresentationSession* take(PresentationController*, PassOwnPtr<WebPres
entationSessionClient>); | 38 static PresentationSession* take(PresentationController*, PassOwnPtr<WebPres
entationSessionClient>); |
| 38 ~PresentationSession() override; | 39 ~PresentationSession() override; |
| 39 | 40 |
| 40 // EventTarget implementation. | 41 // EventTarget implementation. |
| 41 const AtomicString& interfaceName() const override; | 42 const AtomicString& interfaceName() const override; |
| 42 ExecutionContext* executionContext() const override; | 43 ExecutionContext* executionContext() const override; |
| 43 | 44 |
| 44 DECLARE_VIRTUAL_TRACE(); | 45 DECLARE_VIRTUAL_TRACE(); |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 // For Blob data handling. | 118 // For Blob data handling. |
| 118 Member<BlobLoader> m_blobLoader; | 119 Member<BlobLoader> m_blobLoader; |
| 119 Deque<OwnPtr<Message>> m_messages; | 120 Deque<OwnPtr<Message>> m_messages; |
| 120 | 121 |
| 121 BinaryType m_binaryType; | 122 BinaryType m_binaryType; |
| 122 }; | 123 }; |
| 123 | 124 |
| 124 } // namespace blink | 125 } // namespace blink |
| 125 | 126 |
| 126 #endif // PresentationSession_h | 127 #endif // PresentationSession_h |
| OLD | NEW |