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

Side by Side Diff: android_webview/native/aw_settings.cc

Issue 425343002: [Android WebView] API to enable fullscreen. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nits Created 6 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "android_webview/native/aw_settings.h" 5 #include "android_webview/native/aw_settings.h"
6 6
7 #include "android_webview/browser/renderer_host/aw_render_view_host_ext.h" 7 #include "android_webview/browser/renderer_host/aw_render_view_host_ext.h"
8 #include "android_webview/common/aw_content_client.h" 8 #include "android_webview/common/aw_content_client.h"
9 #include "android_webview/native/aw_contents.h" 9 #include "android_webview/native/aw_contents.h"
10 #include "base/android/jni_android.h" 10 #include "base/android/jni_android.h"
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 web_prefs->experimental_webgl_enabled = 388 web_prefs->experimental_webgl_enabled =
389 web_prefs->experimental_webgl_enabled && 389 web_prefs->experimental_webgl_enabled &&
390 enable_supported_hardware_accelerated_features; 390 enable_supported_hardware_accelerated_features;
391 391
392 web_prefs->allow_displaying_insecure_content = 392 web_prefs->allow_displaying_insecure_content =
393 Java_AwSettings_getAllowDisplayingInsecureContentLocked(env, obj); 393 Java_AwSettings_getAllowDisplayingInsecureContentLocked(env, obj);
394 web_prefs->allow_running_insecure_content = 394 web_prefs->allow_running_insecure_content =
395 Java_AwSettings_getAllowRunningInsecureContentLocked(env, obj); 395 Java_AwSettings_getAllowRunningInsecureContentLocked(env, obj);
396 396
397 web_prefs->disallow_fullscreen_for_non_media_elements = true; 397 web_prefs->disallow_fullscreen_for_non_media_elements = true;
398 web_prefs->fullscreen_supported =
399 Java_AwSettings_getFullscreenSupportedLocked(env, obj);
398 } 400 }
399 401
400 static jlong Init(JNIEnv* env, 402 static jlong Init(JNIEnv* env,
401 jobject obj, 403 jobject obj,
402 jlong web_contents) { 404 jlong web_contents) {
403 AwSettings* settings = new AwSettings(env, obj, web_contents); 405 AwSettings* settings = new AwSettings(env, obj, web_contents);
404 return reinterpret_cast<intptr_t>(settings); 406 return reinterpret_cast<intptr_t>(settings);
405 } 407 }
406 408
407 static jstring GetDefaultUserAgent(JNIEnv* env, jclass clazz) { 409 static jstring GetDefaultUserAgent(JNIEnv* env, jclass clazz) {
408 return base::android::ConvertUTF8ToJavaString(env, GetUserAgent()).Release(); 410 return base::android::ConvertUTF8ToJavaString(env, GetUserAgent()).Release();
409 } 411 }
410 412
411 bool RegisterAwSettings(JNIEnv* env) { 413 bool RegisterAwSettings(JNIEnv* env) {
412 return RegisterNativesImpl(env); 414 return RegisterNativesImpl(env);
413 } 415 }
414 416
415 } // namespace android_webview 417 } // namespace android_webview
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698