| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_UI_PROXY_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_UI_PROXY_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_UI_PROXY_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_UI_PROXY_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
| 12 #include "content/public/browser/browser_thread.h" |
| 12 #include "content/public/common/media_stream_request.h" | 13 #include "content/public/common/media_stream_request.h" |
| 13 | 14 |
| 14 namespace content { | 15 namespace content { |
| 15 | 16 |
| 16 class RenderFrameHostDelegate; | 17 class RenderFrameHostDelegate; |
| 17 | 18 |
| 18 // MediaStreamUIProxy proxies calls to media stream UI between IO thread and UI | 19 // MediaStreamUIProxy proxies calls to media stream UI between IO thread and UI |
| 19 // thread. One instance of this class is create per MediaStream object. It must | 20 // thread. One instance of this class is create per MediaStream object. It must |
| 20 // be created, used and destroyed on IO thread. | 21 // be created, used and destroyed on IO thread. |
| 21 class CONTENT_EXPORT MediaStreamUIProxy { | 22 class CONTENT_EXPORT MediaStreamUIProxy { |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 friend class Core; | 59 friend class Core; |
| 59 friend class FakeMediaStreamUIProxy; | 60 friend class FakeMediaStreamUIProxy; |
| 60 | 61 |
| 61 void ProcessAccessRequestResponse( | 62 void ProcessAccessRequestResponse( |
| 62 const MediaStreamDevices& devices, | 63 const MediaStreamDevices& devices, |
| 63 content::MediaStreamRequestResult result); | 64 content::MediaStreamRequestResult result); |
| 64 void ProcessStopRequestFromUI(); | 65 void ProcessStopRequestFromUI(); |
| 65 void OnWindowId(const WindowIdCallback& window_id_callback, | 66 void OnWindowId(const WindowIdCallback& window_id_callback, |
| 66 gfx::NativeViewId* window_id); | 67 gfx::NativeViewId* window_id); |
| 67 | 68 |
| 68 scoped_ptr<Core> core_; | 69 scoped_ptr<Core, content::BrowserThread::DeleteOnUIThread> core_; |
| 69 ResponseCallback response_callback_; | 70 ResponseCallback response_callback_; |
| 70 base::Closure stop_callback_; | 71 base::Closure stop_callback_; |
| 71 | 72 |
| 72 base::WeakPtrFactory<MediaStreamUIProxy> weak_factory_; | 73 base::WeakPtrFactory<MediaStreamUIProxy> weak_factory_; |
| 73 | 74 |
| 74 DISALLOW_COPY_AND_ASSIGN(MediaStreamUIProxy); | 75 DISALLOW_COPY_AND_ASSIGN(MediaStreamUIProxy); |
| 75 }; | 76 }; |
| 76 | 77 |
| 77 class CONTENT_EXPORT FakeMediaStreamUIProxy : public MediaStreamUIProxy { | 78 class CONTENT_EXPORT FakeMediaStreamUIProxy : public MediaStreamUIProxy { |
| 78 public: | 79 public: |
| (...skipping 11 matching lines...) Expand all Loading... |
| 90 | 91 |
| 91 private: | 92 private: |
| 92 MediaStreamDevices devices_; | 93 MediaStreamDevices devices_; |
| 93 | 94 |
| 94 DISALLOW_COPY_AND_ASSIGN(FakeMediaStreamUIProxy); | 95 DISALLOW_COPY_AND_ASSIGN(FakeMediaStreamUIProxy); |
| 95 }; | 96 }; |
| 96 | 97 |
| 97 } // namespace content | 98 } // namespace content |
| 98 | 99 |
| 99 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_UI_PROXY_H_ | 100 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_UI_PROXY_H_ |
| OLD | NEW |