Index: Source/modules/presentation/Presentation.h |
diff --git a/Source/modules/presentation/Presentation.h b/Source/modules/presentation/Presentation.h |
index f075f735defa029934d85005b0dfbde8dcd4e0ec..bc978f820db32ae3d9598e5f832b271c4164b428 100644 |
--- a/Source/modules/presentation/Presentation.h |
+++ b/Source/modules/presentation/Presentation.h |
@@ -12,8 +12,11 @@ |
namespace blink { |
+class PresentationController; |
class ScriptState; |
+// Implements the main entry point of the Presentation API corresponding to the Presentation.idl |
+// See http://w3c.github.io/presentation-api/#navigatorpresentation for details. |
class Presentation final |
: public RefCountedGarbageCollectedEventTargetWithInlineData<Presentation> |
, public ContextLifecycleObserver { |
@@ -37,9 +40,21 @@ public: |
DEFINE_ATTRIBUTE_EVENT_LISTENER(availablechange); |
+ // The embedder needs to keep track if anything is listening to the event so it could stop the |
+ // might be expensive screen discovery process. |
+ virtual bool addEventListener(const AtomicString& eventType, PassRefPtr<EventListener>, bool useCapture) override; |
+ virtual bool removeEventListener(const AtomicString& eventType, PassRefPtr<EventListener>, bool useCapture) override; |
+ virtual void removeAllEventListeners() override; |
+ |
+ // Called when the |availablechange| event needs to be fired. |
+ void didChangeAvailability(bool available); |
private: |
explicit Presentation(ExecutionContext*); |
+ // Returns the |PresentationController| object associated with the frame |Presentation| corresponds to. |
+ // Must never return null. |
+ PresentationController* presentationController(); |
mlamouri (slow - plz ping)
2015/01/22 23:18:04
Are you sure that this must _never_ return nullptr
whywhat
2015/01/23 19:20:19
Done.
|
+ |
Member<PresentationSession> m_session; |
}; |