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/chrome_content_browser_client.h" | 5 #include "chrome/browser/chrome_content_browser_client.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 21 matching lines...) Expand all Loading... |
32 #include "chrome/browser/content_settings/tab_specific_content_settings.h" | 32 #include "chrome/browser/content_settings/tab_specific_content_settings.h" |
33 #include "chrome/browser/defaults.h" | 33 #include "chrome/browser/defaults.h" |
34 #include "chrome/browser/download/download_prefs.h" | 34 #include "chrome/browser/download/download_prefs.h" |
35 #include "chrome/browser/font_family_cache.h" | 35 #include "chrome/browser/font_family_cache.h" |
36 #include "chrome/browser/geolocation/chrome_access_token_store.h" | 36 #include "chrome/browser/geolocation/chrome_access_token_store.h" |
37 #include "chrome/browser/geolocation/geolocation_permission_context.h" | 37 #include "chrome/browser/geolocation/geolocation_permission_context.h" |
38 #include "chrome/browser/geolocation/geolocation_permission_context_factory.h" | 38 #include "chrome/browser/geolocation/geolocation_permission_context_factory.h" |
39 #include "chrome/browser/media/media_capture_devices_dispatcher.h" | 39 #include "chrome/browser/media/media_capture_devices_dispatcher.h" |
40 #include "chrome/browser/media/midi_permission_context.h" | 40 #include "chrome/browser/media/midi_permission_context.h" |
41 #include "chrome/browser/media/midi_permission_context_factory.h" | 41 #include "chrome/browser/media/midi_permission_context_factory.h" |
42 #include "chrome/browser/media/protected_media_identifier_permission_context_fac
tory.h" | |
43 #include "chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.h" | 42 #include "chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.h" |
44 #include "chrome/browser/nacl_host/nacl_browser_delegate_impl.h" | 43 #include "chrome/browser/nacl_host/nacl_browser_delegate_impl.h" |
45 #include "chrome/browser/net/chrome_net_log.h" | 44 #include "chrome/browser/net/chrome_net_log.h" |
46 #include "chrome/browser/notifications/desktop_notification_service.h" | 45 #include "chrome/browser/notifications/desktop_notification_service.h" |
47 #include "chrome/browser/notifications/desktop_notification_service_factory.h" | 46 #include "chrome/browser/notifications/desktop_notification_service_factory.h" |
48 #include "chrome/browser/notifications/platform_notification_service_impl.h" | 47 #include "chrome/browser/notifications/platform_notification_service_impl.h" |
49 #include "chrome/browser/platform_util.h" | 48 #include "chrome/browser/platform_util.h" |
50 #include "chrome/browser/prerender/prerender_final_status.h" | 49 #include "chrome/browser/prerender/prerender_final_status.h" |
51 #include "chrome/browser/prerender/prerender_manager.h" | 50 #include "chrome/browser/prerender/prerender_manager.h" |
52 #include "chrome/browser/prerender/prerender_manager_factory.h" | 51 #include "chrome/browser/prerender/prerender_manager_factory.h" |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 #include "chrome/browser/chromeos/login/startup_utils.h" | 151 #include "chrome/browser/chromeos/login/startup_utils.h" |
153 #include "chrome/browser/chromeos/system/input_device_settings.h" | 152 #include "chrome/browser/chromeos/system/input_device_settings.h" |
154 #include "chromeos/chromeos_switches.h" | 153 #include "chromeos/chromeos_switches.h" |
155 #include "components/user_manager/user_manager.h" | 154 #include "components/user_manager/user_manager.h" |
156 #elif defined(OS_LINUX) | 155 #elif defined(OS_LINUX) |
157 #include "chrome/browser/chrome_browser_main_linux.h" | 156 #include "chrome/browser/chrome_browser_main_linux.h" |
158 #elif defined(OS_ANDROID) | 157 #elif defined(OS_ANDROID) |
159 #include "chrome/browser/android/new_tab_page_url_handler.h" | 158 #include "chrome/browser/android/new_tab_page_url_handler.h" |
160 #include "chrome/browser/android/webapps/single_tab_mode_tab_helper.h" | 159 #include "chrome/browser/android/webapps/single_tab_mode_tab_helper.h" |
161 #include "chrome/browser/chrome_browser_main_android.h" | 160 #include "chrome/browser/chrome_browser_main_android.h" |
162 #include "chrome/browser/media/protected_media_identifier_permission_context.h" | |
163 #include "chrome/browser/media/protected_media_identifier_permission_context_fac
tory.h" | |
164 #include "chrome/common/descriptors_android.h" | 161 #include "chrome/common/descriptors_android.h" |
165 #include "components/crash/browser/crash_dump_manager_android.h" | 162 #include "components/crash/browser/crash_dump_manager_android.h" |
166 #elif defined(OS_POSIX) | 163 #elif defined(OS_POSIX) |
167 #include "chrome/browser/chrome_browser_main_posix.h" | 164 #include "chrome/browser/chrome_browser_main_posix.h" |
168 #endif | 165 #endif |
169 | 166 |
| 167 #if defined(OS_ANDROID) || defined(OS_CHROMEOS) |
| 168 #include "chrome/browser/media/protected_media_identifier_permission_context.h" |
| 169 #include "chrome/browser/media/protected_media_identifier_permission_context_fac
tory.h" |
| 170 #endif |
| 171 |
170 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 172 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
171 #include "base/debug/leak_annotations.h" | 173 #include "base/debug/leak_annotations.h" |
172 #include "components/crash/app/breakpad_linux.h" | 174 #include "components/crash/app/breakpad_linux.h" |
173 #include "components/crash/browser/crash_handler_host_linux.h" | 175 #include "components/crash/browser/crash_handler_host_linux.h" |
174 #endif | 176 #endif |
175 | 177 |
176 #if defined(OS_ANDROID) | 178 #if defined(OS_ANDROID) |
177 #include "ui/base/ui_base_paths.h" | 179 #include "ui/base/ui_base_paths.h" |
178 #include "ui/gfx/android/device_display_info.h" | 180 #include "ui/gfx/android/device_display_info.h" |
179 #endif | 181 #endif |
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
627 return MidiPermissionContextFactory::GetForProfile(profile); | 629 return MidiPermissionContextFactory::GetForProfile(profile); |
628 case content::PERMISSION_NOTIFICATIONS: | 630 case content::PERMISSION_NOTIFICATIONS: |
629 #if defined(ENABLE_NOTIFICATIONS) | 631 #if defined(ENABLE_NOTIFICATIONS) |
630 return DesktopNotificationServiceFactory::GetForProfile(profile); | 632 return DesktopNotificationServiceFactory::GetForProfile(profile); |
631 #else | 633 #else |
632 NOTIMPLEMENTED(); | 634 NOTIMPLEMENTED(); |
633 #endif | 635 #endif |
634 case content::PERMISSION_GEOLOCATION: | 636 case content::PERMISSION_GEOLOCATION: |
635 return GeolocationPermissionContextFactory::GetForProfile(profile); | 637 return GeolocationPermissionContextFactory::GetForProfile(profile); |
636 case content::PERMISSION_PROTECTED_MEDIA_IDENTIFIER: | 638 case content::PERMISSION_PROTECTED_MEDIA_IDENTIFIER: |
637 #if defined(OS_ANDROID) | 639 #if defined(OS_ANDROID) || defined(OS_CHROMEOS) |
638 return ProtectedMediaIdentifierPermissionContextFactory::GetForProfile( | 640 return ProtectedMediaIdentifierPermissionContextFactory::GetForProfile( |
639 profile); | 641 profile); |
640 #else | 642 #else |
641 NOTIMPLEMENTED(); | 643 NOTIMPLEMENTED(); |
642 break; | 644 break; |
643 #endif | 645 #endif |
644 case content::PERMISSION_PUSH_MESSAGING: | 646 case content::PERMISSION_PUSH_MESSAGING: |
645 return gcm::PushMessagingPermissionContextFactory::GetForProfile(profile); | 647 return gcm::PushMessagingPermissionContextFactory::GetForProfile(profile); |
646 case content::PERMISSION_NUM: | 648 case content::PERMISSION_NUM: |
647 NOTREACHED() << "Invalid RequestPermission for " << permission; | 649 NOTREACHED() << "Invalid RequestPermission for " << permission; |
(...skipping 1289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1937 break; | 1939 break; |
1938 case content::PERMISSION_GEOLOCATION: | 1940 case content::PERMISSION_GEOLOCATION: |
1939 GeolocationPermissionContextFactory::GetForProfile(profile) | 1941 GeolocationPermissionContextFactory::GetForProfile(profile) |
1940 ->RequestPermission(web_contents, | 1942 ->RequestPermission(web_contents, |
1941 request_id, | 1943 request_id, |
1942 requesting_frame.GetOrigin(), | 1944 requesting_frame.GetOrigin(), |
1943 user_gesture, | 1945 user_gesture, |
1944 result_callback); | 1946 result_callback); |
1945 break; | 1947 break; |
1946 case content::PERMISSION_PROTECTED_MEDIA_IDENTIFIER: | 1948 case content::PERMISSION_PROTECTED_MEDIA_IDENTIFIER: |
1947 #if defined(OS_ANDROID) | 1949 #if defined(OS_ANDROID) || defined(OS_CHROMEOS) |
1948 ProtectedMediaIdentifierPermissionContextFactory::GetForProfile(profile) | 1950 ProtectedMediaIdentifierPermissionContextFactory::GetForProfile(profile) |
1949 ->RequestPermission(web_contents, | 1951 ->RequestPermission(web_contents, |
1950 request_id, | 1952 request_id, |
1951 requesting_frame.GetOrigin(), | 1953 requesting_frame.GetOrigin(), |
1952 user_gesture, | 1954 user_gesture, |
1953 result_callback); | 1955 result_callback); |
1954 #else | 1956 #else |
1955 NOTIMPLEMENTED(); | 1957 NOTIMPLEMENTED(); |
1956 #endif | 1958 #endif |
1957 break; | 1959 break; |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2027 ->CancelPermissionRequest(web_contents, request_id); | 2029 ->CancelPermissionRequest(web_contents, request_id); |
2028 #else | 2030 #else |
2029 NOTIMPLEMENTED(); | 2031 NOTIMPLEMENTED(); |
2030 #endif | 2032 #endif |
2031 break; | 2033 break; |
2032 case content::PERMISSION_GEOLOCATION: | 2034 case content::PERMISSION_GEOLOCATION: |
2033 GeolocationPermissionContextFactory::GetForProfile(profile) | 2035 GeolocationPermissionContextFactory::GetForProfile(profile) |
2034 ->CancelPermissionRequest(web_contents, request_id); | 2036 ->CancelPermissionRequest(web_contents, request_id); |
2035 break; | 2037 break; |
2036 case content::PERMISSION_PROTECTED_MEDIA_IDENTIFIER: | 2038 case content::PERMISSION_PROTECTED_MEDIA_IDENTIFIER: |
2037 #if defined(OS_ANDROID) | 2039 #if defined(OS_ANDROID) || defined(OS_CHROMEOS) |
2038 ProtectedMediaIdentifierPermissionContextFactory::GetForProfile(profile) | 2040 ProtectedMediaIdentifierPermissionContextFactory::GetForProfile(profile) |
2039 ->CancelPermissionRequest(web_contents, request_id); | 2041 ->CancelPermissionRequest(web_contents, request_id); |
2040 #else | 2042 #else |
2041 NOTIMPLEMENTED(); | 2043 NOTIMPLEMENTED(); |
2042 #endif | 2044 #endif |
2043 break; | 2045 break; |
2044 case content::PERMISSION_PUSH_MESSAGING: | 2046 case content::PERMISSION_PUSH_MESSAGING: |
2045 NOTIMPLEMENTED() << "CancelPermission not implemented for " << permission; | 2047 NOTIMPLEMENTED() << "CancelPermission not implemented for " << permission; |
2046 break; | 2048 break; |
2047 case content::PERMISSION_NUM: | 2049 case content::PERMISSION_NUM: |
(...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2662 switches::kDisableWebRtcEncryption, | 2664 switches::kDisableWebRtcEncryption, |
2663 }; | 2665 }; |
2664 to_command_line->CopySwitchesFrom(from_command_line, | 2666 to_command_line->CopySwitchesFrom(from_command_line, |
2665 kWebRtcDevSwitchNames, | 2667 kWebRtcDevSwitchNames, |
2666 arraysize(kWebRtcDevSwitchNames)); | 2668 arraysize(kWebRtcDevSwitchNames)); |
2667 } | 2669 } |
2668 } | 2670 } |
2669 #endif // defined(ENABLE_WEBRTC) | 2671 #endif // defined(ENABLE_WEBRTC) |
2670 | 2672 |
2671 } // namespace chrome | 2673 } // namespace chrome |
OLD | NEW |