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/android/chrome_web_contents_delegate_android.h" | 5 #include "chrome/browser/android/chrome_web_contents_delegate_android.h" |
6 | 6 |
7 #include "base/android/jni_android.h" | 7 #include "base/android/jni_android.h" |
8 #include "base/android/jni_string.h" | 8 #include "base/android/jni_string.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "chrome/browser/chrome_notification_types.h" | 10 #include "chrome/browser/chrome_notification_types.h" |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 } | 219 } |
220 | 220 |
221 void ChromeWebContentsDelegateAndroid::RequestMediaAccessPermission( | 221 void ChromeWebContentsDelegateAndroid::RequestMediaAccessPermission( |
222 content::WebContents* web_contents, | 222 content::WebContents* web_contents, |
223 const content::MediaStreamRequest& request, | 223 const content::MediaStreamRequest& request, |
224 const content::MediaResponseCallback& callback) { | 224 const content::MediaResponseCallback& callback) { |
225 MediaCaptureDevicesDispatcher::GetInstance()->ProcessMediaAccessRequest( | 225 MediaCaptureDevicesDispatcher::GetInstance()->ProcessMediaAccessRequest( |
226 web_contents, request, callback, NULL); | 226 web_contents, request, callback, NULL); |
227 } | 227 } |
228 | 228 |
| 229 bool ChromeWebContentsDelegateAndroid::CheckMediaAccessPermission( |
| 230 content::WebContents* web_contents, |
| 231 const GURL& security_origin, |
| 232 content::MediaStreamType type) { |
| 233 return MediaCaptureDevicesDispatcher::GetInstance() |
| 234 ->CheckMediaAccessPermission(web_contents, security_origin, type); |
| 235 } |
| 236 |
229 bool ChromeWebContentsDelegateAndroid::RequestPpapiBrokerPermission( | 237 bool ChromeWebContentsDelegateAndroid::RequestPpapiBrokerPermission( |
230 WebContents* web_contents, | 238 WebContents* web_contents, |
231 const GURL& url, | 239 const GURL& url, |
232 const base::FilePath& plugin_path, | 240 const base::FilePath& plugin_path, |
233 const base::Callback<void(bool)>& callback) { | 241 const base::Callback<void(bool)>& callback) { |
234 #if defined(ENABLE_PLUGINS) | 242 #if defined(ENABLE_PLUGINS) |
235 PepperBrokerInfoBarDelegate::Create( | 243 PepperBrokerInfoBarDelegate::Create( |
236 web_contents, url, plugin_path, callback); | 244 web_contents, url, plugin_path, callback); |
237 return true; | 245 return true; |
238 #else | 246 #else |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
339 return; | 347 return; |
340 Java_ChromeWebContentsDelegateAndroid_webContentsCreated(env, obj.obj(), | 348 Java_ChromeWebContentsDelegateAndroid_webContentsCreated(env, obj.obj(), |
341 reinterpret_cast<intptr_t>(source_contents), opener_render_frame_id, | 349 reinterpret_cast<intptr_t>(source_contents), opener_render_frame_id, |
342 base::android::ConvertUTF16ToJavaString(env, frame_name).Release(), | 350 base::android::ConvertUTF16ToJavaString(env, frame_name).Release(), |
343 base::android::ConvertUTF8ToJavaString(env, target_url.spec()).Release(), | 351 base::android::ConvertUTF8ToJavaString(env, target_url.spec()).Release(), |
344 reinterpret_cast<intptr_t>(new_contents)); | 352 reinterpret_cast<intptr_t>(new_contents)); |
345 } | 353 } |
346 | 354 |
347 } // namespace android | 355 } // namespace android |
348 } // namespace chrome | 356 } // namespace chrome |
OLD | NEW |