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

Side by Side Diff: content/public/browser/android/content_view_core.h

Issue 151103010: Revert of 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: Created 6 years, 10 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 | « content/public/browser/android/compositor.h ('k') | 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 (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 #ifndef CONTENT_PUBLIC_BROWSER_ANDROID_CONTENT_VIEW_CORE_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_ANDROID_CONTENT_VIEW_CORE_H_
6 #define CONTENT_PUBLIC_BROWSER_ANDROID_CONTENT_VIEW_CORE_H_ 6 #define CONTENT_PUBLIC_BROWSER_ANDROID_CONTENT_VIEW_CORE_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 9
10 #include "base/android/scoped_java_ref.h" 10 #include "base/android/scoped_java_ref.h"
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "content/common/content_export.h" 12 #include "content/common/content_export.h"
13 #include "content/public/browser/navigation_controller.h" 13 #include "content/public/browser/navigation_controller.h"
14 14
15 class SkBitmap;
16
17 namespace cc { 15 namespace cc {
18 class Layer; 16 class Layer;
19 } 17 }
20 18
21 namespace gfx { 19 namespace gfx {
22 class Rect; 20 class Rect;
23 class Size; 21 class Size;
24 class SizeF; 22 class SizeF;
25 class Vector2dF; 23 class Vector2dF;
26 } 24 }
(...skipping 16 matching lines...) Expand all
43 static ContentViewCore* GetNativeContentViewCore(JNIEnv* env, jobject obj); 41 static ContentViewCore* GetNativeContentViewCore(JNIEnv* env, jobject obj);
44 42
45 virtual WebContents* GetWebContents() const = 0; 43 virtual WebContents* GetWebContents() const = 0;
46 virtual base::android::ScopedJavaLocalRef<jobject> GetJavaObject() = 0; 44 virtual base::android::ScopedJavaLocalRef<jobject> GetJavaObject() = 0;
47 virtual ui::ViewAndroid* GetViewAndroid() const = 0; 45 virtual ui::ViewAndroid* GetViewAndroid() const = 0;
48 virtual ui::WindowAndroid* GetWindowAndroid() const = 0; 46 virtual ui::WindowAndroid* GetWindowAndroid() const = 0;
49 virtual scoped_refptr<cc::Layer> GetLayer() const = 0; 47 virtual scoped_refptr<cc::Layer> GetLayer() const = 0;
50 virtual void LoadUrl(NavigationController::LoadURLParams& params) = 0; 48 virtual void LoadUrl(NavigationController::LoadURLParams& params) = 0;
51 virtual jint GetCurrentRenderProcessId(JNIEnv* env, jobject obj) = 0; 49 virtual jint GetCurrentRenderProcessId(JNIEnv* env, jobject obj) = 0;
52 virtual void ShowPastePopup(int x, int y) = 0; 50 virtual void ShowPastePopup(int x, int y) = 0;
53 51 virtual unsigned int GetScaledContentTexture(
54 // Request a scaled content readback. The result is passed through the
55 // callback. The boolean parameter indicates whether the readback was a
56 // success or not. The content is passed through the SkBitmap parameter.
57 // |out_size| is returned with the size of the content.
58 virtual void GetScaledContentBitmap(
59 float scale, 52 float scale,
60 gfx::Size* out_size, 53 gfx::Size* out_size) = 0;
61 const base::Callback<void(bool, const SkBitmap&)>& result_callback) = 0;
62 virtual float GetDpiScale() const = 0; 54 virtual float GetDpiScale() const = 0;
63 virtual void RequestContentClipping(const gfx::Rect& clipping, 55 virtual void RequestContentClipping(const gfx::Rect& clipping,
64 const gfx::Size& content_size) = 0; 56 const gfx::Size& content_size) = 0;
65 virtual void PauseVideo() = 0; 57 virtual void PauseVideo() = 0;
66 virtual void ResumeVideo() = 0; 58 virtual void ResumeVideo() = 0;
67 virtual void PauseOrResumeGeolocation(bool should_pause) = 0; 59 virtual void PauseOrResumeGeolocation(bool should_pause) = 0;
68 60
69 // Observer callback for frame metadata updates. 61 // Observer callback for frame metadata updates.
70 typedef base::Callback<void( 62 typedef base::Callback<void(
71 const gfx::SizeF& content_size, 63 const gfx::SizeF& content_size,
72 const gfx::Vector2dF& scroll_offset, 64 const gfx::Vector2dF& scroll_offset,
73 float page_scale_factor)> UpdateFrameInfoCallback; 65 float page_scale_factor)> UpdateFrameInfoCallback;
74 66
75 protected: 67 protected:
76 virtual ~ContentViewCore() {}; 68 virtual ~ContentViewCore() {};
77 }; 69 };
78 70
79 }; // namespace content 71 }; // namespace content
80 72
81 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_CONTENT_VIEW_CORE_H_ 73 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_CONTENT_VIEW_CORE_H_
OLDNEW
« no previous file with comments | « content/public/browser/android/compositor.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698