| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ |
| 6 #define CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ | 6 #define CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/android/jni_android.h" | 10 #include "base/android/jni_android.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 | 48 |
| 49 // ContentViewCore implementation. | 49 // ContentViewCore implementation. |
| 50 virtual base::android::ScopedJavaLocalRef<jobject> GetJavaObject() OVERRIDE; | 50 virtual base::android::ScopedJavaLocalRef<jobject> GetJavaObject() OVERRIDE; |
| 51 virtual WebContents* GetWebContents() const OVERRIDE; | 51 virtual WebContents* GetWebContents() const OVERRIDE; |
| 52 virtual ui::ViewAndroid* GetViewAndroid() const OVERRIDE; | 52 virtual ui::ViewAndroid* GetViewAndroid() const OVERRIDE; |
| 53 virtual ui::WindowAndroid* GetWindowAndroid() const OVERRIDE; | 53 virtual ui::WindowAndroid* GetWindowAndroid() const OVERRIDE; |
| 54 virtual scoped_refptr<cc::Layer> GetLayer() const OVERRIDE; | 54 virtual scoped_refptr<cc::Layer> GetLayer() const OVERRIDE; |
| 55 virtual void LoadUrl(NavigationController::LoadURLParams& params) OVERRIDE; | 55 virtual void LoadUrl(NavigationController::LoadURLParams& params) OVERRIDE; |
| 56 virtual jint GetCurrentRenderProcessId(JNIEnv* env, jobject obj) OVERRIDE; | 56 virtual jint GetCurrentRenderProcessId(JNIEnv* env, jobject obj) OVERRIDE; |
| 57 virtual void ShowPastePopup(int x, int y) OVERRIDE; | 57 virtual void ShowPastePopup(int x, int y) OVERRIDE; |
| 58 virtual unsigned int GetScaledContentTexture( | 58 virtual void GetScaledContentBitmap( |
| 59 float scale, | 59 float scale, |
| 60 gfx::Size* out_size) OVERRIDE; | 60 gfx::Size* out_size, |
| 61 const base::Callback<void(bool, const SkBitmap&)>& callback) OVERRIDE; |
| 61 virtual float GetDpiScale() const OVERRIDE; | 62 virtual float GetDpiScale() const OVERRIDE; |
| 62 virtual void RequestContentClipping(const gfx::Rect& clipping, | 63 virtual void RequestContentClipping(const gfx::Rect& clipping, |
| 63 const gfx::Size& content_size) OVERRIDE; | 64 const gfx::Size& content_size) OVERRIDE; |
| 64 virtual void PauseVideo() OVERRIDE; | 65 virtual void PauseVideo() OVERRIDE; |
| 65 virtual void ResumeVideo() OVERRIDE; | 66 virtual void ResumeVideo() OVERRIDE; |
| 66 virtual void PauseOrResumeGeolocation(bool should_pause) OVERRIDE; | 67 virtual void PauseOrResumeGeolocation(bool should_pause) OVERRIDE; |
| 67 | 68 |
| 68 // -------------------------------------------------------------------------- | 69 // -------------------------------------------------------------------------- |
| 69 // Methods called from Java via JNI | 70 // Methods called from Java via JNI |
| 70 // -------------------------------------------------------------------------- | 71 // -------------------------------------------------------------------------- |
| (...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 356 void DeleteScaledSnapshotTexture(); | 357 void DeleteScaledSnapshotTexture(); |
| 357 | 358 |
| 358 void SendGestureEvent(const blink::WebGestureEvent& event); | 359 void SendGestureEvent(const blink::WebGestureEvent& event); |
| 359 | 360 |
| 360 // Update focus state of the RenderWidgetHostView. | 361 // Update focus state of the RenderWidgetHostView. |
| 361 void SetFocusInternal(bool focused); | 362 void SetFocusInternal(bool focused); |
| 362 | 363 |
| 363 // Send device_orientation_ to renderer. | 364 // Send device_orientation_ to renderer. |
| 364 void SendOrientationChangeEventInternal(); | 365 void SendOrientationChangeEventInternal(); |
| 365 | 366 |
| 367 // Callback for scaled content readback |
| 368 static void OnFinishGetScaledContentBitmap( |
| 369 const base::Callback<void(bool, const SkBitmap&)>& compositor_callback, |
| 370 bool success, |
| 371 const SkBitmap& bitmap); |
| 372 |
| 366 // A weak reference to the Java ContentViewCore object. | 373 // A weak reference to the Java ContentViewCore object. |
| 367 JavaObjectWeakGlobalRef java_ref_; | 374 JavaObjectWeakGlobalRef java_ref_; |
| 368 | 375 |
| 369 NotificationRegistrar notification_registrar_; | 376 NotificationRegistrar notification_registrar_; |
| 370 | 377 |
| 371 // Reference to the current WebContents used to determine how and what to | 378 // Reference to the current WebContents used to determine how and what to |
| 372 // display in the ContentViewCore. | 379 // display in the ContentViewCore. |
| 373 WebContentsImpl* web_contents_; | 380 WebContentsImpl* web_contents_; |
| 374 | 381 |
| 375 // A compositor layer containing any layer that should be shown. | 382 // A compositor layer containing any layer that should be shown. |
| (...skipping 20 matching lines...) Expand all Loading... |
| 396 bool geolocation_needs_pause_; | 403 bool geolocation_needs_pause_; |
| 397 | 404 |
| 398 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl); | 405 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl); |
| 399 }; | 406 }; |
| 400 | 407 |
| 401 bool RegisterContentViewCore(JNIEnv* env); | 408 bool RegisterContentViewCore(JNIEnv* env); |
| 402 | 409 |
| 403 } // namespace content | 410 } // namespace content |
| 404 | 411 |
| 405 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ | 412 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ |
| OLD | NEW |