OLD | NEW |
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" |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 virtual jint GetCurrentRenderProcessId(JNIEnv* env, jobject obj) = 0; | 51 virtual jint GetCurrentRenderProcessId(JNIEnv* env, jobject obj) = 0; |
52 virtual void ShowPastePopup(int x, int y) = 0; | 52 virtual void ShowPastePopup(int x, int y) = 0; |
53 | 53 |
54 // Request a scaled content readback. The result is passed through the | 54 // Request a scaled content readback. The result is passed through the |
55 // callback. The boolean parameter indicates whether the readback was a | 55 // callback. The boolean parameter indicates whether the readback was a |
56 // success or not. The content is passed through the SkBitmap parameter. | 56 // success or not. The content is passed through the SkBitmap parameter. |
57 // |out_size| is returned with the size of the content. | 57 // |out_size| is returned with the size of the content. |
58 virtual void GetScaledContentBitmap( | 58 virtual void GetScaledContentBitmap( |
59 float scale, | 59 float scale, |
60 gfx::Size* out_size, | 60 gfx::Size* out_size, |
| 61 jobject bitmap_config, |
61 const base::Callback<void(bool, const SkBitmap&)>& result_callback) = 0; | 62 const base::Callback<void(bool, const SkBitmap&)>& result_callback) = 0; |
62 virtual float GetDpiScale() const = 0; | 63 virtual float GetDpiScale() const = 0; |
63 virtual void RequestContentClipping(const gfx::Rect& clipping, | 64 virtual void RequestContentClipping(const gfx::Rect& clipping, |
64 const gfx::Size& content_size) = 0; | 65 const gfx::Size& content_size) = 0; |
65 virtual void PauseVideo() = 0; | 66 virtual void PauseVideo() = 0; |
66 virtual void ResumeVideo() = 0; | 67 virtual void ResumeVideo() = 0; |
67 virtual void PauseOrResumeGeolocation(bool should_pause) = 0; | 68 virtual void PauseOrResumeGeolocation(bool should_pause) = 0; |
68 | 69 |
69 // Observer callback for frame metadata updates. | 70 // Observer callback for frame metadata updates. |
70 typedef base::Callback<void( | 71 typedef base::Callback<void( |
71 const gfx::SizeF& content_size, | 72 const gfx::SizeF& content_size, |
72 const gfx::Vector2dF& scroll_offset, | 73 const gfx::Vector2dF& scroll_offset, |
73 float page_scale_factor)> UpdateFrameInfoCallback; | 74 float page_scale_factor)> UpdateFrameInfoCallback; |
74 | 75 |
75 protected: | 76 protected: |
76 virtual ~ContentViewCore() {}; | 77 virtual ~ContentViewCore() {}; |
77 }; | 78 }; |
78 | 79 |
79 }; // namespace content | 80 }; // namespace content |
80 | 81 |
81 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_CONTENT_VIEW_CORE_H_ | 82 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_CONTENT_VIEW_CORE_H_ |
OLD | NEW |