| 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 <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 const StreamDeviceInfo& device_info) override; | 80 const StreamDeviceInfo& device_info) override; |
| 81 void OnDevicesEnumerated(int request_id, | 81 void OnDevicesEnumerated(int request_id, |
| 82 const StreamDeviceInfoArray& device_array) override; | 82 const StreamDeviceInfoArray& device_array) override; |
| 83 void OnDeviceOpened(int request_id, | 83 void OnDeviceOpened(int request_id, |
| 84 const std::string& label, | 84 const std::string& label, |
| 85 const StreamDeviceInfo& device_info) override; | 85 const StreamDeviceInfo& device_info) override; |
| 86 void OnDeviceOpenFailed(int request_id) override; | 86 void OnDeviceOpenFailed(int request_id) override; |
| 87 void OnDevicesChanged() override; | 87 void OnDevicesChanged() override; |
| 88 | 88 |
| 89 // RenderFrameObserver override | 89 // RenderFrameObserver override |
| 90 void FrameWillClose() override; | 90 void WillCommitProvisionalLoad() override; |
| 91 | 91 |
| 92 protected: | 92 protected: |
| 93 // Called when |source| has been stopped from JavaScript. | 93 // Called when |source| has been stopped from JavaScript. |
| 94 void OnLocalSourceStopped(const blink::WebMediaStreamSource& source); | 94 void OnLocalSourceStopped(const blink::WebMediaStreamSource& source); |
| 95 | 95 |
| 96 // These methods are virtual for test purposes. A test can override them to | 96 // These methods are virtual for test purposes. A test can override them to |
| 97 // test requesting local media streams. The function notifies WebKit that the | 97 // test requesting local media streams. The function notifies WebKit that the |
| 98 // |request| have completed. | 98 // |request| have completed. |
| 99 virtual void GetUserMediaRequestSucceeded( | 99 virtual void GetUserMediaRequestSucceeded( |
| 100 const blink::WebMediaStream& stream, | 100 const blink::WebMediaStream& stream, |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 // Note: This member must be the last to ensure all outstanding weak pointers | 271 // Note: This member must be the last to ensure all outstanding weak pointers |
| 272 // are invalidated first. | 272 // are invalidated first. |
| 273 base::WeakPtrFactory<UserMediaClientImpl> weak_factory_; | 273 base::WeakPtrFactory<UserMediaClientImpl> weak_factory_; |
| 274 | 274 |
| 275 DISALLOW_COPY_AND_ASSIGN(UserMediaClientImpl); | 275 DISALLOW_COPY_AND_ASSIGN(UserMediaClientImpl); |
| 276 }; | 276 }; |
| 277 | 277 |
| 278 } // namespace content | 278 } // namespace content |
| 279 | 279 |
| 280 #endif // CONTENT_RENDERER_MEDIA_USER_MEDIA_CLIENT_IMPL_H_ | 280 #endif // CONTENT_RENDERER_MEDIA_USER_MEDIA_CLIENT_IMPL_H_ |
| OLD | NEW |