Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(374)

Side by Side Diff: content/renderer/media/mock_media_stream_dispatcher.cc

Issue 18420011: Support cancellation of request for opening device. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: add IsThisRequest method and some comments Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/renderer/media/mock_media_stream_dispatcher.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/mock_media_stream_dispatcher.h" 5 #include "content/renderer/media/mock_media_stream_dispatcher.h"
6 6
7 #include "base/strings/stringprintf.h" 7 #include "base/strings/stringprintf.h"
8 #include "content/public/common/media_stream_request.h" 8 #include "content/public/common/media_stream_request.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 StreamDeviceInfo video; 42 StreamDeviceInfo video;
43 video.device.id = "video_device_id"; 43 video.device.id = "video_device_id";
44 video.device.name = "usb video camera"; 44 video.device.name = "usb video camera";
45 video.device.type = components.video_type; 45 video.device.type = components.video_type;
46 video.session_id = request_id; 46 video.session_id = request_id;
47 video_array_.push_back(video); 47 video_array_.push_back(video);
48 } 48 }
49 ++request_stream_counter_; 49 ++request_stream_counter_;
50 } 50 }
51 51
52 void MockMediaStreamDispatcher::CancelGenerateStream(int request_id) { 52 void MockMediaStreamDispatcher::CancelGenerateStream(
53 int request_id,
54 const base::WeakPtr<MediaStreamDispatcherEventHandler>& event_handler) {
53 EXPECT_EQ(request_id, request_id_); 55 EXPECT_EQ(request_id, request_id_);
54 } 56 }
55 57
56 void MockMediaStreamDispatcher::StopStream(const std::string& label) { 58 void MockMediaStreamDispatcher::StopStream(const std::string& label) {
57 ++stop_stream_counter_; 59 ++stop_stream_counter_;
58 } 60 }
59 61
60 bool MockMediaStreamDispatcher::IsStream(const std::string& label) { 62 bool MockMediaStreamDispatcher::IsStream(const std::string& label) {
61 return true; 63 return true;
62 } 64 }
63 65
64 int MockMediaStreamDispatcher::video_session_id(const std::string& label, 66 int MockMediaStreamDispatcher::video_session_id(const std::string& label,
65 int index) { 67 int index) {
66 return -1; 68 return -1;
67 } 69 }
68 70
69 int MockMediaStreamDispatcher::audio_session_id(const std::string& label, 71 int MockMediaStreamDispatcher::audio_session_id(const std::string& label,
70 int index) { 72 int index) {
71 return -1; 73 return -1;
72 } 74 }
73 75
74 } // namespace content 76 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/mock_media_stream_dispatcher.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698