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 2080 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2121 void ChromeContentBrowserClient::RequestMidiSysExPermission( | 2122 void ChromeContentBrowserClient::RequestMidiSysExPermission( |
2122 content::WebContents* web_contents, | 2123 content::WebContents* web_contents, |
2123 int bridge_id, | 2124 int bridge_id, |
2124 const GURL& requesting_frame, | 2125 const GURL& requesting_frame, |
2125 bool user_gesture, | 2126 bool user_gesture, |
2126 base::Callback<void(bool)> result_callback, | 2127 base::Callback<void(bool)> result_callback, |
2127 base::Closure* cancel_callback) { | 2128 base::Closure* cancel_callback) { |
2128 MidiPermissionContext* context = | 2129 MidiPermissionContext* context = |
2129 MidiPermissionContextFactory::GetForProfile( | 2130 MidiPermissionContextFactory::GetForProfile( |
2130 Profile::FromBrowserContext(web_contents->GetBrowserContext())); | 2131 Profile::FromBrowserContext(web_contents->GetBrowserContext())); |
2131 context->RequestMidiSysExPermission(web_contents, bridge_id, requesting_frame, | 2132 int renderer_id = web_contents->GetRenderProcessHost()->GetID(); |
2132 user_gesture, result_callback, | 2133 int render_view_id = web_contents->GetRenderViewHost()->GetRoutingID(); |
2133 cancel_callback); | 2134 const PermissionRequestID id(renderer_id, render_view_id, bridge_id, GURL()); |
| 2135 |
| 2136 context->RequestPermission(web_contents, id, requesting_frame, |
| 2137 user_gesture, result_callback); |
2134 } | 2138 } |
2135 | 2139 |
2136 void ChromeContentBrowserClient::RequestProtectedMediaIdentifierPermission( | 2140 void ChromeContentBrowserClient::RequestProtectedMediaIdentifierPermission( |
2137 content::WebContents* web_contents, | 2141 content::WebContents* web_contents, |
2138 const GURL& origin, | 2142 const GURL& origin, |
2139 base::Callback<void(bool)> result_callback, | 2143 base::Callback<void(bool)> result_callback, |
2140 base::Closure* cancel_callback) { | 2144 base::Closure* cancel_callback) { |
2141 #if defined(OS_ANDROID) | 2145 #if defined(OS_ANDROID) |
2142 ProtectedMediaIdentifierPermissionContext* context = | 2146 ProtectedMediaIdentifierPermissionContext* context = |
2143 ProtectedMediaIdentifierPermissionContextFactory::GetForProfile( | 2147 ProtectedMediaIdentifierPermissionContextFactory::GetForProfile( |
(...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2800 switches::kDisableWebRtcEncryption, | 2804 switches::kDisableWebRtcEncryption, |
2801 }; | 2805 }; |
2802 to_command_line->CopySwitchesFrom(from_command_line, | 2806 to_command_line->CopySwitchesFrom(from_command_line, |
2803 kWebRtcDevSwitchNames, | 2807 kWebRtcDevSwitchNames, |
2804 arraysize(kWebRtcDevSwitchNames)); | 2808 arraysize(kWebRtcDevSwitchNames)); |
2805 } | 2809 } |
2806 } | 2810 } |
2807 #endif // defined(ENABLE_WEBRTC) | 2811 #endif // defined(ENABLE_WEBRTC) |
2808 | 2812 |
2809 } // namespace chrome | 2813 } // namespace chrome |
OLD | NEW |