| 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), | 
| 250       weak_factory_(this) { | 251       weak_factory_(this) { | 
| 251   g_allocated_web_contents_androids.Get().insert(this); | 252   g_allocated_web_contents_androids.Get().insert(this); | 
| 252   JNIEnv* env = AttachCurrentThread(); | 253   JNIEnv* env = AttachCurrentThread(); | 
| 253   obj_.Reset(env, | 254   obj_.Reset(env, | 
| 254              Java_WebContentsImpl_create(env, reinterpret_cast<intptr_t>(this), | 255              Java_WebContentsImpl_create(env, reinterpret_cast<intptr_t>(this), | 
| 255                                          navigation_controller_.GetJavaObject()) | 256                                          navigation_controller_.GetJavaObject()) | 
| 256                  .obj()); | 257                  .obj()); | 
| 257   RendererPreferences* prefs = web_contents_->GetMutableRendererPrefs(); | 258   RendererPreferences* prefs = web_contents_->GetMutableRendererPrefs(); | 
| 258   base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); | 259   base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); | 
| 259   prefs->network_contry_iso = | 260   prefs->network_contry_iso = | 
| (...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 715       env, *obj, *callback, id, http_status_code, jurl, jbitmaps, jsizes); | 716       env, *obj, *callback, id, http_status_code, jurl, jbitmaps, jsizes); | 
| 716 } | 717 } | 
| 717 | 718 | 
| 718 void WebContentsAndroid::SetMediaSession( | 719 void WebContentsAndroid::SetMediaSession( | 
| 719     const ScopedJavaLocalRef<jobject>& j_media_session) { | 720     const ScopedJavaLocalRef<jobject>& j_media_session) { | 
| 720   JNIEnv* env = base::android::AttachCurrentThread(); | 721   JNIEnv* env = base::android::AttachCurrentThread(); | 
| 721   Java_WebContentsImpl_setMediaSession(env, obj_, j_media_session); | 722   Java_WebContentsImpl_setMediaSession(env, obj_, j_media_session); | 
| 722 } | 723 } | 
| 723 | 724 | 
| 724 }  // namespace content | 725 }  // namespace content | 
| OLD | NEW | 
|---|