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

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

Issue 10826174: Dead code elimination: scythe.chrome_functions:segment.path %media% edition, round 2. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 4 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
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/stringprintf.h" 7 #include "base/stringprintf.h"
8 8
9 MockMediaStreamDispatcher::MockMediaStreamDispatcher() 9 MockMediaStreamDispatcher::MockMediaStreamDispatcher()
10 : MediaStreamDispatcher(NULL), 10 : MediaStreamDispatcher(NULL),
11 request_id_(-1), 11 request_id_(-1),
12 stop_stream_counter_(0) { 12 stop_stream_counter_(0) {
13 } 13 }
14 14
15 MockMediaStreamDispatcher::~MockMediaStreamDispatcher() {} 15 MockMediaStreamDispatcher::~MockMediaStreamDispatcher() {}
16 16
17 void MockMediaStreamDispatcher::GenerateStream( 17 void MockMediaStreamDispatcher::GenerateStream(
18 int request_id, 18 int request_id,
19 const base::WeakPtr<MediaStreamDispatcherEventHandler>& event_handler, 19 const base::WeakPtr<MediaStreamDispatcherEventHandler>&,
20 media_stream::StreamOptions components, 20 media_stream::StreamOptions components,
21 const GURL& security_origin) { 21 const GURL&) {
22 request_id_ = request_id; 22 request_id_ = request_id;
23 event_handler_ = event_handler;
24 components_ = media_stream::StreamOptions(components.audio,
25 components.video);
26 security_origin_ = security_origin;
27 23
28 stream_label_ = StringPrintf("%s%d","local_stream",request_id); 24 stream_label_ = StringPrintf("%s%d","local_stream",request_id);
29 audio_array_.clear(); 25 audio_array_.clear();
30 video_array_.clear(); 26 video_array_.clear();
31 27
32 if (components.audio) { 28 if (components.audio) {
33 media_stream::StreamDeviceInfo audio; 29 media_stream::StreamDeviceInfo audio;
34 audio.device_id= "audio_device_id"; 30 audio.device_id= "audio_device_id";
35 audio.name ="audio microphone"; 31 audio.name ="audio microphone";
36 audio.stream_type = content::MEDIA_STREAM_DEVICE_TYPE_AUDIO_CAPTURE; 32 audio.stream_type = content::MEDIA_STREAM_DEVICE_TYPE_AUDIO_CAPTURE;
(...skipping 20 matching lines...) Expand all
57 53
58 int MockMediaStreamDispatcher::video_session_id(const std::string& label, 54 int MockMediaStreamDispatcher::video_session_id(const std::string& label,
59 int index) { 55 int index) {
60 return -1; 56 return -1;
61 } 57 }
62 58
63 int MockMediaStreamDispatcher::audio_session_id(const std::string& label, 59 int MockMediaStreamDispatcher::audio_session_id(const std::string& label,
64 int index) { 60 int index) {
65 return -1; 61 return -1;
66 } 62 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698