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

Side by Side Diff: content/browser/web_contents/web_contents_android.cc

Issue 1385543003: Have RenderWidgetHostViewAndroid own sync compositor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review 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 unified diff | Download patch
OLDNEW
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 "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/android/jni_array.h" 8 #include "base/android/jni_array.h"
9 #include "base/android/jni_string.h" 9 #include "base/android/jni_string.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 } 190 }
191 191
192 // static 192 // static
193 bool WebContentsAndroid::Register(JNIEnv* env) { 193 bool WebContentsAndroid::Register(JNIEnv* env) {
194 return RegisterNativesImpl(env); 194 return RegisterNativesImpl(env);
195 } 195 }
196 196
197 WebContentsAndroid::WebContentsAndroid(WebContents* web_contents) 197 WebContentsAndroid::WebContentsAndroid(WebContents* web_contents)
198 : web_contents_(web_contents), 198 : web_contents_(web_contents),
199 navigation_controller_(&(web_contents->GetController())), 199 navigation_controller_(&(web_contents->GetController())),
200 synchronous_compositor_client_(nullptr),
200 weak_factory_(this) { 201 weak_factory_(this) {
201 g_allocated_web_contents_androids.Get().insert(this); 202 g_allocated_web_contents_androids.Get().insert(this);
202 JNIEnv* env = AttachCurrentThread(); 203 JNIEnv* env = AttachCurrentThread();
203 obj_.Reset(env, 204 obj_.Reset(env,
204 Java_WebContentsImpl_create( 205 Java_WebContentsImpl_create(
205 env, 206 env,
206 reinterpret_cast<intptr_t>(this), 207 reinterpret_cast<intptr_t>(this),
207 navigation_controller_.GetJavaObject().obj()).obj()); 208 navigation_controller_.GetJavaObject().obj()).obj());
208 RendererPreferences* prefs = web_contents_->GetMutableRendererPrefs(); 209 RendererPreferences* prefs = web_contents_->GetMutableRendererPrefs();
209 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); 210 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
541 web_contents_->StopMediaSession(); 542 web_contents_->StopMediaSession();
542 } 543 }
543 544
544 ScopedJavaLocalRef<jstring> WebContentsAndroid::GetEncoding( 545 ScopedJavaLocalRef<jstring> WebContentsAndroid::GetEncoding(
545 JNIEnv* env, jobject obj) const { 546 JNIEnv* env, jobject obj) const {
546 return base::android::ConvertUTF8ToJavaString(env, 547 return base::android::ConvertUTF8ToJavaString(env,
547 web_contents_->GetEncoding()); 548 web_contents_->GetEncoding());
548 } 549 }
549 550
550 } // namespace content 551 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698