OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_MEDIA_USER_MEDIA_CLIENT_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_USER_MEDIA_CLIENT_IMPL_H_ |
6 #define CONTENT_RENDERER_MEDIA_USER_MEDIA_CLIENT_IMPL_H_ | 6 #define CONTENT_RENDERER_MEDIA_USER_MEDIA_CLIENT_IMPL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 | 89 |
90 protected: | 90 protected: |
91 // Called when |source| has been stopped from JavaScript. | 91 // Called when |source| has been stopped from JavaScript. |
92 void OnLocalSourceStopped(const blink::WebMediaStreamSource& source); | 92 void OnLocalSourceStopped(const blink::WebMediaStreamSource& source); |
93 | 93 |
94 // These methods are virtual for test purposes. A test can override them to | 94 // These methods are virtual for test purposes. A test can override them to |
95 // test requesting local media streams. The function notifies WebKit that the | 95 // test requesting local media streams. The function notifies WebKit that the |
96 // |request| have completed. | 96 // |request| have completed. |
97 virtual void GetUserMediaRequestSucceeded( | 97 virtual void GetUserMediaRequestSucceeded( |
98 const blink::WebMediaStream& stream, | 98 const blink::WebMediaStream& stream, |
99 blink::WebUserMediaRequest* request_info); | 99 blink::WebUserMediaRequest request_info); |
| 100 void DelayedGetUserMediaRequestSucceeded( |
| 101 const blink::WebMediaStream& stream, |
| 102 blink::WebUserMediaRequest request_info); |
100 virtual void GetUserMediaRequestFailed( | 103 virtual void GetUserMediaRequestFailed( |
101 blink::WebUserMediaRequest* request_info, | 104 blink::WebUserMediaRequest request_info, |
102 MediaStreamRequestResult result, | 105 MediaStreamRequestResult result, |
103 const blink::WebString& result_name); | 106 const blink::WebString& result_name); |
| 107 void DelayedGetUserMediaRequestFailed( |
| 108 blink::WebUserMediaRequest request_info, |
| 109 MediaStreamRequestResult result, |
| 110 const blink::WebString& result_name); |
| 111 |
104 virtual void EnumerateDevicesSucceded( | 112 virtual void EnumerateDevicesSucceded( |
105 blink::WebMediaDevicesRequest* request, | 113 blink::WebMediaDevicesRequest* request, |
106 blink::WebVector<blink::WebMediaDeviceInfo>& devices); | 114 blink::WebVector<blink::WebMediaDeviceInfo>& devices); |
107 virtual void EnumerateSourcesSucceded( | 115 virtual void EnumerateSourcesSucceded( |
108 blink::WebMediaStreamTrackSourcesRequest* request, | 116 blink::WebMediaStreamTrackSourcesRequest* request, |
109 blink::WebVector<blink::WebSourceInfo>& sources); | 117 blink::WebVector<blink::WebSourceInfo>& sources); |
110 // Creates a MediaStreamVideoSource object. | 118 // Creates a MediaStreamVideoSource object. |
111 // This is virtual for test purposes. | 119 // This is virtual for test purposes. |
112 virtual MediaStreamVideoSource* CreateVideoSource( | 120 virtual MediaStreamVideoSource* CreateVideoSource( |
113 const StreamDeviceInfo& device, | 121 const StreamDeviceInfo& device, |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 // Note: This member must be the last to ensure all outstanding weak pointers | 254 // Note: This member must be the last to ensure all outstanding weak pointers |
247 // are invalidated first. | 255 // are invalidated first. |
248 base::WeakPtrFactory<UserMediaClientImpl> weak_factory_; | 256 base::WeakPtrFactory<UserMediaClientImpl> weak_factory_; |
249 | 257 |
250 DISALLOW_COPY_AND_ASSIGN(UserMediaClientImpl); | 258 DISALLOW_COPY_AND_ASSIGN(UserMediaClientImpl); |
251 }; | 259 }; |
252 | 260 |
253 } // namespace content | 261 } // namespace content |
254 | 262 |
255 #endif // CONTENT_RENDERER_MEDIA_USER_MEDIA_CLIENT_IMPL_H_ | 263 #endif // CONTENT_RENDERER_MEDIA_USER_MEDIA_CLIENT_IMPL_H_ |
OLD | NEW |