Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef PresentationSession_h | 5 #ifndef PresentationSession_h |
| 6 #define PresentationSession_h | 6 #define PresentationSession_h |
| 7 | 7 |
| 8 #include "core/events/EventTarget.h" | 8 #include "core/events/EventTarget.h" |
| 9 #include "core/frame/DOMWindowProperty.h" | 9 #include "core/frame/DOMWindowProperty.h" |
| 10 #include "wtf/text/AtomicString.h" | 10 #include "wtf/text/AtomicString.h" |
| 11 #include "wtf/text/WTFString.h" | 11 #include "wtf/text/WTFString.h" |
| 12 | 12 |
| 13 namespace blink { | 13 namespace blink { |
| 14 | 14 |
| 15 class Presentation; | 15 class Presentation; |
| 16 class PresentationController; | |
| 16 class WebPresentationSessionClient; | 17 class WebPresentationSessionClient; |
| 17 class WebString; | 18 class WebString; |
| 18 | 19 |
| 19 class PresentationSession final | 20 class PresentationSession final |
| 20 : public RefCountedGarbageCollectedEventTargetWithInlineData<PresentationSes sion> | 21 : public RefCountedGarbageCollectedEventTargetWithInlineData<PresentationSes sion> |
| 21 , public DOMWindowProperty { | 22 , public DOMWindowProperty { |
| 22 DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(RefCountedGarbageCollected<P resentationSession>); | 23 DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(RefCountedGarbageCollected<P resentationSession>); |
| 23 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(PresentationSession); | 24 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(PresentationSession); |
| 24 DEFINE_WRAPPERTYPEINFO(); | 25 DEFINE_WRAPPERTYPEINFO(); |
| 25 public: | 26 public: |
| (...skipping 12 matching lines...) Expand all Loading... | |
| 38 | 39 |
| 39 void postMessage(const String& message); | 40 void postMessage(const String& message); |
| 40 void close(); | 41 void close(); |
| 41 | 42 |
| 42 DEFINE_ATTRIBUTE_EVENT_LISTENER(message); | 43 DEFINE_ATTRIBUTE_EVENT_LISTENER(message); |
| 43 DEFINE_ATTRIBUTE_EVENT_LISTENER(statechange); | 44 DEFINE_ATTRIBUTE_EVENT_LISTENER(statechange); |
| 44 | 45 |
| 45 private: | 46 private: |
| 46 PresentationSession(LocalFrame*, const WebString& id); | 47 PresentationSession(LocalFrame*, const WebString& id); |
| 47 | 48 |
| 49 // Returns the |PresentationController| object associated with the frame |Pr esentation| corresponds to. | |
|
whywhat
2015/03/17 23:35:19
nit: Although Blink doesn't yet have line length l
haibinlu
2015/03/18 00:58:23
Done.
| |
| 50 // Can return |nullptr| if the frame is detached from the document. | |
| 51 PresentationController* presentationController(); | |
| 52 | |
| 48 String m_id; | 53 String m_id; |
| 49 AtomicString m_state; | 54 AtomicString m_state; |
| 50 }; | 55 }; |
| 51 | 56 |
| 52 } // namespace blink | 57 } // namespace blink |
| 53 | 58 |
| 54 #endif // PresentationSession_h | 59 #endif // PresentationSession_h |
| OLD | NEW |