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

Unified Diff: content/public/browser/android/content_view_core.h

Issue 143803004: android: Migrate old content readback to use async readback (and delegated renderer) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed aelias@ comments Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: content/public/browser/android/content_view_core.h
diff --git a/content/public/browser/android/content_view_core.h b/content/public/browser/android/content_view_core.h
index 85766ee504c6ef347320cd6a4e5957b4280f78ea..493a1dc4f45410567578bf88577a8582ca44c572 100644
--- a/content/public/browser/android/content_view_core.h
+++ b/content/public/browser/android/content_view_core.h
@@ -12,6 +12,8 @@
#include "content/common/content_export.h"
#include "content/public/browser/navigation_controller.h"
+class SkBitmap;
+
namespace cc {
class Layer;
}
@@ -48,9 +50,19 @@ class CONTENT_EXPORT ContentViewCore {
virtual void LoadUrl(NavigationController::LoadURLParams& params) = 0;
virtual jint GetCurrentRenderProcessId(JNIEnv* env, jobject obj) = 0;
virtual void ShowPastePopup(int x, int y) = 0;
- virtual unsigned int GetScaledContentTexture(
+
+ // Called with the result of a content readback. The boolean parameter
+ // indicates whether the content reaback was successful or not. If the
+ // readback was successful, an SkBitmap of the content is passed as the second
+ // parameter.
+ typedef base::Callback<void(bool, const SkBitmap&)> ContentBitmapCallback;
aelias_OOO_until_Jul13 2014/02/01 02:09:20 Hmm, sorry for changing my mind, but it looks like
powei 2014/02/03 10:06:52 Done.
+
+ // Request a scaled content readback. The result is passed through the
+ // callback. |out_size| is returned with the size of the content.
+ virtual void GetScaledContentBitmap(
float scale,
- gfx::Size* out_size) = 0;
+ gfx::Size* out_size,
+ const ContentBitmapCallback& result_callback) = 0;
virtual float GetDpiScale() const = 0;
virtual void RequestContentClipping(const gfx::Rect& clipping,
const gfx::Size& content_size) = 0;

Powered by Google App Engine
This is Rietveld 408576698