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

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

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
« no previous file with comments | « no previous file | content/renderer/media/mock_media_stream_dispatcher.cc » ('j') | 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 #ifndef CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_DISPATCHER_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_DISPATCHER_H_
6 #define CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_DISPATCHER_H_ 6 #define CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_DISPATCHER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "content/renderer/media/media_stream_dispatcher.h" 10 #include "content/renderer/media/media_stream_dispatcher.h"
11 #include "googleurl/src/gurl.h" 11 #include "googleurl/src/gurl.h"
12 12
13 // This class is a mock implementation of MediaStreamDispatcher. 13 // This class is a mock implementation of MediaStreamDispatcher.
14 class MockMediaStreamDispatcher : public MediaStreamDispatcher { 14 class MockMediaStreamDispatcher : public MediaStreamDispatcher {
15 public: 15 public:
16 MockMediaStreamDispatcher(); 16 MockMediaStreamDispatcher();
17 virtual ~MockMediaStreamDispatcher(); 17 virtual ~MockMediaStreamDispatcher();
18 18
19 virtual void GenerateStream( 19 virtual void GenerateStream(
20 int request_id, 20 int request_id,
21 const base::WeakPtr<MediaStreamDispatcherEventHandler>& event_handler, 21 const base::WeakPtr<MediaStreamDispatcherEventHandler>&,
22 media_stream::StreamOptions components, 22 media_stream::StreamOptions components,
23 const GURL& security_origin) OVERRIDE; 23 const GURL&) OVERRIDE;
24 virtual void StopStream(const std::string& label) OVERRIDE; 24 virtual void StopStream(const std::string& label) OVERRIDE;
25 virtual bool IsStream(const std::string& label) OVERRIDE; 25 virtual bool IsStream(const std::string& label) OVERRIDE;
26 virtual int video_session_id(const std::string& label, int index) OVERRIDE; 26 virtual int video_session_id(const std::string& label, int index) OVERRIDE;
27 virtual int audio_session_id(const std::string& label, int index) OVERRIDE; 27 virtual int audio_session_id(const std::string& label, int index) OVERRIDE;
28 28
29 int request_id() const { return request_id_; } 29 int request_id() const { return request_id_; }
30 MediaStreamDispatcherEventHandler* event_handler() const {
31 return event_handler_;
32 }
33 const media_stream::StreamOptions& components() const { return components_; }
34 const GURL& security_origin() const { return security_origin_; }
35 int stop_stream_counter() const { return stop_stream_counter_; } 30 int stop_stream_counter() const { return stop_stream_counter_; }
36 const std::string& stream_label() const { return stream_label_;} 31 const std::string& stream_label() const { return stream_label_;}
37 media_stream::StreamDeviceInfoArray audio_array() const { 32 media_stream::StreamDeviceInfoArray audio_array() const {
38 return audio_array_; 33 return audio_array_;
39 } 34 }
40 media_stream::StreamDeviceInfoArray video_array() const { 35 media_stream::StreamDeviceInfoArray video_array() const {
41 return video_array_; 36 return video_array_;
42 } 37 }
43 38
44 private: 39 private:
45 int request_id_; 40 int request_id_;
46 base::WeakPtr<MediaStreamDispatcherEventHandler> event_handler_; 41 base::WeakPtr<MediaStreamDispatcherEventHandler> event_handler_;
47 media_stream::StreamOptions components_;
48 GURL security_origin_;
49 int stop_stream_counter_; 42 int stop_stream_counter_;
50 43
51 std::string stream_label_; 44 std::string stream_label_;
52 media_stream::StreamDeviceInfoArray audio_array_; 45 media_stream::StreamDeviceInfoArray audio_array_;
53 media_stream::StreamDeviceInfoArray video_array_; 46 media_stream::StreamDeviceInfoArray video_array_;
54 47
55 DISALLOW_COPY_AND_ASSIGN(MockMediaStreamDispatcher); 48 DISALLOW_COPY_AND_ASSIGN(MockMediaStreamDispatcher);
56 }; 49 };
57 50
58 #endif // CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_DISPATCHER_H_ 51 #endif // CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_DISPATCHER_H_
OLDNEW
« no previous file with comments | « no previous file | content/renderer/media/mock_media_stream_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698