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

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

Issue 1021863005: Pass format as argument to getContentBitmapAsync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add config parameter tp function header. Created 5 years, 8 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 | content/public/android/java/src/org/chromium/content/browser/ContentReadbackHandler.java » ('j') | 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 "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 622 matching lines...) Expand 10 before | Expand all | Expand 10 after
633 env, obj.obj(), static_cast<jint>(x_dip * dpi_scale()), 633 env, obj.obj(), static_cast<jint>(x_dip * dpi_scale()),
634 static_cast<jint>(y_dip * dpi_scale())); 634 static_cast<jint>(y_dip * dpi_scale()));
635 } 635 }
636 636
637 void ContentViewCoreImpl::GetScaledContentBitmap( 637 void ContentViewCoreImpl::GetScaledContentBitmap(
638 float scale, 638 float scale,
639 SkColorType color_type, 639 SkColorType color_type,
640 gfx::Rect src_subrect, 640 gfx::Rect src_subrect,
641 ReadbackRequestCallback& result_callback) { 641 ReadbackRequestCallback& result_callback) {
642 RenderWidgetHostViewAndroid* view = GetRenderWidgetHostViewAndroid(); 642 RenderWidgetHostViewAndroid* view = GetRenderWidgetHostViewAndroid();
643 if (!view) { 643 if (!view || color_type == kUnknown_SkColorType) {
644 result_callback.Run(SkBitmap(), READBACK_FAILED); 644 result_callback.Run(SkBitmap(), READBACK_FAILED);
645 return; 645 return;
646 } 646 }
647 647
648 view->GetScaledContentBitmap(scale, color_type, src_subrect, 648 view->GetScaledContentBitmap(scale, color_type, src_subrect,
649 result_callback); 649 result_callback);
650 } 650 }
651 651
652 void ContentViewCoreImpl::StartContentIntent(const GURL& content_url) { 652 void ContentViewCoreImpl::StartContentIntent(const GURL& content_url) {
653 JNIEnv* env = AttachCurrentThread(); 653 JNIEnv* env = AttachCurrentThread();
(...skipping 737 matching lines...) Expand 10 before | Expand all | Expand 10 after
1391 return NULL; 1391 return NULL;
1392 1392
1393 return view->GetJavaObject().Release(); 1393 return view->GetJavaObject().Release();
1394 } 1394 }
1395 1395
1396 bool RegisterContentViewCore(JNIEnv* env) { 1396 bool RegisterContentViewCore(JNIEnv* env) {
1397 return RegisterNativesImpl(env); 1397 return RegisterNativesImpl(env);
1398 } 1398 }
1399 1399
1400 } // namespace content 1400 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/public/android/java/src/org/chromium/content/browser/ContentReadbackHandler.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698