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 CONTENT_RENDERER_PRESENTATION_PRESENTATION_DISPATCHER_H_ | 5 #ifndef CONTENT_RENDERER_PRESENTATION_PRESENTATION_DISPATCHER_H_ |
6 #define CONTENT_RENDERER_PRESENTATION_PRESENTATION_DISPATCHER_H_ | 6 #define CONTENT_RENDERER_PRESENTATION_PRESENTATION_DISPATCHER_H_ |
7 | 7 |
8 #include <queue> | 8 #include <queue> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 // presentation::PresentationServiceClient | 93 // presentation::PresentationServiceClient |
94 void OnScreenAvailabilityNotSupported(const mojo::String& url) override; | 94 void OnScreenAvailabilityNotSupported(const mojo::String& url) override; |
95 void OnScreenAvailabilityUpdated(const mojo::String& url, | 95 void OnScreenAvailabilityUpdated(const mojo::String& url, |
96 bool available) override; | 96 bool available) override; |
97 void OnSessionStateChanged( | 97 void OnSessionStateChanged( |
98 presentation::PresentationSessionInfoPtr session_info, | 98 presentation::PresentationSessionInfoPtr session_info, |
99 presentation::PresentationConnectionState new_state) override; | 99 presentation::PresentationConnectionState new_state) override; |
100 void OnSessionMessagesReceived( | 100 void OnSessionMessagesReceived( |
101 presentation::PresentationSessionInfoPtr session_info, | 101 presentation::PresentationSessionInfoPtr session_info, |
102 mojo::Array<presentation::SessionMessagePtr> messages) override; | 102 mojo::Array<presentation::SessionMessagePtr> messages) override; |
| 103 void OnDefaultSessionStarted( |
| 104 presentation::PresentationSessionInfoPtr session_info) override; |
103 | 105 |
104 void OnSessionCreated( | 106 void OnSessionCreated( |
105 blink::WebPresentationConnectionClientCallbacks* callback, | 107 blink::WebPresentationConnectionClientCallbacks* callback, |
106 presentation::PresentationSessionInfoPtr session_info, | 108 presentation::PresentationSessionInfoPtr session_info, |
107 presentation::PresentationErrorPtr error); | 109 presentation::PresentationErrorPtr error); |
108 void OnDefaultSessionStarted( | |
109 presentation::PresentationSessionInfoPtr session_info); | |
110 | 110 |
111 // Call to PresentationService to send the message in |request|. | 111 // Call to PresentationService to send the message in |request|. |
112 // |session_info| and |message| of |reuqest| will be consumed. | 112 // |session_info| and |message| of |reuqest| will be consumed. |
113 // |HandleSendMessageRequests| will be invoked after the send is attempted. | 113 // |HandleSendMessageRequests| will be invoked after the send is attempted. |
114 void DoSendMessage(SendMessageRequest* request); | 114 void DoSendMessage(SendMessageRequest* request); |
115 void HandleSendMessageRequests(bool success); | 115 void HandleSendMessageRequests(bool success); |
116 | 116 |
117 void ConnectToPresentationServiceIfNeeded(); | 117 void ConnectToPresentationServiceIfNeeded(); |
118 | 118 |
119 void UpdateListeningState(); | 119 void UpdateListeningState(); |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 // Updates the listening state of availability for |status| and notifies the | 158 // Updates the listening state of availability for |status| and notifies the |
159 // client. | 159 // client. |
160 void UpdateListeningState(AvailabilityStatus* status); | 160 void UpdateListeningState(AvailabilityStatus* status); |
161 | 161 |
162 DISALLOW_COPY_AND_ASSIGN(PresentationDispatcher); | 162 DISALLOW_COPY_AND_ASSIGN(PresentationDispatcher); |
163 }; | 163 }; |
164 | 164 |
165 } // namespace content | 165 } // namespace content |
166 | 166 |
167 #endif // CONTENT_RENDERER_PRESENTATION_PRESENTATION_DISPATCHER_H_ | 167 #endif // CONTENT_RENDERER_PRESENTATION_PRESENTATION_DISPATCHER_H_ |
OLD | NEW |