| 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 #include <string> | 5 #include <string> |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
| 9 #include "content/browser/browser_thread_impl.h" | 9 #include "content/browser/browser_thread_impl.h" |
| 10 #include "content/browser/renderer_host/media/media_stream_ui_controller.h" | 10 #include "content/browser/renderer_host/media/media_stream_ui_controller.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 int dummy_render_process_id = 1; | 55 int dummy_render_process_id = 1; |
| 56 int dummy_render_view_id = 1; | 56 int dummy_render_view_id = 1; |
| 57 StreamOptions components( | 57 StreamOptions components( |
| 58 audio ? MEDIA_DEVICE_AUDIO_CAPTURE : MEDIA_NO_SERVICE, | 58 audio ? MEDIA_DEVICE_AUDIO_CAPTURE : MEDIA_NO_SERVICE, |
| 59 video ? MEDIA_DEVICE_VIDEO_CAPTURE : MEDIA_NO_SERVICE); | 59 video ? MEDIA_DEVICE_VIDEO_CAPTURE : MEDIA_NO_SERVICE); |
| 60 GURL security_origin; | 60 GURL security_origin; |
| 61 ui_controller_->MakeUIRequest(label, | 61 ui_controller_->MakeUIRequest(label, |
| 62 dummy_render_process_id, | 62 dummy_render_process_id, |
| 63 dummy_render_view_id, | 63 dummy_render_view_id, |
| 64 components, | 64 components, |
| 65 security_origin); | 65 security_origin, |
| 66 MEDIA_GENERATE_STREAM); |
| 66 } | 67 } |
| 67 | 68 |
| 68 scoped_ptr<MessageLoop> message_loop_; | 69 scoped_ptr<MessageLoop> message_loop_; |
| 69 scoped_ptr<BrowserThreadImpl> ui_thread_; | 70 scoped_ptr<BrowserThreadImpl> ui_thread_; |
| 70 scoped_ptr<BrowserThreadImpl> io_thread_; | 71 scoped_ptr<BrowserThreadImpl> io_thread_; |
| 71 scoped_ptr<MediaStreamUIController> ui_controller_; | 72 scoped_ptr<MediaStreamUIController> ui_controller_; |
| 72 | 73 |
| 73 private: | 74 private: |
| 74 DISALLOW_COPY_AND_ASSIGN(MediaStreamDeviceUIControllerTest); | 75 DISALLOW_COPY_AND_ASSIGN(MediaStreamDeviceUIControllerTest); |
| 75 }; | 76 }; |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 | 142 |
| 142 // Remove the last request which is pending in the queue. | 143 // Remove the last request which is pending in the queue. |
| 143 ui_controller_->CancelUIRequest(label_3); | 144 ui_controller_->CancelUIRequest(label_3); |
| 144 | 145 |
| 145 // We should get callbacks from the rest of the requests. | 146 // We should get callbacks from the rest of the requests. |
| 146 EXPECT_CALL(*this, DevicesAccepted(label_1, _)); | 147 EXPECT_CALL(*this, DevicesAccepted(label_1, _)); |
| 147 EXPECT_CALL(*this, DevicesAccepted(label_2, _)); | 148 EXPECT_CALL(*this, DevicesAccepted(label_2, _)); |
| 148 } | 149 } |
| 149 | 150 |
| 150 } // namespace content | 151 } // namespace content |
| OLD | NEW |