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 29 matching lines...) Expand all Loading... |
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(bool available); |
46 void OnSessionCreated( | 46 void OnSessionCreated( |
47 blink::WebPresentationSessionClientCallbacks* callback, | 47 blink::WebPresentationSessionClientCallbacks* callback, |
48 presentation::PresentationSessionInfoPtr session_info, | 48 presentation::PresentationSessionInfoPtr session_info, |
49 presentation::PresentationErrorPtr error); | 49 presentation::PresentationErrorPtr error); |
| 50 void OnDefaultSessionStarted( |
| 51 presentation::PresentationSessionInfoPtr session_info); |
50 | 52 |
51 void ConnectToPresentationServiceIfNeeded(); | 53 void ConnectToPresentationServiceIfNeeded(); |
52 | 54 |
53 // Used as a weak reference. Can be null since lifetime is bound to the frame. | 55 // Used as a weak reference. Can be null since lifetime is bound to the frame. |
54 blink::WebPresentationController* controller_; | 56 blink::WebPresentationController* controller_; |
55 presentation::PresentationServicePtr presentation_service_; | 57 presentation::PresentationServicePtr presentation_service_; |
56 | 58 |
57 // Wrappers around the PresentationSessionPtr corresponding to each Javascript | 59 // Wrappers around the PresentationSessionPtr corresponding to each Javascript |
58 // PresentationSession object passed back to the frame. | 60 // PresentationSession object passed back to the frame. |
59 // TODO(avayvod): Switch to base::IDMap when the lookup by presentation id is | 61 // TODO(avayvod): Switch to base::IDMap when the lookup by presentation id is |
60 // needed. | 62 // needed. |
61 using PresentationSessionDispatchers = | 63 using PresentationSessionDispatchers = |
62 ScopedVector<PresentationSessionDispatcher>; | 64 ScopedVector<PresentationSessionDispatcher>; |
63 PresentationSessionDispatchers presentation_session_dispatchers_; | 65 PresentationSessionDispatchers presentation_session_dispatchers_; |
64 }; | 66 }; |
65 | 67 |
66 } // namespace content | 68 } // namespace content |
67 | 69 |
68 #endif // CONTENT_RENDERER_PRESENTATION_PRESENTATION_DISPATCHER_H_ | 70 #endif // CONTENT_RENDERER_PRESENTATION_PRESENTATION_DISPATCHER_H_ |
OLD | NEW |