summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authorskyostil@chromium.org <skyostil@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-12 16:10:22 +0000
committerskyostil@chromium.org <skyostil@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-12 16:10:22 +0000
commit9e3add14706048f5f3ac5973025fea6e058f0453 (patch)
treea22dbb00360f38f8c50769d3c5276891edb58e2e /content
parentf2f56a162140fcc18a57c9c02d9ecb89d750fc62 (diff)
downloadchromium_src-9e3add14706048f5f3ac5973025fea6e058f0453.zip
chromium_src-9e3add14706048f5f3ac5973025fea6e058f0453.tar.gz
chromium_src-9e3add14706048f5f3ac5973025fea6e058f0453.tar.bz2
Implement window and view snapshots on Android
This patch implements Ui::GrabViewSnapshot and Ui::GrabWindowSnapshot on Android. They both return a screen capture of the requested content region. As on other platforms the URL bar will not be included in the result, but note that any UI elements overlapping with the content (e.g., the toolbar drop shadow) will be shown. BUG=242299 TEST=tools/telemetry/run_tests --browser=android-chrome GpuTabTest -v -v -v Review URL: https://chromiumcodereview.appspot.com/23632006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@222789 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r--content/browser/android/content_view_core_impl.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/content/browser/android/content_view_core_impl.cc b/content/browser/android/content_view_core_impl.cc
index 688e1ec..669c896 100644
--- a/content/browser/android/content_view_core_impl.cc
+++ b/content/browser/android/content_view_core_impl.cc
@@ -375,6 +375,10 @@ void ContentViewCoreImpl::UpdateFrameInfo(
const gfx::Vector2dF& controls_offset,
const gfx::Vector2dF& content_offset,
float overdraw_bottom_height) {
+ if (window_android_)
+ window_android_->set_content_offset(
+ gfx::ScaleVector2d(content_offset, dpi_scale_));
+
JNIEnv* env = AttachCurrentThread();
ScopedJavaLocalRef<jobject> obj = java_ref_.get(env);
if (obj.is_null())