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

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

Issue 1020303004: [PresentationAPI] Plumbing |onstatechange| event for the PresentationSession from Blink to platform/ (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 9 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/PresentationSession.h b/Source/modules/presentation/PresentationSession.h
index e3050dc89c5a0ebc5b6af2e8949b68a74d4ee80f..482cc1a61e11b0e325e37f7b3780b5449b48f32e 100644
--- a/Source/modules/presentation/PresentationSession.h
+++ b/Source/modules/presentation/PresentationSession.h
@@ -7,15 +7,14 @@
#include "core/events/EventTarget.h"
#include "core/frame/DOMWindowProperty.h"
+#include "public/platform/WebString.h"
+#include "public/platform/modules/presentation/WebPresentationSessionClient.h"
mlamouri (slow - plz ping) 2015/03/23 17:54:16 With enum class for the enum, you can forward decl
whywhat 2015/03/23 21:12:16 I'll try that but if I have to pass the enum by re
#include "wtf/text/AtomicString.h"
-#include "wtf/text/WTFString.h"
namespace blink {
class Presentation;
class PresentationController;
-class WebPresentationSessionClient;
-class WebString;
class PresentationSession final
: public RefCountedGarbageCollectedEventTargetWithInlineData<PresentationSession>
@@ -34,8 +33,8 @@ public:
DECLARE_VIRTUAL_TRACE();
- const String& id() const { return m_id; }
- const AtomicString& state() const { return m_state; }
+ const String id() const { return m_id; }
+ const AtomicString state() const;
void postMessage(const String& message);
void close();
@@ -43,6 +42,12 @@ public:
DEFINE_ATTRIBUTE_EVENT_LISTENER(message);
DEFINE_ATTRIBUTE_EVENT_LISTENER(statechange);
+ // Returns true if and only if the WebPresentationSessionClient represents this session.
Peter Beverloo 2015/03/20 19:07:40 "matches" sounds like something that could be a pa
mlamouri (slow - plz ping) 2015/03/23 17:54:16 A PresentationSession being equal to a Presentatio
+ bool matches(WebPresentationSessionClient*) const;
+
+ // Notifies the session about its state change.
+ void didChangeState(WebPresentationSessionClient::SessionState);
+
private:
PresentationSession(LocalFrame*, const WebString& id, const WebString& url);
@@ -51,9 +56,9 @@ private:
// detached from the document.
PresentationController* presentationController();
- String m_id;
- String m_url;
- AtomicString m_state;
+ WebString m_id;
+ WebString m_url;
+ WebPresentationSessionClient::SessionState m_state;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698