| 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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 const base::android::JavaParamRef<jobject>& obj); | 164 const base::android::JavaParamRef<jobject>& obj); |
| 165 void SetDoubleTapSupportEnabled( | 165 void SetDoubleTapSupportEnabled( |
| 166 JNIEnv* env, | 166 JNIEnv* env, |
| 167 const base::android::JavaParamRef<jobject>& obj, | 167 const base::android::JavaParamRef<jobject>& obj, |
| 168 jboolean enabled); | 168 jboolean enabled); |
| 169 void SetMultiTouchZoomSupportEnabled( | 169 void SetMultiTouchZoomSupportEnabled( |
| 170 JNIEnv* env, | 170 JNIEnv* env, |
| 171 const base::android::JavaParamRef<jobject>& obj, | 171 const base::android::JavaParamRef<jobject>& obj, |
| 172 jboolean enabled); | 172 jboolean enabled); |
| 173 | 173 |
| 174 long GetNativeImeAdapter(JNIEnv* env, |
| 175 const base::android::JavaParamRef<jobject>& obj); |
| 174 void SetFocus(JNIEnv* env, | 176 void SetFocus(JNIEnv* env, |
| 175 const base::android::JavaParamRef<jobject>& obj, | 177 const base::android::JavaParamRef<jobject>& obj, |
| 176 jboolean focused); | 178 jboolean focused); |
| 177 | 179 |
| 178 void SetDIPScale(JNIEnv* env, | 180 void SetDIPScale(JNIEnv* env, |
| 179 const base::android::JavaParamRef<jobject>& obj, | 181 const base::android::JavaParamRef<jobject>& obj, |
| 180 jfloat dipScale); | 182 jfloat dipScale); |
| 181 | 183 |
| 182 jint GetBackgroundColor(JNIEnv* env, jobject obj); | 184 jint GetBackgroundColor(JNIEnv* env, jobject obj); |
| 183 void SetAllowJavascriptInterfacesInspection( | 185 void SetAllowJavascriptInterfacesInspection( |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 void UpdateFrameInfo(const gfx::Vector2dF& scroll_offset, | 258 void UpdateFrameInfo(const gfx::Vector2dF& scroll_offset, |
| 257 float page_scale_factor, | 259 float page_scale_factor, |
| 258 const gfx::Vector2dF& page_scale_factor_limits, | 260 const gfx::Vector2dF& page_scale_factor_limits, |
| 259 const gfx::SizeF& content_size, | 261 const gfx::SizeF& content_size, |
| 260 const gfx::SizeF& viewport_size, | 262 const gfx::SizeF& viewport_size, |
| 261 const float top_controls_height, | 263 const float top_controls_height, |
| 262 const float top_controls_shown_ratio, | 264 const float top_controls_shown_ratio, |
| 263 bool is_mobile_optimized_hint, | 265 bool is_mobile_optimized_hint, |
| 264 const gfx::SelectionBound& selection_start); | 266 const gfx::SelectionBound& selection_start); |
| 265 | 267 |
| 268 void ForceUpdateImeAdapter(long native_ime_adapter); |
| 269 void UpdateImeAdapter(long native_ime_adapter, |
| 270 int text_input_type, |
| 271 int text_input_flags, |
| 272 int text_input_mode, |
| 273 const std::string& text, |
| 274 int selection_start, |
| 275 int selection_end, |
| 276 int composition_start, |
| 277 int composition_end, |
| 278 bool show_ime_if_needed, |
| 279 bool reply_to_request); |
| 280 |
| 266 bool HasFocus(); | 281 bool HasFocus(); |
| 267 void RequestDisallowInterceptTouchEvent(); | 282 void RequestDisallowInterceptTouchEvent(); |
| 268 void OnGestureEventAck(const blink::WebGestureEvent& event, | 283 void OnGestureEventAck(const blink::WebGestureEvent& event, |
| 269 InputEventAckState ack_result); | 284 InputEventAckState ack_result); |
| 270 bool FilterInputEvent(const blink::WebInputEvent& event); | 285 bool FilterInputEvent(const blink::WebInputEvent& event); |
| 271 void OnSelectionChanged(const std::string& text); | 286 void OnSelectionChanged(const std::string& text); |
| 272 void OnSelectionEvent(ui::SelectionEventType event, | 287 void OnSelectionEvent(ui::SelectionEventType event, |
| 273 const gfx::PointF& selection_anchor, | 288 const gfx::PointF& selection_anchor, |
| 274 const gfx::RectF& selection_rect); | 289 const gfx::RectF& selection_rect); |
| 275 | 290 |
| 276 // Shows the disambiguation popup | 291 // Shows the disambiguation popup |
| 277 // |rect_pixels| --> window coordinates which |zoomed_bitmap| represents | 292 // |rect_pixels| --> window coordinates which |zoomed_bitmap| represents |
| 278 // |zoomed_bitmap| --> magnified image of potential touch targets | 293 // |zoomed_bitmap| --> magnified image of potential touch targets |
| 279 void ShowDisambiguationPopup( | 294 void ShowDisambiguationPopup( |
| 280 const gfx::Rect& rect_pixels, const SkBitmap& zoomed_bitmap); | 295 const gfx::Rect& rect_pixels, const SkBitmap& zoomed_bitmap); |
| 281 | 296 |
| 282 // Creates a java-side touch event, used for injecting motion events for | 297 // Creates a java-side touch event, used for injecting motion events for |
| 283 // testing/benchmarking purposes. | 298 // testing/benchmarking purposes. |
| 284 base::android::ScopedJavaLocalRef<jobject> CreateMotionEventSynthesizer(); | 299 base::android::ScopedJavaLocalRef<jobject> CreateMotionEventSynthesizer(); |
| 285 | 300 |
| 286 void DidStopFlinging(); | 301 void DidStopFlinging(); |
| 287 | 302 |
| 288 // Returns the context with which the ContentViewCore was created, typically | 303 // Returns the context with which the ContentViewCore was created, typically |
| 289 // the Activity context. | 304 // the Activity context. |
| 290 base::android::ScopedJavaLocalRef<jobject> GetContext() const; | 305 base::android::ScopedJavaLocalRef<jobject> GetContext() const; |
| 291 | 306 |
| 292 // Returns the viewport size after accounting for the viewport offset. | 307 // Returns the viewport size after accounting for the viewport offset. |
| 293 gfx::Size GetViewSize() const; | 308 gfx::Size GetViewSize() const; |
| 294 | 309 |
| 310 gfx::Size GetViewSizeWithOSKHidden() const; |
| 311 |
| 295 void SetAccessibilityEnabledInternal(bool enabled); | 312 void SetAccessibilityEnabledInternal(bool enabled); |
| 296 | 313 |
| 297 bool IsFullscreenRequiredForOrientationLock() const; | 314 bool IsFullscreenRequiredForOrientationLock() const; |
| 298 | 315 |
| 299 // -------------------------------------------------------------------------- | 316 // -------------------------------------------------------------------------- |
| 300 // Methods called from native code | 317 // Methods called from native code |
| 301 // -------------------------------------------------------------------------- | 318 // -------------------------------------------------------------------------- |
| 302 | 319 |
| 303 gfx::Size GetPhysicalBackingSize() const; | 320 gfx::Size GetPhysicalBackingSize() const; |
| 304 gfx::Size GetViewportSizeDip() const; | 321 gfx::Size GetViewportSizeDip() const; |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 385 scoped_refptr<GinJavaBridgeDispatcherHost> java_bridge_dispatcher_host_; | 402 scoped_refptr<GinJavaBridgeDispatcherHost> java_bridge_dispatcher_host_; |
| 386 | 403 |
| 387 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl); | 404 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl); |
| 388 }; | 405 }; |
| 389 | 406 |
| 390 bool RegisterContentViewCore(JNIEnv* env); | 407 bool RegisterContentViewCore(JNIEnv* env); |
| 391 | 408 |
| 392 } // namespace content | 409 } // namespace content |
| 393 | 410 |
| 394 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ | 411 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ |
| OLD | NEW |