Chromium Code Reviews| Index: Source/modules/presentation/PresentationSession.h |
| diff --git a/Source/modules/presentation/PresentationSession.h b/Source/modules/presentation/PresentationSession.h |
| index e3050dc89c5a0ebc5b6af2e8949b68a74d4ee80f..c2778d588dc3073f9262c595dca9d3b9a1a60e10 100644 |
| --- a/Source/modules/presentation/PresentationSession.h |
| +++ b/Source/modules/presentation/PresentationSession.h |
| @@ -7,15 +7,17 @@ |
| #include "core/events/EventTarget.h" |
| #include "core/frame/DOMWindowProperty.h" |
| -#include "wtf/text/AtomicString.h" |
| -#include "wtf/text/WTFString.h" |
| +#include "public/platform/WebString.h" |
| +#include "public/platform/modules/presentation/WebPresentationSessionClient.h" |
| + |
| +namespace WTF { |
| +class AtomicString; |
| +} // namespace WTF |
| namespace blink { |
| class Presentation; |
| class PresentationController; |
| -class WebPresentationSessionClient; |
| -class WebString; |
| class PresentationSession final |
| : public RefCountedGarbageCollectedEventTargetWithInlineData<PresentationSession> |
| @@ -34,8 +36,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 WTF::AtomicString& state() const; |
| void postMessage(const String& message); |
| void close(); |
| @@ -43,6 +45,12 @@ public: |
| DEFINE_ATTRIBUTE_EVENT_LISTENER(message); |
| DEFINE_ATTRIBUTE_EVENT_LISTENER(statechange); |
| + // Returns true if and only if the WebPresentationSessionClient represents this session. |
| + bool matches(WebPresentationSessionClient*) const; |
| + |
| + // Notifies the session about its state change. |
| + void didChangeState(WebPresentationSessionState); |
| + |
| private: |
| PresentationSession(LocalFrame*, const WebString& id, const WebString& url); |
| @@ -51,9 +59,9 @@ private: |
| // detached from the document. |
| PresentationController* presentationController(); |
| - String m_id; |
| - String m_url; |
| - AtomicString m_state; |
| + WebString m_id; |
| + WebString m_url; |
|
mlamouri (slow - plz ping)
2015/03/23 21:25:48
I think you should keep String here. WebString are
whywhat
2015/03/23 21:37:45
Done.
|
| + WebPresentationSessionState m_state; |
| }; |
| } // namespace blink |