| Index: Source/modules/presentation/PresentationSession.h
|
| diff --git a/Source/modules/presentation/Presentation.h b/Source/modules/presentation/PresentationSession.h
|
| similarity index 50%
|
| copy from Source/modules/presentation/Presentation.h
|
| copy to Source/modules/presentation/PresentationSession.h
|
| index be2cdae35e86df34e2d8c50bf7aa4be53934a949..728e61614d3b9670b5e95ad6403ab7292a06d473 100644
|
| --- a/Source/modules/presentation/Presentation.h
|
| +++ b/Source/modules/presentation/PresentationSession.h
|
| @@ -2,24 +2,25 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#ifndef Presentation_h
|
| -#define Presentation_h
|
| +#ifndef PresentationSession_h
|
| +#define PresentationSession_h
|
|
|
| #include "core/dom/ContextLifecycleObserver.h"
|
| #include "core/events/EventTarget.h"
|
| +#include "wtf/text/WTFString.h"
|
|
|
| namespace blink {
|
|
|
| -class Presentation final
|
| - : public RefCountedGarbageCollectedWillBeGarbageCollectedFinalized<Presentation>
|
| +class PresentationSession final
|
| + : public RefCountedGarbageCollectedWillBeGarbageCollectedFinalized<PresentationSession>
|
| , public EventTargetWithInlineData
|
| , public ContextLifecycleObserver {
|
| - DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(RefCountedGarbageCollected<Presentation>);
|
| - WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(Presentation);
|
| + DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(RefCountedGarbageCollected<PresentationSession>);
|
| + WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(PresentationSession);
|
| DEFINE_WRAPPERTYPEINFO();
|
| public:
|
| - static Presentation* create(ExecutionContext*);
|
| - virtual ~Presentation();
|
| + static PresentationSession* create(ExecutionContext*);
|
| + virtual ~PresentationSession();
|
|
|
| // EventTarget implementation.
|
| virtual const AtomicString& interfaceName() const override;
|
| @@ -27,12 +28,22 @@ public:
|
|
|
| virtual void trace(Visitor*) override;
|
|
|
| - DEFINE_ATTRIBUTE_EVENT_LISTENER(availablechange);
|
| + const String& id() const { return m_id; }
|
| + const AtomicString& state() const { return m_state; }
|
| +
|
| + void postMessage(const String& message);
|
| + void close();
|
| +
|
| + DEFINE_ATTRIBUTE_EVENT_LISTENER(message);
|
| + DEFINE_ATTRIBUTE_EVENT_LISTENER(statechange);
|
|
|
| private:
|
| - explicit Presentation(ExecutionContext*);
|
| + explicit PresentationSession(ExecutionContext*);
|
| +
|
| + String m_id;
|
| + AtomicString m_state;
|
| };
|
|
|
| } // namespace blink
|
|
|
| -#endif // Presentation_h
|
| +#endif // PresentationSession_h
|
|
|