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" |
11 #include "chrome/browser/file_select_helper.h" | 11 #include "chrome/browser/file_select_helper.h" |
12 #include "chrome/browser/media/media_capture_devices_dispatcher.h" | 12 #include "chrome/browser/media/media_capture_devices_dispatcher.h" |
13 #include "chrome/browser/media/media_stream_capture_indicator.h" | |
13 #include "chrome/browser/media/protected_media_identifier_permission_context.h" | 14 #include "chrome/browser/media/protected_media_identifier_permission_context.h" |
14 #include "chrome/browser/media/protected_media_identifier_permission_context_fac tory.h" | 15 #include "chrome/browser/media/protected_media_identifier_permission_context_fac tory.h" |
15 #include "chrome/browser/prerender/prerender_manager.h" | 16 #include "chrome/browser/prerender/prerender_manager.h" |
16 #include "chrome/browser/prerender/prerender_manager_factory.h" | 17 #include "chrome/browser/prerender/prerender_manager_factory.h" |
17 #include "chrome/browser/profiles/profile.h" | 18 #include "chrome/browser/profiles/profile.h" |
18 #include "chrome/browser/ui/blocked_content/popup_blocker_tab_helper.h" | 19 #include "chrome/browser/ui/blocked_content/popup_blocker_tab_helper.h" |
19 #include "chrome/browser/ui/browser_navigator.h" | 20 #include "chrome/browser/ui/browser_navigator.h" |
20 #include "chrome/browser/ui/find_bar/find_notification_details.h" | 21 #include "chrome/browser/ui/find_bar/find_notification_details.h" |
21 #include "chrome/browser/ui/find_bar/find_tab_helper.h" | 22 #include "chrome/browser/ui/find_bar/find_tab_helper.h" |
22 #include "chrome/browser/ui/tab_helpers.h" | 23 #include "chrome/browser/ui/tab_helpers.h" |
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
340 } | 341 } |
341 | 342 |
342 if (was_blocked) | 343 if (was_blocked) |
343 *was_blocked = !handled; | 344 *was_blocked = !handled; |
344 if (!handled) | 345 if (!handled) |
345 delete new_contents; | 346 delete new_contents; |
346 } | 347 } |
347 | 348 |
348 } // namespace android | 349 } // namespace android |
349 } // namespace chrome | 350 } // namespace chrome |
351 | |
352 jboolean IsCapturingAudio(JNIEnv* env, | |
qinmin
2015/02/20 18:34:59
is there a way to add nested namespaces? Maybe we
Yaron
2015/02/23 14:26:24
You can using JNINamespace but not selectively for
| |
353 jclass clazz, | |
354 jobject java_web_contents) { | |
355 content::WebContents* web_contents = | |
356 content::WebContents::FromJavaWebContents(java_web_contents); | |
357 scoped_refptr<MediaStreamCaptureIndicator> indicator = | |
358 MediaCaptureDevicesDispatcher::GetInstance()-> | |
359 GetMediaStreamCaptureIndicator(); | |
360 return indicator->IsCapturingAudio(web_contents); | |
361 } | |
362 | |
363 jboolean IsCapturingVideo(JNIEnv* env, | |
364 jclass clazz,jobject java_web_contents) { | |
qinmin
2015/02/20 18:34:59
nit: match this with the style above
Yaron
2015/02/23 14:26:24
Done.
| |
365 content::WebContents* web_contents = | |
366 content::WebContents::FromJavaWebContents(java_web_contents); | |
367 scoped_refptr<MediaStreamCaptureIndicator> indicator = | |
368 MediaCaptureDevicesDispatcher::GetInstance()-> | |
369 GetMediaStreamCaptureIndicator(); | |
370 return indicator->IsCapturingVideo(web_contents); | |
371 } | |
372 | |
OLD | NEW |