Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(135)

Side by Side Diff: content/browser/android/content_view_core_impl.h

Issue 335943002: [Android] Composited selection handle rendering (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@input_native_handles_final
Patch Set: Update android_webview.gyp Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 jfloat pos_x_1, 110 jfloat pos_x_1,
111 jfloat pos_y_1, 111 jfloat pos_y_1,
112 jint pointer_id_0, 112 jint pointer_id_0,
113 jint pointer_id_1, 113 jint pointer_id_1,
114 jfloat touch_major_0, 114 jfloat touch_major_0,
115 jfloat touch_major_1, 115 jfloat touch_major_1,
116 jfloat raw_pos_x, 116 jfloat raw_pos_x,
117 jfloat raw_pos_y, 117 jfloat raw_pos_y,
118 jint android_tool_type_0, 118 jint android_tool_type_0,
119 jint android_tool_type_1, 119 jint android_tool_type_1,
120 jint android_button_state); 120 jint android_button_state,
121 jboolean is_touch_handle_event);
121 jboolean SendMouseMoveEvent(JNIEnv* env, 122 jboolean SendMouseMoveEvent(JNIEnv* env,
122 jobject obj, 123 jobject obj,
123 jlong time_ms, 124 jlong time_ms,
124 jfloat x, 125 jfloat x,
125 jfloat y); 126 jfloat y);
126 jboolean SendMouseWheelEvent(JNIEnv* env, 127 jboolean SendMouseWheelEvent(JNIEnv* env,
127 jobject obj, 128 jobject obj,
128 jlong time_ms, 129 jlong time_ms,
129 jfloat x, 130 jfloat x,
130 jfloat y, 131 jfloat y,
(...skipping 13 matching lines...) Expand all
144 void LongPress(JNIEnv* env, jobject obj, jlong time_ms, 145 void LongPress(JNIEnv* env, jobject obj, jlong time_ms,
145 jfloat x, jfloat y); 146 jfloat x, jfloat y);
146 void PinchBegin(JNIEnv* env, jobject obj, jlong time_ms, jfloat x, jfloat y); 147 void PinchBegin(JNIEnv* env, jobject obj, jlong time_ms, jfloat x, jfloat y);
147 void PinchEnd(JNIEnv* env, jobject obj, jlong time_ms); 148 void PinchEnd(JNIEnv* env, jobject obj, jlong time_ms);
148 void PinchBy(JNIEnv* env, jobject obj, jlong time_ms, 149 void PinchBy(JNIEnv* env, jobject obj, jlong time_ms,
149 jfloat x, jfloat y, jfloat delta); 150 jfloat x, jfloat y, jfloat delta);
150 void SelectBetweenCoordinates(JNIEnv* env, jobject obj, 151 void SelectBetweenCoordinates(JNIEnv* env, jobject obj,
151 jfloat x1, jfloat y1, 152 jfloat x1, jfloat y1,
152 jfloat x2, jfloat y2); 153 jfloat x2, jfloat y2);
153 void MoveCaret(JNIEnv* env, jobject obj, jfloat x, jfloat y); 154 void MoveCaret(JNIEnv* env, jobject obj, jfloat x, jfloat y);
155 void HideTextHandles(JNIEnv* env, jobject obj);
154 156
155 void ResetGestureDetection(JNIEnv* env, jobject obj); 157 void ResetGestureDetection(JNIEnv* env, jobject obj);
156 void SetDoubleTapSupportEnabled(JNIEnv* env, jobject obj, jboolean enabled); 158 void SetDoubleTapSupportEnabled(JNIEnv* env, jobject obj, jboolean enabled);
157 void SetMultiTouchZoomSupportEnabled(JNIEnv* env, 159 void SetMultiTouchZoomSupportEnabled(JNIEnv* env,
158 jobject obj, 160 jobject obj,
159 jboolean enabled); 161 jboolean enabled);
160 162
161 void AddStyleSheetByURL(JNIEnv* env, jobject obj, jstring url); 163 void AddStyleSheetByURL(JNIEnv* env, jobject obj, jstring url);
162 void ClearHistory(JNIEnv* env, jobject obj); 164 void ClearHistory(JNIEnv* env, jobject obj);
163 void EvaluateJavaScript(JNIEnv* env, 165 void EvaluateJavaScript(JNIEnv* env,
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 int composition_start, int composition_end, 279 int composition_start, int composition_end,
278 bool show_ime_if_needed, bool is_non_ime_change); 280 bool show_ime_if_needed, bool is_non_ime_change);
279 void SetTitle(const base::string16& title); 281 void SetTitle(const base::string16& title);
280 void OnBackgroundColorChanged(SkColor color); 282 void OnBackgroundColorChanged(SkColor color);
281 283
282 bool HasFocus(); 284 bool HasFocus();
283 void OnGestureEventAck(const blink::WebGestureEvent& event, 285 void OnGestureEventAck(const blink::WebGestureEvent& event,
284 InputEventAckState ack_result); 286 InputEventAckState ack_result);
285 bool FilterInputEvent(const blink::WebInputEvent& event); 287 bool FilterInputEvent(const blink::WebInputEvent& event);
286 void OnSelectionChanged(const std::string& text); 288 void OnSelectionChanged(const std::string& text);
287 void OnSelectionBoundsChanged( 289 void OnSelectionEvent(SelectionEventType event,
288 const ViewHostMsg_SelectionBounds_Params& params); 290 const gfx::PointF& anchor_position);
291 scoped_ptr<TouchHandleDrawable> CreatePopupTouchHandleDrawable();
289 292
290 void StartContentIntent(const GURL& content_url); 293 void StartContentIntent(const GURL& content_url);
291 294
292 // Shows the disambiguation popup 295 // Shows the disambiguation popup
293 // |target_rect| --> window coordinates which |zoomed_bitmap| represents 296 // |target_rect| --> window coordinates which |zoomed_bitmap| represents
294 // |zoomed_bitmap| --> magnified image of potential touch targets 297 // |zoomed_bitmap| --> magnified image of potential touch targets
295 void ShowDisambiguationPopup( 298 void ShowDisambiguationPopup(
296 const gfx::Rect& target_rect, const SkBitmap& zoomed_bitmap); 299 const gfx::Rect& target_rect, const SkBitmap& zoomed_bitmap);
297 300
298 // Creates a java-side touch event, used for injecting touch event for 301 // Creates a java-side touch event, used for injecting touch event for
299 // testing/benchmarking purposes 302 // testing/benchmarking purposes
300 base::android::ScopedJavaLocalRef<jobject> CreateTouchEventSynthesizer(); 303 base::android::ScopedJavaLocalRef<jobject> CreateTouchEventSynthesizer();
301 304
302 base::android::ScopedJavaLocalRef<jobject> GetContentVideoViewClient(); 305 base::android::ScopedJavaLocalRef<jobject> GetContentVideoViewClient();
303 306
304 // Returns the context that the ContentViewCore was created with, it would 307 // Returns the context that the ContentViewCore was created with, it would
305 // typically be an Activity context for an on screen view. 308 // typically be an Activity context for an on screen view.
306 base::android::ScopedJavaLocalRef<jobject> GetContext(); 309 base::android::ScopedJavaLocalRef<jobject> GetContext();
307 310
308 // Returns True if the given media should be blocked to load. 311 // Returns True if the given media should be blocked to load.
309 bool ShouldBlockMediaRequest(const GURL& url); 312 bool ShouldBlockMediaRequest(const GURL& url);
310 313
311 void DidStopFlinging(); 314 void DidStopFlinging();
312 315
313 // Returns the viewport size after accounting for the viewport offset. 316 // Returns the viewport size after accounting for the viewport offset.
314 gfx::Size GetViewSize() const; 317 gfx::Size GetViewSize() const;
315 318
316 void SetAccessibilityEnabledInternal(bool enabled); 319 void SetAccessibilityEnabledInternal(bool enabled);
317 320
318 void ShowSelectionHandlesAutomatically() const;
319
320 bool IsFullscreenRequiredForOrientationLock() const; 321 bool IsFullscreenRequiredForOrientationLock() const;
321 322
322 // -------------------------------------------------------------------------- 323 // --------------------------------------------------------------------------
323 // Methods called from native code 324 // Methods called from native code
324 // -------------------------------------------------------------------------- 325 // --------------------------------------------------------------------------
325 326
326 gfx::Size GetPhysicalBackingSize() const; 327 gfx::Size GetPhysicalBackingSize() const;
327 gfx::Size GetViewportSizeDip() const; 328 gfx::Size GetViewportSizeDip() const;
328 gfx::Size GetViewportSizeOffsetDip() const; 329 gfx::Size GetViewportSizeOffsetDip() const;
329 float GetOverdrawBottomHeightDip() const; 330 float GetOverdrawBottomHeightDip() const;
330 331
331 void AttachLayer(scoped_refptr<cc::Layer> layer); 332 void AttachLayer(scoped_refptr<cc::Layer> layer);
332 void RemoveLayer(scoped_refptr<cc::Layer> layer); 333 void RemoveLayer(scoped_refptr<cc::Layer> layer);
333 334
335 void SelectBetweenCoordinates(const gfx::PointF& start,
336 const gfx::PointF& end);
337
334 private: 338 private:
335 class ContentViewUserData; 339 class ContentViewUserData;
336 340
337 friend class ContentViewUserData; 341 friend class ContentViewUserData;
338 virtual ~ContentViewCoreImpl(); 342 virtual ~ContentViewCoreImpl();
339 343
340 // WebContentsObserver implementation. 344 // WebContentsObserver implementation.
341 virtual void RenderViewReady() OVERRIDE; 345 virtual void RenderViewReady() OVERRIDE;
342 virtual void RenderViewHostChanged(RenderViewHost* old_host, 346 virtual void RenderViewHostChanged(RenderViewHost* old_host,
343 RenderViewHost* new_host) OVERRIDE; 347 RenderViewHost* new_host) OVERRIDE;
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 java_bridge_dispatcher_host_; 405 java_bridge_dispatcher_host_;
402 406
403 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl); 407 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl);
404 }; 408 };
405 409
406 bool RegisterContentViewCore(JNIEnv* env); 410 bool RegisterContentViewCore(JNIEnv* env);
407 411
408 } // namespace content 412 } // namespace content
409 413
410 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ 414 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698