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

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

Issue 12623031: Pass the overdraw value to the browser w/ frame (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Interface for test file Created 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "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/android/scoped_java_ref.h" 10 #include "base/android/scoped_java_ref.h"
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 // All positions and sizes are in CSS pixels. 368 // All positions and sizes are in CSS pixels.
369 // Note that viewport_width/height is a best effort based. 369 // Note that viewport_width/height is a best effort based.
370 // ContentViewCore has the actual information about the physical viewport size. 370 // ContentViewCore has the actual information about the physical viewport size.
371 void ContentViewCoreImpl::UpdateFrameInfo( 371 void ContentViewCoreImpl::UpdateFrameInfo(
372 const gfx::Vector2dF& scroll_offset, 372 const gfx::Vector2dF& scroll_offset,
373 float page_scale_factor, 373 float page_scale_factor,
374 const gfx::Vector2dF& page_scale_factor_limits, 374 const gfx::Vector2dF& page_scale_factor_limits,
375 const gfx::SizeF& content_size, 375 const gfx::SizeF& content_size,
376 const gfx::SizeF& viewport_size, 376 const gfx::SizeF& viewport_size,
377 const gfx::Vector2dF& controls_offset, 377 const gfx::Vector2dF& controls_offset,
378 const gfx::Vector2dF& content_offset) { 378 const gfx::Vector2dF& content_offset,
379 float overdraw_bottom_height) {
379 JNIEnv* env = AttachCurrentThread(); 380 JNIEnv* env = AttachCurrentThread();
380 ScopedJavaLocalRef<jobject> obj = java_ref_.get(env); 381 ScopedJavaLocalRef<jobject> obj = java_ref_.get(env);
381 if (obj.is_null()) 382 if (obj.is_null())
382 return; 383 return;
383 384
384 Java_ContentViewCore_updateFrameInfo( 385 Java_ContentViewCore_updateFrameInfo(
385 env, obj.obj(), 386 env, obj.obj(),
386 scroll_offset.x(), 387 scroll_offset.x(),
387 scroll_offset.y(), 388 scroll_offset.y(),
388 page_scale_factor, 389 page_scale_factor,
389 page_scale_factor_limits.x(), 390 page_scale_factor_limits.x(),
390 page_scale_factor_limits.y(), 391 page_scale_factor_limits.y(),
391 content_size.width(), 392 content_size.width(),
392 content_size.height(), 393 content_size.height(),
393 viewport_size.width(), 394 viewport_size.width(),
394 viewport_size.height(), 395 viewport_size.height(),
395 controls_offset.y(), 396 controls_offset.y(),
396 content_offset.y()); 397 content_offset.y(),
398 overdraw_bottom_height);
397 399
398 for (size_t i = 0; i < update_frame_info_callbacks_.size(); ++i) { 400 for (size_t i = 0; i < update_frame_info_callbacks_.size(); ++i) {
399 update_frame_info_callbacks_[i].Run( 401 update_frame_info_callbacks_[i].Run(
400 content_size, scroll_offset, page_scale_factor); 402 content_size, scroll_offset, page_scale_factor);
401 } 403 }
402 } 404 }
403 405
404 void ContentViewCoreImpl::SetTitle(const string16& title) { 406 void ContentViewCoreImpl::SetTitle(const string16& title) {
405 JNIEnv* env = AttachCurrentThread(); 407 JNIEnv* env = AttachCurrentThread();
406 ScopedJavaLocalRef<jobject> obj = java_ref_.get(env); 408 ScopedJavaLocalRef<jobject> obj = java_ref_.get(env);
(...skipping 1048 matching lines...) Expand 10 before | Expand all | Expand 10 after
1455 reinterpret_cast<WebContents*>(native_web_contents), 1457 reinterpret_cast<WebContents*>(native_web_contents),
1456 reinterpret_cast<ui::WindowAndroid*>(native_window)); 1458 reinterpret_cast<ui::WindowAndroid*>(native_window));
1457 return reinterpret_cast<jint>(view); 1459 return reinterpret_cast<jint>(view);
1458 } 1460 }
1459 1461
1460 bool RegisterContentViewCore(JNIEnv* env) { 1462 bool RegisterContentViewCore(JNIEnv* env) {
1461 return RegisterNativesImpl(env); 1463 return RegisterNativesImpl(env);
1462 } 1464 }
1463 1465
1464 } // namespace content 1466 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/android/content_view_core_impl.h ('k') | content/browser/renderer_host/render_widget_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698