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

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: rebase 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
« no previous file with comments | « content/browser/web_contents/web_contents_android.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
546 web_contents_->StopMediaSession(); 547 web_contents_->StopMediaSession();
547 } 548 }
548 549
549 ScopedJavaLocalRef<jstring> WebContentsAndroid::GetEncoding( 550 ScopedJavaLocalRef<jstring> WebContentsAndroid::GetEncoding(
550 JNIEnv* env, jobject obj) const { 551 JNIEnv* env, jobject obj) const {
551 return base::android::ConvertUTF8ToJavaString(env, 552 return base::android::ConvertUTF8ToJavaString(env,
552 web_contents_->GetEncoding()); 553 web_contents_->GetEncoding());
553 } 554 }
554 555
555 } // namespace content 556 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_android.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698