| 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 29 matching lines...) Expand all Loading... |
| 40 public: | 40 public: |
| 41 static ContentViewCoreImpl* FromWebContents(WebContents* web_contents); | 41 static ContentViewCoreImpl* FromWebContents(WebContents* web_contents); |
| 42 ContentViewCoreImpl(JNIEnv* env, | 42 ContentViewCoreImpl(JNIEnv* env, |
| 43 jobject obj, | 43 jobject obj, |
| 44 WebContents* web_contents, | 44 WebContents* web_contents, |
| 45 ui::ViewAndroid* view_android, | 45 ui::ViewAndroid* view_android, |
| 46 ui::WindowAndroid* window_android, | 46 ui::WindowAndroid* window_android, |
| 47 jobject java_bridge_retained_object_set); | 47 jobject java_bridge_retained_object_set); |
| 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 ShowPastePopup(int x, int y) OVERRIDE; | 55 virtual void ShowPastePopup(int x, int y) override; |
| 56 virtual void GetScaledContentBitmap( | 56 virtual void GetScaledContentBitmap( |
| 57 float scale, | 57 float scale, |
| 58 SkColorType color_type, | 58 SkColorType color_type, |
| 59 gfx::Rect src_subrect, | 59 gfx::Rect src_subrect, |
| 60 const base::Callback<void(bool, const SkBitmap&)>& result_callback) | 60 const base::Callback<void(bool, const SkBitmap&)>& result_callback) |
| 61 OVERRIDE; | 61 override; |
| 62 virtual float GetDpiScale() const OVERRIDE; | 62 virtual float GetDpiScale() const override; |
| 63 virtual void PauseOrResumeGeolocation(bool should_pause) OVERRIDE; | 63 virtual void PauseOrResumeGeolocation(bool should_pause) override; |
| 64 virtual void RequestTextSurroundingSelection( | 64 virtual void RequestTextSurroundingSelection( |
| 65 int max_length, | 65 int max_length, |
| 66 const base::Callback<void(const base::string16& content, | 66 const base::Callback<void(const base::string16& content, |
| 67 int start_offset, | 67 int start_offset, |
| 68 int end_offset)>& callback) OVERRIDE; | 68 int end_offset)>& callback) override; |
| 69 | 69 |
| 70 // -------------------------------------------------------------------------- | 70 // -------------------------------------------------------------------------- |
| 71 // Methods called from Java via JNI | 71 // Methods called from Java via JNI |
| 72 // -------------------------------------------------------------------------- | 72 // -------------------------------------------------------------------------- |
| 73 | 73 |
| 74 base::android::ScopedJavaLocalRef<jobject> GetWebContentsAndroid(JNIEnv* env, | 74 base::android::ScopedJavaLocalRef<jobject> GetWebContentsAndroid(JNIEnv* env, |
| 75 jobject obj); | 75 jobject obj); |
| 76 | 76 |
| 77 void OnJavaContentViewCoreDestroyed(JNIEnv* env, jobject obj); | 77 void OnJavaContentViewCoreDestroyed(JNIEnv* env, jobject obj); |
| 78 | 78 |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 void SelectBetweenCoordinates(const gfx::PointF& start, | 277 void SelectBetweenCoordinates(const gfx::PointF& start, |
| 278 const gfx::PointF& end); | 278 const gfx::PointF& end); |
| 279 | 279 |
| 280 private: | 280 private: |
| 281 class ContentViewUserData; | 281 class ContentViewUserData; |
| 282 | 282 |
| 283 friend class ContentViewUserData; | 283 friend class ContentViewUserData; |
| 284 virtual ~ContentViewCoreImpl(); | 284 virtual ~ContentViewCoreImpl(); |
| 285 | 285 |
| 286 // WebContentsObserver implementation. | 286 // WebContentsObserver implementation. |
| 287 virtual void RenderViewReady() OVERRIDE; | 287 virtual void RenderViewReady() override; |
| 288 virtual void RenderViewHostChanged(RenderViewHost* old_host, | 288 virtual void RenderViewHostChanged(RenderViewHost* old_host, |
| 289 RenderViewHost* new_host) OVERRIDE; | 289 RenderViewHost* new_host) override; |
| 290 virtual void WebContentsDestroyed() OVERRIDE; | 290 virtual void WebContentsDestroyed() override; |
| 291 | 291 |
| 292 // -------------------------------------------------------------------------- | 292 // -------------------------------------------------------------------------- |
| 293 // Other private methods and data | 293 // Other private methods and data |
| 294 // -------------------------------------------------------------------------- | 294 // -------------------------------------------------------------------------- |
| 295 | 295 |
| 296 void InitWebContents(); | 296 void InitWebContents(); |
| 297 | 297 |
| 298 RenderWidgetHostViewAndroid* GetRenderWidgetHostViewAndroid(); | 298 RenderWidgetHostViewAndroid* GetRenderWidgetHostViewAndroid(); |
| 299 | 299 |
| 300 blink::WebGestureEvent MakeGestureEvent( | 300 blink::WebGestureEvent MakeGestureEvent( |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 344 java_bridge_dispatcher_host_; | 344 java_bridge_dispatcher_host_; |
| 345 | 345 |
| 346 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl); | 346 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl); |
| 347 }; | 347 }; |
| 348 | 348 |
| 349 bool RegisterContentViewCore(JNIEnv* env); | 349 bool RegisterContentViewCore(JNIEnv* env); |
| 350 | 350 |
| 351 } // namespace content | 351 } // namespace content |
| 352 | 352 |
| 353 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ | 353 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ |
| OLD | NEW |