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 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
312 bool right_aligned); | 312 bool right_aligned); |
313 // Hides a visible popup menu. | 313 // Hides a visible popup menu. |
314 void HideSelectPopupMenu(); | 314 void HideSelectPopupMenu(); |
315 | 315 |
316 // All sizes and offsets are in CSS pixels as cached by the renderer. | 316 // All sizes and offsets are in CSS pixels as cached by the renderer. |
317 void UpdateFrameInfo(const gfx::Vector2dF& scroll_offset, | 317 void UpdateFrameInfo(const gfx::Vector2dF& scroll_offset, |
318 float page_scale_factor, | 318 float page_scale_factor, |
319 const gfx::Vector2dF& page_scale_factor_limits, | 319 const gfx::Vector2dF& page_scale_factor_limits, |
320 const gfx::SizeF& content_size, | 320 const gfx::SizeF& content_size, |
321 const gfx::SizeF& viewport_size, | 321 const gfx::SizeF& viewport_size, |
322 const gfx::Vector2dF& controls_offset, | 322 const float top_controls_height, |
323 const gfx::Vector2dF& content_offset, | 323 const float top_controls_shown_ratio, |
| 324 const float bottom_controls_height, |
| 325 const float bottom_controls_shown_ratio, |
324 bool is_mobile_optimized_hint, | 326 bool is_mobile_optimized_hint, |
325 const gfx::SelectionBound& selection_start); | 327 const gfx::SelectionBound& selection_start); |
326 | 328 |
327 void ForceUpdateImeAdapter(long native_ime_adapter); | 329 void ForceUpdateImeAdapter(long native_ime_adapter); |
328 void UpdateImeAdapter(long native_ime_adapter, | 330 void UpdateImeAdapter(long native_ime_adapter, |
329 int text_input_type, | 331 int text_input_type, |
330 int text_input_flags, | 332 int text_input_flags, |
331 const std::string& text, | 333 const std::string& text, |
332 int selection_start, | 334 int selection_start, |
333 int selection_end, | 335 int selection_end, |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
379 bool IsFullscreenRequiredForOrientationLock() const; | 381 bool IsFullscreenRequiredForOrientationLock() const; |
380 | 382 |
381 // -------------------------------------------------------------------------- | 383 // -------------------------------------------------------------------------- |
382 // Methods called from native code | 384 // Methods called from native code |
383 // -------------------------------------------------------------------------- | 385 // -------------------------------------------------------------------------- |
384 | 386 |
385 gfx::Size GetPhysicalBackingSize() const; | 387 gfx::Size GetPhysicalBackingSize() const; |
386 gfx::Size GetViewportSizeDip() const; | 388 gfx::Size GetViewportSizeDip() const; |
387 bool DoTopControlsShrinkBlinkSize() const; | 389 bool DoTopControlsShrinkBlinkSize() const; |
388 float GetTopControlsHeightDip() const; | 390 float GetTopControlsHeightDip() const; |
| 391 float GetBottomControlsHeightDip() const; |
389 | 392 |
390 void MoveRangeSelectionExtent(const gfx::PointF& extent); | 393 void MoveRangeSelectionExtent(const gfx::PointF& extent); |
391 | 394 |
392 void SelectBetweenCoordinates(const gfx::PointF& base, | 395 void SelectBetweenCoordinates(const gfx::PointF& base, |
393 const gfx::PointF& extent); | 396 const gfx::PointF& extent); |
394 | 397 |
395 void OnShowUnhandledTapUIIfNeeded(int x_dip, int y_dip); | 398 void OnShowUnhandledTapUIIfNeeded(int x_dip, int y_dip); |
396 | 399 |
397 ui::ViewAndroid* GetViewAndroid(); | 400 ui::ViewAndroid* GetViewAndroid(); |
398 | 401 |
(...skipping 23 matching lines...) Expand all Loading... |
422 | 425 |
423 RenderWidgetHostViewAndroid* GetRenderWidgetHostViewAndroid() const; | 426 RenderWidgetHostViewAndroid* GetRenderWidgetHostViewAndroid() const; |
424 | 427 |
425 blink::WebGestureEvent MakeGestureEvent(blink::WebInputEvent::Type type, | 428 blink::WebGestureEvent MakeGestureEvent(blink::WebInputEvent::Type type, |
426 int64_t time_ms, | 429 int64_t time_ms, |
427 float x, | 430 float x, |
428 float y) const; | 431 float y) const; |
429 | 432 |
430 gfx::Size GetViewportSizePix() const; | 433 gfx::Size GetViewportSizePix() const; |
431 int GetTopControlsHeightPix() const; | 434 int GetTopControlsHeightPix() const; |
| 435 int GetBottomControlsHeightPix() const; |
432 | 436 |
433 void SendGestureEvent(const blink::WebGestureEvent& event); | 437 void SendGestureEvent(const blink::WebGestureEvent& event); |
434 | 438 |
435 // Update focus state of the RenderWidgetHostView. | 439 // Update focus state of the RenderWidgetHostView. |
436 void SetFocusInternal(bool focused); | 440 void SetFocusInternal(bool focused); |
437 | 441 |
438 // Send device_orientation_ to renderer. | 442 // Send device_orientation_ to renderer. |
439 void SendOrientationChangeEventInternal(); | 443 void SendOrientationChangeEventInternal(); |
440 | 444 |
441 float dpi_scale() const { return dpi_scale_; } | 445 float dpi_scale() const { return dpi_scale_; } |
(...skipping 29 matching lines...) Expand all Loading... |
471 scoped_refptr<GinJavaBridgeDispatcherHost> java_bridge_dispatcher_host_; | 475 scoped_refptr<GinJavaBridgeDispatcherHost> java_bridge_dispatcher_host_; |
472 | 476 |
473 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl); | 477 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl); |
474 }; | 478 }; |
475 | 479 |
476 bool RegisterContentViewCore(JNIEnv* env); | 480 bool RegisterContentViewCore(JNIEnv* env); |
477 | 481 |
478 } // namespace content | 482 } // namespace content |
479 | 483 |
480 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ | 484 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ |
OLD | NEW |