Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3297)

Unified Diff: chrome/browser/android/chrome_web_contents_delegate_android.cc

Issue 1391893003: NOT FOR REVIEW: Aura on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/android/chrome_web_contents_delegate_android.cc
diff --git a/chrome/browser/android/chrome_web_contents_delegate_android.cc b/chrome/browser/android/chrome_web_contents_delegate_android.cc
index 77a849b401c6ab0eae8eb0149165edff76b20ecd..b195748c034ec5358dca68b0ccefeec9cba211e3 100644
--- a/chrome/browser/android/chrome_web_contents_delegate_android.cc
+++ b/chrome/browser/android/chrome_web_contents_delegate_android.cc
@@ -47,16 +47,16 @@ using content::WebContents;
namespace {
-ScopedJavaLocalRef<jobject> CreateJavaRectF(
- JNIEnv* env,
- const gfx::RectF& rect) {
- return ScopedJavaLocalRef<jobject>(
- Java_ChromeWebContentsDelegateAndroid_createRectF(env,
- rect.x(),
- rect.y(),
- rect.right(),
- rect.bottom()));
-}
+//ScopedJavaLocalRef<jobject> CreateJavaRectF(
+// JNIEnv* env,
+// const gfx::RectF& rect) {
+// return ScopedJavaLocalRef<jobject>(
+// Java_ChromeWebContentsDelegateAndroid_createRectF(env,
+// rect.x(),
+// rect.y(),
+// rect.right(),
+// rect.bottom()));
+//}
ScopedJavaLocalRef<jobject> CreateJavaRect(
JNIEnv* env,
@@ -324,6 +324,7 @@ void ChromeWebContentsDelegateAndroid::AddNewContents(
const gfx::Rect& initial_rect,
bool user_gesture,
bool* was_blocked) {
+#if !defined(USE_AURA)
// No code for this yet.
DCHECK_NE(disposition, SAVE_TO_DISK);
// Can't create a new contents for the current tab - invalid case.
@@ -356,6 +357,7 @@ void ChromeWebContentsDelegateAndroid::AddNewContents(
*was_blocked = !handled;
if (!handled)
delete new_contents;
+#endif
}
} // namespace android
@@ -364,29 +366,41 @@ void ChromeWebContentsDelegateAndroid::AddNewContents(
jboolean IsCapturingAudio(JNIEnv* env,
jclass clazz,
jobject java_web_contents) {
+#if !defined(USE_AURA)
content::WebContents* web_contents =
content::WebContents::FromJavaWebContents(java_web_contents);
scoped_refptr<MediaStreamCaptureIndicator> indicator =
MediaCaptureDevicesDispatcher::GetInstance()->
GetMediaStreamCaptureIndicator();
return indicator->IsCapturingAudio(web_contents);
+#else
+ return true;
+#endif
}
jboolean IsCapturingVideo(JNIEnv* env,
jclass clazz,
jobject java_web_contents) {
+#if !defined(USE_AURA)
content::WebContents* web_contents =
content::WebContents::FromJavaWebContents(java_web_contents);
scoped_refptr<MediaStreamCaptureIndicator> indicator =
MediaCaptureDevicesDispatcher::GetInstance()->
GetMediaStreamCaptureIndicator();
return indicator->IsCapturingVideo(web_contents);
+#else
+ return true;
+#endif
}
jboolean HasAudibleAudio(JNIEnv* env,
jclass clazz,
jobject java_web_contents) {
+#if !defined(USE_AURA)
content::WebContents* web_contents =
content::WebContents::FromJavaWebContents(java_web_contents);
return web_contents->WasRecentlyAudible();
+#else
+ return true;
+#endif
}

Powered by Google App Engine
This is Rietveld 408576698