| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 PresentationController_h | 5 #ifndef PresentationController_h |
| 6 #define PresentationController_h | 6 #define PresentationController_h |
| 7 | 7 |
| 8 #include "core/frame/LocalFrameLifecycleObserver.h" | 8 #include "core/frame/LocalFrameLifecycleObserver.h" |
| 9 #include "modules/ModulesExport.h" | 9 #include "modules/ModulesExport.h" |
| 10 #include "modules/presentation/Presentation.h" | 10 #include "modules/presentation/Presentation.h" |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 // Called when the first listener was added to or the last listener was remo
ved from the | 51 // Called when the first listener was added to or the last listener was remo
ved from the |
| 52 // |availablechange| event. | 52 // |availablechange| event. |
| 53 void updateAvailableChangeWatched(bool watched); | 53 void updateAvailableChangeWatched(bool watched); |
| 54 | 54 |
| 55 // Called when the frame wants to start a new presentation. | 55 // Called when the frame wants to start a new presentation. |
| 56 void startSession(const String& presentationUrl, const String& presentationI
d, WebPresentationSessionClientCallbacks*); | 56 void startSession(const String& presentationUrl, const String& presentationI
d, WebPresentationSessionClientCallbacks*); |
| 57 | 57 |
| 58 // Called when the frame wants to join an existing presentation. | 58 // Called when the frame wants to join an existing presentation. |
| 59 void joinSession(const String& presentationUrl, const String& presentationId
, WebPresentationSessionClientCallbacks*); | 59 void joinSession(const String& presentationUrl, const String& presentationId
, WebPresentationSessionClientCallbacks*); |
| 60 | 60 |
| 61 // Called when the frame wants to send String message to an existing present
ation. | 61 // Called when the frame wants to send String message to an existing present
ation session. |
| 62 void send(const String& presentationUrl, const String& presentationId, const
String& message); | 62 void send(const String& presentationUrl, const String& presentationId, const
String& message); |
| 63 | 63 |
| 64 // Called when the frame wants to send ArrayBuffer/View data to an existing
presentation. | 64 // Called when the frame wants to send ArrayBuffer/View data to an existing
presentation session. |
| 65 void send(const String& presentationUrl, const String& presentationId, const
uint8_t* data, size_t length); | 65 void send(const String& presentationUrl, const String& presentationId, const
uint8_t* data, size_t length); |
| 66 | 66 |
| 67 // Called when the frame want to send Blob data to an existing presentation
session. |
| 68 void sendBlobData(const String& presentationUrl, const String& presentationI
d, const uint8_t* data, size_t length); |
| 69 |
| 67 // Called when the frame wants to close an existing presentation. | 70 // Called when the frame wants to close an existing presentation. |
| 68 void closeSession(const String& url, const String& presentationId); | 71 void closeSession(const String& url, const String& presentationId); |
| 69 | 72 |
| 70 // Connects the |Presentation| object with this controller. | 73 // Connects the |Presentation| object with this controller. |
| 71 void setPresentation(Presentation*); | 74 void setPresentation(Presentation*); |
| 72 | 75 |
| 73 private: | 76 private: |
| 74 PresentationController(LocalFrame&, WebPresentationClient*); | 77 PresentationController(LocalFrame&, WebPresentationClient*); |
| 75 | 78 |
| 76 // Implementation of LocalFrameLifecycleObserver. | 79 // Implementation of LocalFrameLifecycleObserver. |
| 77 virtual void willDetachFrameHost() override; | 80 virtual void willDetachFrameHost() override; |
| 78 | 81 |
| 79 WebPresentationClient* m_client; | 82 WebPresentationClient* m_client; |
| 80 PersistentWillBeMember<Presentation> m_presentation; | 83 PersistentWillBeMember<Presentation> m_presentation; |
| 81 }; | 84 }; |
| 82 | 85 |
| 83 } // namespace blink | 86 } // namespace blink |
| 84 | 87 |
| 85 #endif // PresentationController_h | 88 #endif // PresentationController_h |
| OLD | NEW |