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

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: Fix animation tests 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 ClearHistory(JNIEnv* env, jobject obj); 163 void ClearHistory(JNIEnv* env, jobject obj);
162 void EvaluateJavaScript(JNIEnv* env, 164 void EvaluateJavaScript(JNIEnv* env,
163 jobject obj, 165 jobject obj,
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 int composition_start, int composition_end, 260 int composition_start, int composition_end,
259 bool show_ime_if_needed, bool is_non_ime_change); 261 bool show_ime_if_needed, bool is_non_ime_change);
260 void SetTitle(const base::string16& title); 262 void SetTitle(const base::string16& title);
261 void OnBackgroundColorChanged(SkColor color); 263 void OnBackgroundColorChanged(SkColor color);
262 264
263 bool HasFocus(); 265 bool HasFocus();
264 void OnGestureEventAck(const blink::WebGestureEvent& event, 266 void OnGestureEventAck(const blink::WebGestureEvent& event,
265 InputEventAckState ack_result); 267 InputEventAckState ack_result);
266 bool FilterInputEvent(const blink::WebInputEvent& event); 268 bool FilterInputEvent(const blink::WebInputEvent& event);
267 void OnSelectionChanged(const std::string& text); 269 void OnSelectionChanged(const std::string& text);
268 void OnSelectionBoundsChanged( 270 void OnSelectionEvent(SelectionEventType event,
269 const ViewHostMsg_SelectionBounds_Params& params); 271 const gfx::PointF& anchor_position);
272 scoped_ptr<TouchHandleDrawable> CreatePopupTouchHandleDrawable();
270 273
271 void StartContentIntent(const GURL& content_url); 274 void StartContentIntent(const GURL& content_url);
272 275
273 // Shows the disambiguation popup 276 // Shows the disambiguation popup
274 // |target_rect| --> window coordinates which |zoomed_bitmap| represents 277 // |target_rect| --> window coordinates which |zoomed_bitmap| represents
275 // |zoomed_bitmap| --> magnified image of potential touch targets 278 // |zoomed_bitmap| --> magnified image of potential touch targets
276 void ShowDisambiguationPopup( 279 void ShowDisambiguationPopup(
277 const gfx::Rect& target_rect, const SkBitmap& zoomed_bitmap); 280 const gfx::Rect& target_rect, const SkBitmap& zoomed_bitmap);
278 281
279 // Creates a java-side touch event, used for injecting touch event for 282 // Creates a java-side touch event, used for injecting touch event for
280 // testing/benchmarking purposes 283 // testing/benchmarking purposes
281 base::android::ScopedJavaLocalRef<jobject> CreateTouchEventSynthesizer(); 284 base::android::ScopedJavaLocalRef<jobject> CreateTouchEventSynthesizer();
282 285
283 base::android::ScopedJavaLocalRef<jobject> GetContentVideoViewClient(); 286 base::android::ScopedJavaLocalRef<jobject> GetContentVideoViewClient();
284 287
285 // Returns the context that the ContentViewCore was created with, it would 288 // Returns the context that the ContentViewCore was created with, it would
286 // typically be an Activity context for an on screen view. 289 // typically be an Activity context for an on screen view.
287 base::android::ScopedJavaLocalRef<jobject> GetContext(); 290 base::android::ScopedJavaLocalRef<jobject> GetContext();
288 291
289 // Returns True if the given media should be blocked to load. 292 // Returns True if the given media should be blocked to load.
290 bool ShouldBlockMediaRequest(const GURL& url); 293 bool ShouldBlockMediaRequest(const GURL& url);
291 294
292 void DidStopFlinging(); 295 void DidStopFlinging();
293 296
294 // Returns the viewport size after accounting for the viewport offset. 297 // Returns the viewport size after accounting for the viewport offset.
295 gfx::Size GetViewSize() const; 298 gfx::Size GetViewSize() const;
296 299
297 void SetAccessibilityEnabledInternal(bool enabled); 300 void SetAccessibilityEnabledInternal(bool enabled);
298 301
299 void ShowSelectionHandlesAutomatically() const;
300
301 bool IsFullscreenRequiredForOrientationLock() const; 302 bool IsFullscreenRequiredForOrientationLock() const;
302 303
303 // -------------------------------------------------------------------------- 304 // --------------------------------------------------------------------------
304 // Methods called from native code 305 // Methods called from native code
305 // -------------------------------------------------------------------------- 306 // --------------------------------------------------------------------------
306 307
307 gfx::Size GetPhysicalBackingSize() const; 308 gfx::Size GetPhysicalBackingSize() const;
308 gfx::Size GetViewportSizeDip() const; 309 gfx::Size GetViewportSizeDip() const;
309 gfx::Size GetViewportSizeOffsetDip() const; 310 gfx::Size GetViewportSizeOffsetDip() const;
310 float GetOverdrawBottomHeightDip() const; 311 float GetOverdrawBottomHeightDip() const;
311 312
312 void AttachLayer(scoped_refptr<cc::Layer> layer); 313 void AttachLayer(scoped_refptr<cc::Layer> layer);
313 void RemoveLayer(scoped_refptr<cc::Layer> layer); 314 void RemoveLayer(scoped_refptr<cc::Layer> layer);
314 315
316 void SelectBetweenCoordinates(const gfx::PointF& start,
317 const gfx::PointF& end);
318
315 private: 319 private:
316 class ContentViewUserData; 320 class ContentViewUserData;
317 321
318 friend class ContentViewUserData; 322 friend class ContentViewUserData;
319 virtual ~ContentViewCoreImpl(); 323 virtual ~ContentViewCoreImpl();
320 324
321 // WebContentsObserver implementation. 325 // WebContentsObserver implementation.
322 virtual void RenderViewReady() OVERRIDE; 326 virtual void RenderViewReady() OVERRIDE;
323 virtual void RenderViewHostChanged(RenderViewHost* old_host, 327 virtual void RenderViewHostChanged(RenderViewHost* old_host,
324 RenderViewHost* new_host) OVERRIDE; 328 RenderViewHost* new_host) OVERRIDE;
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 java_bridge_dispatcher_host_; 386 java_bridge_dispatcher_host_;
383 387
384 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl); 388 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl);
385 }; 389 };
386 390
387 bool RegisterContentViewCore(JNIEnv* env); 391 bool RegisterContentViewCore(JNIEnv* env);
388 392
389 } // namespace content 393 } // namespace content
390 394
391 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ 395 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/android/composited_touch_handle_drawable.cc ('k') | content/browser/android/content_view_core_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698