OLD | NEW |
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/enumerate media capture devices (video | 5 // MediaStreamManager is used to open/enumerate media capture devices (video |
6 // supported now). Call flow: | 6 // supported 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 23 matching lines...) Expand all Loading... |
34 #include "base/memory/ref_counted.h" | 34 #include "base/memory/ref_counted.h" |
35 #include "base/memory/scoped_ptr.h" | 35 #include "base/memory/scoped_ptr.h" |
36 #include "base/message_loop/message_loop.h" | 36 #include "base/message_loop/message_loop.h" |
37 #include "base/power_monitor/power_observer.h" | 37 #include "base/power_monitor/power_observer.h" |
38 #include "base/system_monitor/system_monitor.h" | 38 #include "base/system_monitor/system_monitor.h" |
39 #include "content/browser/renderer_host/media/media_stream_provider.h" | 39 #include "content/browser/renderer_host/media/media_stream_provider.h" |
40 #include "content/common/content_export.h" | 40 #include "content/common/content_export.h" |
41 #include "content/common/media/media_stream_options.h" | 41 #include "content/common/media/media_stream_options.h" |
42 #include "content/public/browser/media_request_state.h" | 42 #include "content/public/browser/media_request_state.h" |
43 #include "content/public/browser/resource_context.h" | 43 #include "content/public/browser/resource_context.h" |
| 44 #include "ui/gfx/display.h" |
44 | 45 |
45 namespace media { | 46 namespace media { |
46 class AudioManager; | 47 class AudioManager; |
47 } | 48 } |
48 | 49 |
49 namespace content { | 50 namespace content { |
50 | 51 |
51 class AudioInputDeviceManager; | 52 class AudioInputDeviceManager; |
52 class FakeMediaStreamUIProxy; | 53 class FakeMediaStreamUIProxy; |
53 class MediaStreamDeviceSettings; | 54 class MediaStreamDeviceSettings; |
(...skipping 17 matching lines...) Expand all Loading... |
71 | 72 |
72 explicit MediaStreamManager(media::AudioManager* audio_manager); | 73 explicit MediaStreamManager(media::AudioManager* audio_manager); |
73 virtual ~MediaStreamManager(); | 74 virtual ~MediaStreamManager(); |
74 | 75 |
75 // Used to access VideoCaptureManager. | 76 // Used to access VideoCaptureManager. |
76 VideoCaptureManager* video_capture_manager(); | 77 VideoCaptureManager* video_capture_manager(); |
77 | 78 |
78 // Used to access AudioInputDeviceManager. | 79 // Used to access AudioInputDeviceManager. |
79 AudioInputDeviceManager* audio_input_device_manager(); | 80 AudioInputDeviceManager* audio_input_device_manager(); |
80 | 81 |
| 82 // Set the Display rotation. |
| 83 void SetDisplayRotation(gfx::Display::Rotation rotation); |
| 84 |
81 // Creates a new media access request which is identified by a unique string | 85 // Creates a new media access request which is identified by a unique string |
82 // that's returned to the caller. This will trigger the infobar and ask users | 86 // that's returned to the caller. This will trigger the infobar and ask users |
83 // for access to the device. |render_process_id| and |render_view_id| refer | 87 // for access to the device. |render_process_id| and |render_view_id| refer |
84 // to the view where the infobar will appear to the user. |callback| is | 88 // to the view where the infobar will appear to the user. |callback| is |
85 // used to send the selected device to the clients. An empty list of device | 89 // used to send the selected device to the clients. An empty list of device |
86 // will be returned if the users deny the access. | 90 // will be returned if the users deny the access. |
87 std::string MakeMediaAccessRequest( | 91 std::string MakeMediaAccessRequest( |
88 int render_process_id, | 92 int render_process_id, |
89 int render_view_id, | 93 int render_view_id, |
90 int page_request_id, | 94 int page_request_id, |
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
381 | 385 |
382 bool use_fake_ui_; | 386 bool use_fake_ui_; |
383 scoped_ptr<FakeMediaStreamUIProxy> fake_ui_; | 387 scoped_ptr<FakeMediaStreamUIProxy> fake_ui_; |
384 | 388 |
385 DISALLOW_COPY_AND_ASSIGN(MediaStreamManager); | 389 DISALLOW_COPY_AND_ASSIGN(MediaStreamManager); |
386 }; | 390 }; |
387 | 391 |
388 } // namespace content | 392 } // namespace content |
389 | 393 |
390 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_MANAGER_H_ | 394 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_MANAGER_H_ |
OLD | NEW |