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