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

Side by Side Diff: content/browser/android/content_view_core_impl.cc

Issue 1753493002: Avoid updating frame info while detached from activity (Closed) Base URL: https://chromium.googlesource.com/a/chromium/src.git@2661
Patch Set: Created 4 years, 9 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 | « no previous file | 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/android/content_view_core_impl.h" 5 #include "content/browser/android/content_view_core_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.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 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 const gfx::Vector2dF& scroll_offset, 415 const gfx::Vector2dF& scroll_offset,
416 float page_scale_factor, 416 float page_scale_factor,
417 const gfx::Vector2dF& page_scale_factor_limits, 417 const gfx::Vector2dF& page_scale_factor_limits,
418 const gfx::SizeF& content_size, 418 const gfx::SizeF& content_size,
419 const gfx::SizeF& viewport_size, 419 const gfx::SizeF& viewport_size,
420 const gfx::Vector2dF& controls_offset, 420 const gfx::Vector2dF& controls_offset,
421 const gfx::Vector2dF& content_offset, 421 const gfx::Vector2dF& content_offset,
422 bool is_mobile_optimized_hint) { 422 bool is_mobile_optimized_hint) {
423 JNIEnv* env = AttachCurrentThread(); 423 JNIEnv* env = AttachCurrentThread();
424 ScopedJavaLocalRef<jobject> obj = java_ref_.get(env); 424 ScopedJavaLocalRef<jobject> obj = java_ref_.get(env);
425 if (obj.is_null()) 425 if (obj.is_null() || !window_android_)
426 return; 426 return;
427 427
428 window_android_->set_content_offset( 428 window_android_->set_content_offset(
429 gfx::ScaleVector2d(content_offset, dpi_scale_)); 429 gfx::ScaleVector2d(content_offset, dpi_scale_));
430 430
431 page_scale_ = page_scale_factor; 431 page_scale_ = page_scale_factor;
432 432
433 Java_ContentViewCore_updateFrameInfo( 433 Java_ContentViewCore_updateFrameInfo(
434 env, obj.obj(), 434 env, obj.obj(),
435 scroll_offset.x(), 435 scroll_offset.x(),
(...skipping 1103 matching lines...) Expand 10 before | Expand all | Expand 10 after
1539 return ScopedJavaLocalRef<jobject>(); 1539 return ScopedJavaLocalRef<jobject>();
1540 1540
1541 return view->GetJavaObject(); 1541 return view->GetJavaObject();
1542 } 1542 }
1543 1543
1544 bool RegisterContentViewCore(JNIEnv* env) { 1544 bool RegisterContentViewCore(JNIEnv* env) {
1545 return RegisterNativesImpl(env); 1545 return RegisterNativesImpl(env);
1546 } 1546 }
1547 1547
1548 } // namespace content 1548 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698