| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "content/browser/web_contents/web_contents_android.h" | 5 #include "content/browser/web_contents/web_contents_android.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include "base/android/jni_android.h" | 9 #include "base/android/jni_android.h" |
| 10 #include "base/android/jni_array.h" | 10 #include "base/android/jni_array.h" |
| (...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 } | 240 } |
| 241 | 241 |
| 242 // static | 242 // static |
| 243 bool WebContentsAndroid::Register(JNIEnv* env) { | 243 bool WebContentsAndroid::Register(JNIEnv* env) { |
| 244 return RegisterNativesImpl(env); | 244 return RegisterNativesImpl(env); |
| 245 } | 245 } |
| 246 | 246 |
| 247 WebContentsAndroid::WebContentsAndroid(WebContentsImpl* web_contents) | 247 WebContentsAndroid::WebContentsAndroid(WebContentsImpl* web_contents) |
| 248 : web_contents_(web_contents), | 248 : web_contents_(web_contents), |
| 249 navigation_controller_(&(web_contents->GetController())), | 249 navigation_controller_(&(web_contents->GetController())), |
| 250 synchronous_compositor_client_(nullptr), | |
| 251 weak_factory_(this) { | 250 weak_factory_(this) { |
| 252 g_allocated_web_contents_androids.Get().insert(this); | 251 g_allocated_web_contents_androids.Get().insert(this); |
| 253 JNIEnv* env = AttachCurrentThread(); | 252 JNIEnv* env = AttachCurrentThread(); |
| 254 obj_.Reset(env, | 253 obj_.Reset(env, |
| 255 Java_WebContentsImpl_create(env, reinterpret_cast<intptr_t>(this), | 254 Java_WebContentsImpl_create(env, reinterpret_cast<intptr_t>(this), |
| 256 navigation_controller_.GetJavaObject()) | 255 navigation_controller_.GetJavaObject()) |
| 257 .obj()); | 256 .obj()); |
| 258 RendererPreferences* prefs = web_contents_->GetMutableRendererPrefs(); | 257 RendererPreferences* prefs = web_contents_->GetMutableRendererPrefs(); |
| 259 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); | 258 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
| 260 prefs->network_contry_iso = | 259 prefs->network_contry_iso = |
| (...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 716 env, *obj, *callback, id, http_status_code, jurl, jbitmaps, jsizes); | 715 env, *obj, *callback, id, http_status_code, jurl, jbitmaps, jsizes); |
| 717 } | 716 } |
| 718 | 717 |
| 719 void WebContentsAndroid::SetMediaSession( | 718 void WebContentsAndroid::SetMediaSession( |
| 720 const ScopedJavaLocalRef<jobject>& j_media_session) { | 719 const ScopedJavaLocalRef<jobject>& j_media_session) { |
| 721 JNIEnv* env = base::android::AttachCurrentThread(); | 720 JNIEnv* env = base::android::AttachCurrentThread(); |
| 722 Java_WebContentsImpl_setMediaSession(env, obj_, j_media_session); | 721 Java_WebContentsImpl_setMediaSession(env, obj_, j_media_session); |
| 723 } | 722 } |
| 724 | 723 |
| 725 } // namespace content | 724 } // namespace content |
| OLD | NEW |