| 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 "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/memory/scoped_vector.h" | 9 #include "base/memory/scoped_vector.h" |
| 10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 virtual void updateAvailableChangeWatched(bool watched); | 35 virtual void updateAvailableChangeWatched(bool watched); |
| 36 virtual void startSession( | 36 virtual void startSession( |
| 37 const blink::WebString& presentationUrl, | 37 const blink::WebString& presentationUrl, |
| 38 const blink::WebString& presentationId, | 38 const blink::WebString& presentationId, |
| 39 blink::WebPresentationSessionClientCallbacks* callback); | 39 blink::WebPresentationSessionClientCallbacks* callback); |
| 40 virtual void joinSession( | 40 virtual void joinSession( |
| 41 const blink::WebString& presentationUrl, | 41 const blink::WebString& presentationUrl, |
| 42 const blink::WebString& presentationId, | 42 const blink::WebString& presentationId, |
| 43 blink::WebPresentationSessionClientCallbacks* callback); | 43 blink::WebPresentationSessionClientCallbacks* callback); |
| 44 | 44 |
| 45 void OnScreenAvailabilityChanged(bool available); | 45 void OnScreenAvailabilityChanged( |
| 46 const std::string& presentation_url, |
| 47 bool available); |
| 46 void OnSessionCreated( | 48 void OnSessionCreated( |
| 47 blink::WebPresentationSessionClientCallbacks* callback, | 49 blink::WebPresentationSessionClientCallbacks* callback, |
| 48 presentation::PresentationSessionInfoPtr session_info, | 50 presentation::PresentationSessionInfoPtr session_info, |
| 49 presentation::PresentationErrorPtr error); | 51 presentation::PresentationErrorPtr error); |
| 50 | 52 |
| 51 void ConnectToPresentationServiceIfNeeded(); | 53 void ConnectToPresentationServiceIfNeeded(); |
| 52 | 54 |
| 55 void DoUpdateAvailableChangeWatched( |
| 56 const std::string& presentation_url, |
| 57 bool watched); |
| 58 |
| 53 // Used as a weak reference. Can be null since lifetime is bound to the frame. | 59 // Used as a weak reference. Can be null since lifetime is bound to the frame. |
| 54 blink::WebPresentationController* controller_; | 60 blink::WebPresentationController* controller_; |
| 55 presentation::PresentationServicePtr presentation_service_; | 61 presentation::PresentationServicePtr presentation_service_; |
| 56 | 62 |
| 57 // Wrappers around the PresentationSessionPtr corresponding to each Javascript | 63 // Wrappers around the PresentationSessionPtr corresponding to each Javascript |
| 58 // PresentationSession object passed back to the frame. | 64 // PresentationSession object passed back to the frame. |
| 59 // TODO(avayvod): Switch to base::IDMap when the lookup by presentation id is | 65 // TODO(avayvod): Switch to base::IDMap when the lookup by presentation id is |
| 60 // needed. | 66 // needed. |
| 61 using PresentationSessionDispatchers = | 67 using PresentationSessionDispatchers = |
| 62 ScopedVector<PresentationSessionDispatcher>; | 68 ScopedVector<PresentationSessionDispatcher>; |
| 63 PresentationSessionDispatchers presentation_session_dispatchers_; | 69 PresentationSessionDispatchers presentation_session_dispatchers_; |
| 64 }; | 70 }; |
| 65 | 71 |
| 66 } // namespace content | 72 } // namespace content |
| 67 | 73 |
| 68 #endif // CONTENT_RENDERER_PRESENTATION_PRESENTATION_DISPATCHER_H_ | 74 #endif // CONTENT_RENDERER_PRESENTATION_PRESENTATION_DISPATCHER_H_ |
| OLD | NEW |