| 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 "content/renderer/media/media_stream_dispatcher.h" | 5 #include "content/renderer/media/media_stream_dispatcher.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <string> | 10 #include <string> |
| 11 | 11 |
| 12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
| 13 #include "base/message_loop/message_loop.h" | 13 #include "base/message_loop/message_loop.h" |
| 14 #include "base/strings/string_number_conversions.h" | 14 #include "base/strings/string_number_conversions.h" |
| 15 #include "content/common/media/media_stream_messages.h" | 15 #include "content/common/media/media_stream_messages.h" |
| 16 #include "content/public/common/media_stream_request.h" | 16 #include "content/public/common/media_stream_request.h" |
| 17 #include "content/renderer/media/media_stream_dispatcher_eventhandler.h" | 17 #include "content/renderer/media/media_stream_dispatcher_eventhandler.h" |
| 18 #include "media/audio/audio_parameters.h" | 18 #include "media/base/audio_parameters.h" |
| 19 #include "testing/gtest/include/gtest/gtest.h" | 19 #include "testing/gtest/include/gtest/gtest.h" |
| 20 #include "url/gurl.h" | 20 #include "url/gurl.h" |
| 21 | 21 |
| 22 namespace content { | 22 namespace content { |
| 23 namespace { | 23 namespace { |
| 24 | 24 |
| 25 const int kRouteId = 0; | 25 const int kRouteId = 0; |
| 26 const int kAudioSessionId = 3; | 26 const int kAudioSessionId = 3; |
| 27 const int kVideoSessionId = 5; | 27 const int kVideoSessionId = 5; |
| 28 const int kRequestId1 = 10; | 28 const int kRequestId1 = 10; |
| (...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 403 dispatcher_->OnMessageReceived( | 403 dispatcher_->OnMessageReceived( |
| 404 MediaStreamMsg_DeviceStopped(kRouteId, label, handler_->video_device_)); | 404 MediaStreamMsg_DeviceStopped(kRouteId, label, handler_->video_device_)); |
| 405 // Verify that MediaStreamDispatcherEventHandler::OnDeviceStopped has been | 405 // Verify that MediaStreamDispatcherEventHandler::OnDeviceStopped has been |
| 406 // called. | 406 // called. |
| 407 EXPECT_EQ(label, handler_->device_stopped_label_); | 407 EXPECT_EQ(label, handler_->device_stopped_label_); |
| 408 EXPECT_EQ(dispatcher_->video_session_id(label, 0), | 408 EXPECT_EQ(dispatcher_->video_session_id(label, 0), |
| 409 StreamDeviceInfo::kNoId); | 409 StreamDeviceInfo::kNoId); |
| 410 } | 410 } |
| 411 | 411 |
| 412 } // namespace content | 412 } // namespace content |
| OLD | NEW |