Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(27)

Unified Diff: Source/modules/presentation/PresentationSession.h

Issue 685263003: The rest of the Presentation API IDL as stubs. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updated fast/dom/Window tests Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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"
Peter Beverloo 2014/10/29 22:21:17 +#include "wtf/text/AtomicString.h" .. under the
whywhat 2014/10/29 22:34:06 Done.
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

Powered by Google App Engine
This is Rietveld 408576698