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

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

Issue 2609863004: Pass camera facing to WebKit (Closed)
Patch Set: use =default syntax Created 3 years, 11 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_MEDIA_STREAM_VIDEO_SOURCE_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_SOURCE_H_
6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_SOURCE_H_ 6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_SOURCE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 82
83 // Returns the task runner where video frames will be delivered on. 83 // Returns the task runner where video frames will be delivered on.
84 base::SingleThreadTaskRunner* io_task_runner() const; 84 base::SingleThreadTaskRunner* io_task_runner() const;
85 85
86 const media::VideoCaptureFormat* GetCurrentFormat() const; 86 const media::VideoCaptureFormat* GetCurrentFormat() const;
87 87
88 base::WeakPtr<MediaStreamVideoSource> GetWeakPtr() { 88 base::WeakPtr<MediaStreamVideoSource> GetWeakPtr() {
89 return weak_factory_.GetWeakPtr(); 89 return weak_factory_.GetWeakPtr();
90 } 90 }
91 91
92 virtual media::VideoFacingMode GetVideoFacing() {
93 return media::VideoFacingMode::USER;
94 }
95
92 protected: 96 protected:
93 void DoStopSource() override; 97 void DoStopSource() override;
94 98
95 // Sets ready state and notifies the ready state to all registered tracks. 99 // Sets ready state and notifies the ready state to all registered tracks.
96 virtual void SetReadyState(blink::WebMediaStreamSource::ReadyState state); 100 virtual void SetReadyState(blink::WebMediaStreamSource::ReadyState state);
97 101
98 // Sets muted state and notifies it to all registered tracks. 102 // Sets muted state and notifies it to all registered tracks.
99 virtual void SetMutedState(bool state); 103 virtual void SetMutedState(bool state);
100 104
101 // An implementation must fetch the formats that can currently be used by 105 // An implementation must fetch the formats that can currently be used by
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 207
204 // NOTE: Weak pointers must be invalidated before all other member variables. 208 // NOTE: Weak pointers must be invalidated before all other member variables.
205 base::WeakPtrFactory<MediaStreamVideoSource> weak_factory_; 209 base::WeakPtrFactory<MediaStreamVideoSource> weak_factory_;
206 210
207 DISALLOW_COPY_AND_ASSIGN(MediaStreamVideoSource); 211 DISALLOW_COPY_AND_ASSIGN(MediaStreamVideoSource);
208 }; 212 };
209 213
210 } // namespace content 214 } // namespace content
211 215
212 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_SOURCE_H_ 216 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_SOURCE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698