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

Side by Side Diff: content/browser/renderer_host/media/media_stream_manager.h

Issue 2634263002: Pass camera facing info to audio client (Closed)
Patch Set: Address comments Created 3 years, 10 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 (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 // MediaStreamManager is used to open media capture devices (video supported 5 // MediaStreamManager is used to open media capture devices (video supported
6 // now). Call flow: 6 // now). Call flow:
7 // 1. GenerateStream is called when a render process wants to use a capture 7 // 1. GenerateStream is called when a render process wants to use a capture
8 // device. 8 // device.
9 // 2. MediaStreamManager will ask MediaStreamUIController for permission to 9 // 2. MediaStreamManager will ask MediaStreamUIController for permission to
10 // use devices and for which device to use. 10 // use devices and for which device to use.
(...skipping 27 matching lines...) Expand all
38 #include "base/message_loop/message_loop.h" 38 #include "base/message_loop/message_loop.h"
39 #include "base/power_monitor/power_observer.h" 39 #include "base/power_monitor/power_observer.h"
40 #include "base/threading/thread.h" 40 #include "base/threading/thread.h"
41 #include "build/build_config.h" 41 #include "build/build_config.h"
42 #include "content/browser/renderer_host/media/media_devices_manager.h" 42 #include "content/browser/renderer_host/media/media_devices_manager.h"
43 #include "content/browser/renderer_host/media/media_stream_provider.h" 43 #include "content/browser/renderer_host/media/media_stream_provider.h"
44 #include "content/common/content_export.h" 44 #include "content/common/content_export.h"
45 #include "content/common/media/media_devices.h" 45 #include "content/common/media/media_devices.h"
46 #include "content/common/media/media_stream_options.h" 46 #include "content/common/media/media_stream_options.h"
47 #include "content/public/browser/media_request_state.h" 47 #include "content/public/browser/media_request_state.h"
48 #include "media/base/video_facing.h"
48 49
49 namespace media { 50 namespace media {
50 class AudioManager; 51 class AudioManager;
51 } 52 }
52 53
53 namespace url { 54 namespace url {
54 class Origin; 55 class Origin;
55 } 56 }
56 57
57 namespace content { 58 namespace content {
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 91
91 // Used to access VideoCaptureManager. 92 // Used to access VideoCaptureManager.
92 VideoCaptureManager* video_capture_manager(); 93 VideoCaptureManager* video_capture_manager();
93 94
94 // Used to access AudioInputDeviceManager. 95 // Used to access AudioInputDeviceManager.
95 AudioInputDeviceManager* audio_input_device_manager(); 96 AudioInputDeviceManager* audio_input_device_manager();
96 97
97 // Used to access MediaDevicesManager. 98 // Used to access MediaDevicesManager.
98 MediaDevicesManager* media_devices_manager(); 99 MediaDevicesManager* media_devices_manager();
99 100
101 // This should be called after InitializeDeviceManagersOnIOThread() and before
102 // WillDestroyCurrentMessageLoop(). It can be called more than once and it's
103 // ok to not call at all if the client is not interested in receiving
104 // media::VideoCaptureObserver callacks.
105 // This method can be called on whatever thread. The callbacks of
106 // media::VideoCaptureObserver arrive on BrowserThread::IO.
107 void SetVideoCaptureObserver(
108 std::unique_ptr<media::VideoCaptureObserver> capture_observer);
109
100 // Creates a new media access request which is identified by a unique string 110 // Creates a new media access request which is identified by a unique string
101 // that's returned to the caller. This will trigger the infobar and ask users 111 // that's returned to the caller. This will trigger the infobar and ask users
102 // for access to the device. |render_process_id| and |render_frame_id| are 112 // for access to the device. |render_process_id| and |render_frame_id| are
103 // used to determine where the infobar will appear to the user. |callback| is 113 // used to determine where the infobar will appear to the user. |callback| is
104 // used to send the selected device to the clients. An empty list of device 114 // used to send the selected device to the clients. An empty list of device
105 // will be returned if the users deny the access. 115 // will be returned if the users deny the access.
106 std::string MakeMediaAccessRequest( 116 std::string MakeMediaAccessRequest(
107 int render_process_id, 117 int render_process_id,
108 int render_frame_id, 118 int render_frame_id,
109 int page_request_id, 119 int page_request_id,
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 std::map<int, base::Callback<void(const std::string&)>> log_callbacks_; 417 std::map<int, base::Callback<void(const std::string&)>> log_callbacks_;
408 418
409 GenerateStreamTestCallback generate_stream_test_callback_; 419 GenerateStreamTestCallback generate_stream_test_callback_;
410 420
411 DISALLOW_COPY_AND_ASSIGN(MediaStreamManager); 421 DISALLOW_COPY_AND_ASSIGN(MediaStreamManager);
412 }; 422 };
413 423
414 } // namespace content 424 } // namespace content
415 425
416 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_MANAGER_H_ 426 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698