| 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 <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 WebContents* web_contents, | 54 WebContents* web_contents, |
| 55 jobject view_android, | 55 jobject view_android, |
| 56 ui::WindowAndroid* window_android, | 56 ui::WindowAndroid* window_android, |
| 57 jobject java_bridge_retained_object_set); | 57 jobject java_bridge_retained_object_set); |
| 58 | 58 |
| 59 // ContentViewCore implementation. | 59 // ContentViewCore implementation. |
| 60 base::android::ScopedJavaLocalRef<jobject> GetJavaObject() override; | 60 base::android::ScopedJavaLocalRef<jobject> GetJavaObject() override; |
| 61 WebContents* GetWebContents() const override; | 61 WebContents* GetWebContents() const override; |
| 62 ui::WindowAndroid* GetWindowAndroid() const override; | 62 ui::WindowAndroid* GetWindowAndroid() const override; |
| 63 const scoped_refptr<cc::Layer>& GetLayer() const override; | 63 const scoped_refptr<cc::Layer>& GetLayer() const override; |
| 64 bool ShowPastePopup(int x, int y) override; | |
| 65 float GetDpiScale() const override; | 64 float GetDpiScale() const override; |
| 66 void PauseOrResumeGeolocation(bool should_pause) override; | 65 void PauseOrResumeGeolocation(bool should_pause) override; |
| 67 void RequestTextSurroundingSelection( | 66 void RequestTextSurroundingSelection( |
| 68 int max_length, | 67 int max_length, |
| 69 const base::Callback<void(const base::string16& content, | 68 const base::Callback<void(const base::string16& content, |
| 70 int start_offset, | 69 int start_offset, |
| 71 int end_offset)>& callback) override; | 70 int end_offset)>& callback) override; |
| 72 | 71 |
| 73 void AddObserver(ContentViewCoreImplObserver* observer); | 72 void AddObserver(ContentViewCoreImplObserver* observer); |
| 74 void RemoveObserver(ContentViewCoreImplObserver* observer); | 73 void RemoveObserver(ContentViewCoreImplObserver* observer); |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 333 void SetTitle(const base::string16& title); | 332 void SetTitle(const base::string16& title); |
| 334 void OnBackgroundColorChanged(SkColor color); | 333 void OnBackgroundColorChanged(SkColor color); |
| 335 | 334 |
| 336 bool HasFocus(); | 335 bool HasFocus(); |
| 337 void RequestDisallowInterceptTouchEvent(); | 336 void RequestDisallowInterceptTouchEvent(); |
| 338 void OnGestureEventAck(const blink::WebGestureEvent& event, | 337 void OnGestureEventAck(const blink::WebGestureEvent& event, |
| 339 InputEventAckState ack_result); | 338 InputEventAckState ack_result); |
| 340 bool FilterInputEvent(const blink::WebInputEvent& event); | 339 bool FilterInputEvent(const blink::WebInputEvent& event); |
| 341 void OnSelectionChanged(const std::string& text); | 340 void OnSelectionChanged(const std::string& text); |
| 342 void OnSelectionEvent(ui::SelectionEventType event, | 341 void OnSelectionEvent(ui::SelectionEventType event, |
| 343 const gfx::PointF& selection_anchor, | 342 const gfx::PointF& selection_anchor); |
| 344 const gfx::RectF& selection_rect); | |
| 345 | 343 |
| 346 void StartContentIntent(const GURL& content_url, bool is_main_frame); | 344 void StartContentIntent(const GURL& content_url, bool is_main_frame); |
| 347 | 345 |
| 348 // Shows the disambiguation popup | 346 // Shows the disambiguation popup |
| 349 // |rect_pixels| --> window coordinates which |zoomed_bitmap| represents | 347 // |rect_pixels| --> window coordinates which |zoomed_bitmap| represents |
| 350 // |zoomed_bitmap| --> magnified image of potential touch targets | 348 // |zoomed_bitmap| --> magnified image of potential touch targets |
| 351 void ShowDisambiguationPopup( | 349 void ShowDisambiguationPopup( |
| 352 const gfx::Rect& rect_pixels, const SkBitmap& zoomed_bitmap); | 350 const gfx::Rect& rect_pixels, const SkBitmap& zoomed_bitmap); |
| 353 | 351 |
| 354 // Creates a java-side touch event, used for injecting motion events for | 352 // Creates a java-side touch event, used for injecting motion events for |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 471 scoped_refptr<GinJavaBridgeDispatcherHost> java_bridge_dispatcher_host_; | 469 scoped_refptr<GinJavaBridgeDispatcherHost> java_bridge_dispatcher_host_; |
| 472 | 470 |
| 473 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl); | 471 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl); |
| 474 }; | 472 }; |
| 475 | 473 |
| 476 bool RegisterContentViewCore(JNIEnv* env); | 474 bool RegisterContentViewCore(JNIEnv* env); |
| 477 | 475 |
| 478 } // namespace content | 476 } // namespace content |
| 479 | 477 |
| 480 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ | 478 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ |
| OLD | NEW |