| 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 // MediaStreamManager is used to open/enumerate media capture devices (video | 5 // MediaStreamManager is used to open/enumerate media capture devices (video |
| 6 // supported now). Call flow: | 6 // supported now). Call flow: |
| 7 // 1. GenerateStream is called when a render process wants to use a capture | 7 // 1. GenerateStream is called when a render process wants to use a capture |
| 8 // device. | 8 // device. |
| 9 // 2. MediaStreamManager will ask MediaStreamUIController for permission to | 9 // 2. MediaStreamManager will ask MediaStreamUIController for permission to |
| 10 // use devices and for which device to use. | 10 // use devices and for which device to use. |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 // GenerateStream opens new media devices according to |components|. It | 90 // GenerateStream opens new media devices according to |components|. It |
| 91 // creates a new request which is identified by a unique string that's | 91 // creates a new request which is identified by a unique string that's |
| 92 // returned to the caller. |render_process_id| and |render_view_id| refer to | 92 // returned to the caller. |render_process_id| and |render_view_id| refer to |
| 93 // the view where the infobar will appear to the user. | 93 // the view where the infobar will appear to the user. |
| 94 void GenerateStream(MediaStreamRequester* requester, | 94 void GenerateStream(MediaStreamRequester* requester, |
| 95 int render_process_id, | 95 int render_process_id, |
| 96 int render_view_id, | 96 int render_view_id, |
| 97 const ResourceContext::SaltCallback& sc, | 97 const ResourceContext::SaltCallback& sc, |
| 98 int page_request_id, | 98 int page_request_id, |
| 99 const StreamOptions& components, | 99 const StreamOptions& components, |
| 100 const GURL& security_origin); | 100 const GURL& security_origin, |
| 101 bool user_gesture); |
| 101 | 102 |
| 102 void CancelRequest(int render_process_id, | 103 void CancelRequest(int render_process_id, |
| 103 int render_view_id, | 104 int render_view_id, |
| 104 int page_request_id); | 105 int page_request_id); |
| 105 | 106 |
| 106 // Cancel an open request identified by |label|. | 107 // Cancel an open request identified by |label|. |
| 107 virtual void CancelRequest(const std::string& label); | 108 virtual void CancelRequest(const std::string& label); |
| 108 | 109 |
| 109 // Cancel all requests for the given |render_process_id|. | 110 // Cancel all requests for the given |render_process_id|. |
| 110 void CancelAllRequests(int render_process_id); | 111 void CancelAllRequests(int render_process_id); |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 | 364 |
| 364 bool use_fake_ui_; | 365 bool use_fake_ui_; |
| 365 scoped_ptr<FakeMediaStreamUIProxy> fake_ui_; | 366 scoped_ptr<FakeMediaStreamUIProxy> fake_ui_; |
| 366 | 367 |
| 367 DISALLOW_COPY_AND_ASSIGN(MediaStreamManager); | 368 DISALLOW_COPY_AND_ASSIGN(MediaStreamManager); |
| 368 }; | 369 }; |
| 369 | 370 |
| 370 } // namespace content | 371 } // namespace content |
| 371 | 372 |
| 372 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_MANAGER_H_ | 373 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_MANAGER_H_ |
| OLD | NEW |