| 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 AttachLayer(scoped_refptr<cc::Layer> layer); | 393 void AttachLayer(scoped_refptr<cc::Layer> layer); |
| 391 void RemoveLayer(scoped_refptr<cc::Layer> layer); | 394 void RemoveLayer(scoped_refptr<cc::Layer> layer); |
| 392 | 395 |
| 393 void MoveRangeSelectionExtent(const gfx::PointF& extent); | 396 void MoveRangeSelectionExtent(const gfx::PointF& extent); |
| 394 | 397 |
| 395 void SelectBetweenCoordinates(const gfx::PointF& base, | 398 void SelectBetweenCoordinates(const gfx::PointF& base, |
| 396 const gfx::PointF& extent); | 399 const gfx::PointF& extent); |
| 397 | 400 |
| 398 void OnShowUnhandledTapUIIfNeeded(int x_dip, int y_dip); | 401 void OnShowUnhandledTapUIIfNeeded(int x_dip, int y_dip); |
| (...skipping 26 matching lines...) Expand all Loading... |
| 425 | 428 |
| 426 RenderWidgetHostViewAndroid* GetRenderWidgetHostViewAndroid() const; | 429 RenderWidgetHostViewAndroid* GetRenderWidgetHostViewAndroid() const; |
| 427 | 430 |
| 428 blink::WebGestureEvent MakeGestureEvent(blink::WebInputEvent::Type type, | 431 blink::WebGestureEvent MakeGestureEvent(blink::WebInputEvent::Type type, |
| 429 int64_t time_ms, | 432 int64_t time_ms, |
| 430 float x, | 433 float x, |
| 431 float y) const; | 434 float y) const; |
| 432 | 435 |
| 433 gfx::Size GetViewportSizePix() const; | 436 gfx::Size GetViewportSizePix() const; |
| 434 int GetTopControlsHeightPix() const; | 437 int GetTopControlsHeightPix() const; |
| 438 int GetBottomControlsHeightPix() const; |
| 435 | 439 |
| 436 void SendGestureEvent(const blink::WebGestureEvent& event); | 440 void SendGestureEvent(const blink::WebGestureEvent& event); |
| 437 | 441 |
| 438 // Update focus state of the RenderWidgetHostView. | 442 // Update focus state of the RenderWidgetHostView. |
| 439 void SetFocusInternal(bool focused); | 443 void SetFocusInternal(bool focused); |
| 440 | 444 |
| 441 // Send device_orientation_ to renderer. | 445 // Send device_orientation_ to renderer. |
| 442 void SendOrientationChangeEventInternal(); | 446 void SendOrientationChangeEventInternal(); |
| 443 | 447 |
| 444 float dpi_scale() const { return dpi_scale_; } | 448 float dpi_scale() const { return dpi_scale_; } |
| (...skipping 29 matching lines...) Expand all Loading... |
| 474 scoped_refptr<GinJavaBridgeDispatcherHost> java_bridge_dispatcher_host_; | 478 scoped_refptr<GinJavaBridgeDispatcherHost> java_bridge_dispatcher_host_; |
| 475 | 479 |
| 476 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl); | 480 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl); |
| 477 }; | 481 }; |
| 478 | 482 |
| 479 bool RegisterContentViewCore(JNIEnv* env); | 483 bool RegisterContentViewCore(JNIEnv* env); |
| 480 | 484 |
| 481 } // namespace content | 485 } // namespace content |
| 482 | 486 |
| 483 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ | 487 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ |
| OLD | NEW |