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 #include "chrome/browser/media/media_capture_devices_dispatcher.h" | 5 #include "chrome/browser/media/webrtc/media_capture_devices_dispatcher.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/metrics/field_trial.h" | 9 #include "base/metrics/field_trial.h" |
10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
11 #include "base/strings/string_util.h" | 11 #include "base/strings/string_util.h" |
12 #include "base/strings/utf_string_conversions.h" | 12 #include "base/strings/utf_string_conversions.h" |
13 #include "build/build_config.h" | 13 #include "build/build_config.h" |
14 #include "chrome/browser/media/desktop_streams_registry.h" | |
15 #include "chrome/browser/media/media_access_handler.h" | 14 #include "chrome/browser/media/media_access_handler.h" |
16 #include "chrome/browser/media/media_stream_capture_indicator.h" | 15 #include "chrome/browser/media/webrtc/desktop_streams_registry.h" |
17 #include "chrome/browser/media/permission_bubble_media_access_handler.h" | 16 #include "chrome/browser/media/webrtc/media_stream_capture_indicator.h" |
| 17 #include "chrome/browser/media/webrtc/permission_bubble_media_access_handler.h" |
18 #include "chrome/browser/profiles/profile.h" | 18 #include "chrome/browser/profiles/profile.h" |
19 #include "chrome/browser/ui/browser.h" | 19 #include "chrome/browser/ui/browser.h" |
20 #include "chrome/browser/ui/browser_window.h" | 20 #include "chrome/browser/ui/browser_window.h" |
21 #include "chrome/common/chrome_switches.h" | 21 #include "chrome/common/chrome_switches.h" |
22 #include "chrome/common/pref_names.h" | 22 #include "chrome/common/pref_names.h" |
23 #include "components/pref_registry/pref_registry_syncable.h" | 23 #include "components/pref_registry/pref_registry_syncable.h" |
24 #include "components/prefs/pref_service.h" | 24 #include "components/prefs/pref_service.h" |
25 #include "components/prefs/scoped_user_pref_update.h" | 25 #include "components/prefs/scoped_user_pref_update.h" |
26 #include "content/public/browser/browser_thread.h" | 26 #include "content/public/browser/browser_thread.h" |
27 #include "content/public/browser/media_capture_devices.h" | 27 #include "content/public/browser/media_capture_devices.h" |
28 #include "content/public/browser/notification_source.h" | 28 #include "content/public/browser/notification_source.h" |
29 #include "content/public/browser/render_frame_host.h" | 29 #include "content/public/browser/render_frame_host.h" |
30 #include "content/public/browser/render_process_host.h" | 30 #include "content/public/browser/render_process_host.h" |
31 #include "content/public/browser/web_contents.h" | 31 #include "content/public/browser/web_contents.h" |
32 #include "content/public/common/media_stream_request.h" | 32 #include "content/public/common/media_stream_request.h" |
33 #include "extensions/common/constants.h" | 33 #include "extensions/common/constants.h" |
34 #include "media/base/media_switches.h" | 34 #include "media/base/media_switches.h" |
35 | 35 |
36 #if defined(OS_CHROMEOS) | 36 #if defined(OS_CHROMEOS) |
37 #include "ash/shell.h" | 37 #include "ash/shell.h" |
38 #endif // defined(OS_CHROMEOS) | 38 #endif // defined(OS_CHROMEOS) |
39 | 39 |
40 #if defined(ENABLE_EXTENSIONS) | 40 #if defined(ENABLE_EXTENSIONS) |
41 #include "chrome/browser/media/desktop_capture_access_handler.h" | |
42 #include "chrome/browser/media/extension_media_access_handler.h" | 41 #include "chrome/browser/media/extension_media_access_handler.h" |
43 #include "chrome/browser/media/tab_capture_access_handler.h" | 42 #include "chrome/browser/media/webrtc/desktop_capture_access_handler.h" |
| 43 #include "chrome/browser/media/webrtc/tab_capture_access_handler.h" |
44 #include "extensions/browser/extension_registry.h" | 44 #include "extensions/browser/extension_registry.h" |
45 #include "extensions/common/extension.h" | 45 #include "extensions/common/extension.h" |
46 #include "extensions/common/permissions/permissions_data.h" | 46 #include "extensions/common/permissions/permissions_data.h" |
47 #endif | 47 #endif |
48 | 48 |
49 using content::BrowserThread; | 49 using content::BrowserThread; |
50 using content::MediaCaptureDevices; | 50 using content::MediaCaptureDevices; |
51 using content::MediaStreamDevices; | 51 using content::MediaStreamDevices; |
52 | 52 |
53 namespace { | 53 namespace { |
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
434 #if defined(ENABLE_EXTENSIONS) | 434 #if defined(ENABLE_EXTENSIONS) |
435 for (MediaAccessHandler* handler : media_access_handlers_) { | 435 for (MediaAccessHandler* handler : media_access_handlers_) { |
436 if (handler->SupportsStreamType(stream_type, nullptr)) { | 436 if (handler->SupportsStreamType(stream_type, nullptr)) { |
437 ToCaptureAccessHandlerBase(handler)->UpdateCapturingLinkSecured( | 437 ToCaptureAccessHandlerBase(handler)->UpdateCapturingLinkSecured( |
438 render_process_id, render_frame_id, page_request_id, is_secure); | 438 render_process_id, render_frame_id, page_request_id, is_secure); |
439 break; | 439 break; |
440 } | 440 } |
441 } | 441 } |
442 #endif | 442 #endif |
443 } | 443 } |
OLD | NEW |