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