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 10 matching lines...) Expand all Loading... |
21 #include "chrome/browser/browser_process.h" | 21 #include "chrome/browser/browser_process.h" |
22 #include "chrome/browser/browser_shutdown.h" | 22 #include "chrome/browser/browser_shutdown.h" |
23 #include "chrome/browser/browsing_data/browsing_data_helper.h" | 23 #include "chrome/browser/browsing_data/browsing_data_helper.h" |
24 #include "chrome/browser/browsing_data/browsing_data_remover.h" | 24 #include "chrome/browser/browsing_data/browsing_data_remover.h" |
25 #include "chrome/browser/character_encoding.h" | 25 #include "chrome/browser/character_encoding.h" |
26 #include "chrome/browser/chrome_net_benchmarking_message_filter.h" | 26 #include "chrome/browser/chrome_net_benchmarking_message_filter.h" |
27 #include "chrome/browser/chrome_quota_permission_context.h" | 27 #include "chrome/browser/chrome_quota_permission_context.h" |
28 #include "chrome/browser/content_settings/content_settings_utils.h" | 28 #include "chrome/browser/content_settings/content_settings_utils.h" |
29 #include "chrome/browser/content_settings/cookie_settings.h" | 29 #include "chrome/browser/content_settings/cookie_settings.h" |
30 #include "chrome/browser/content_settings/host_content_settings_map.h" | 30 #include "chrome/browser/content_settings/host_content_settings_map.h" |
| 31 #include "chrome/browser/content_settings/permission_request_id.h" |
31 #include "chrome/browser/content_settings/tab_specific_content_settings.h" | 32 #include "chrome/browser/content_settings/tab_specific_content_settings.h" |
32 #include "chrome/browser/defaults.h" | 33 #include "chrome/browser/defaults.h" |
33 #include "chrome/browser/devtools/chrome_devtools_manager_delegate.h" | 34 #include "chrome/browser/devtools/chrome_devtools_manager_delegate.h" |
34 #include "chrome/browser/download/download_prefs.h" | 35 #include "chrome/browser/download/download_prefs.h" |
35 #include "chrome/browser/extensions/browser_permissions_policy_delegate.h" | 36 #include "chrome/browser/extensions/browser_permissions_policy_delegate.h" |
36 #include "chrome/browser/extensions/extension_service.h" | 37 #include "chrome/browser/extensions/extension_service.h" |
37 #include "chrome/browser/extensions/extension_util.h" | 38 #include "chrome/browser/extensions/extension_util.h" |
38 #include "chrome/browser/extensions/extension_web_ui.h" | 39 #include "chrome/browser/extensions/extension_web_ui.h" |
39 #include "chrome/browser/extensions/extension_webkit_preferences.h" | 40 #include "chrome/browser/extensions/extension_webkit_preferences.h" |
40 #include "chrome/browser/extensions/suggest_permission_util.h" | 41 #include "chrome/browser/extensions/suggest_permission_util.h" |
(...skipping 2079 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2120 void ChromeContentBrowserClient::RequestMidiSysExPermission( | 2121 void ChromeContentBrowserClient::RequestMidiSysExPermission( |
2121 content::WebContents* web_contents, | 2122 content::WebContents* web_contents, |
2122 int bridge_id, | 2123 int bridge_id, |
2123 const GURL& requesting_frame, | 2124 const GURL& requesting_frame, |
2124 bool user_gesture, | 2125 bool user_gesture, |
2125 base::Callback<void(bool)> result_callback, | 2126 base::Callback<void(bool)> result_callback, |
2126 base::Closure* cancel_callback) { | 2127 base::Closure* cancel_callback) { |
2127 MidiPermissionContext* context = | 2128 MidiPermissionContext* context = |
2128 MidiPermissionContextFactory::GetForProfile( | 2129 MidiPermissionContextFactory::GetForProfile( |
2129 Profile::FromBrowserContext(web_contents->GetBrowserContext())); | 2130 Profile::FromBrowserContext(web_contents->GetBrowserContext())); |
2130 context->RequestMidiSysExPermission(web_contents, bridge_id, requesting_frame, | 2131 int renderer_id = web_contents->GetRenderProcessHost()->GetID(); |
2131 user_gesture, result_callback, | 2132 int render_view_id = web_contents->GetRenderViewHost()->GetRoutingID(); |
2132 cancel_callback); | 2133 const PermissionRequestID id(renderer_id, render_view_id, bridge_id, GURL()); |
| 2134 |
| 2135 context->RequestPermission(web_contents, id, requesting_frame, |
| 2136 user_gesture, result_callback); |
2133 } | 2137 } |
2134 | 2138 |
2135 void ChromeContentBrowserClient::RequestProtectedMediaIdentifierPermission( | 2139 void ChromeContentBrowserClient::RequestProtectedMediaIdentifierPermission( |
2136 content::WebContents* web_contents, | 2140 content::WebContents* web_contents, |
2137 const GURL& origin, | 2141 const GURL& origin, |
2138 base::Callback<void(bool)> result_callback, | 2142 base::Callback<void(bool)> result_callback, |
2139 base::Closure* cancel_callback) { | 2143 base::Closure* cancel_callback) { |
2140 #if defined(OS_ANDROID) | 2144 #if defined(OS_ANDROID) |
2141 ProtectedMediaIdentifierPermissionContext* context = | 2145 ProtectedMediaIdentifierPermissionContext* context = |
2142 ProtectedMediaIdentifierPermissionContextFactory::GetForProfile( | 2146 ProtectedMediaIdentifierPermissionContextFactory::GetForProfile( |
(...skipping 658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2801 switches::kDisableWebRtcEncryption, | 2805 switches::kDisableWebRtcEncryption, |
2802 }; | 2806 }; |
2803 to_command_line->CopySwitchesFrom(from_command_line, | 2807 to_command_line->CopySwitchesFrom(from_command_line, |
2804 kWebRtcDevSwitchNames, | 2808 kWebRtcDevSwitchNames, |
2805 arraysize(kWebRtcDevSwitchNames)); | 2809 arraysize(kWebRtcDevSwitchNames)); |
2806 } | 2810 } |
2807 } | 2811 } |
2808 #endif // defined(ENABLE_WEBRTC) | 2812 #endif // defined(ENABLE_WEBRTC) |
2809 | 2813 |
2810 } // namespace chrome | 2814 } // namespace chrome |
OLD | NEW |