| 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 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 316 bool right_aligned); | 316 bool right_aligned); |
| 317 // Hides a visible popup menu. | 317 // Hides a visible popup menu. |
| 318 void HideSelectPopupMenu(); | 318 void HideSelectPopupMenu(); |
| 319 | 319 |
| 320 // All sizes and offsets are in CSS pixels as cached by the renderer. | 320 // All sizes and offsets are in CSS pixels as cached by the renderer. |
| 321 void UpdateFrameInfo(const gfx::Vector2dF& scroll_offset, | 321 void UpdateFrameInfo(const gfx::Vector2dF& scroll_offset, |
| 322 float page_scale_factor, | 322 float page_scale_factor, |
| 323 const gfx::Vector2dF& page_scale_factor_limits, | 323 const gfx::Vector2dF& page_scale_factor_limits, |
| 324 const gfx::SizeF& content_size, | 324 const gfx::SizeF& content_size, |
| 325 const gfx::SizeF& viewport_size, | 325 const gfx::SizeF& viewport_size, |
| 326 const gfx::Vector2dF& controls_offset, | 326 const gfx::Vector2dF& top_controls_height, |
| 327 const gfx::Vector2dF& content_offset, | 327 const float top_controls_shown_ratio, |
| 328 const gfx::Vector2dF& bottom_controls_height, |
| 329 const float bottom_controls_shown_ratio, |
| 328 bool is_mobile_optimized_hint, | 330 bool is_mobile_optimized_hint, |
| 329 const gfx::SelectionBound& selection_start); | 331 const gfx::SelectionBound& selection_start); |
| 330 | 332 |
| 331 void ForceUpdateImeAdapter(long native_ime_adapter); | 333 void ForceUpdateImeAdapter(long native_ime_adapter); |
| 332 void UpdateImeAdapter(long native_ime_adapter, | 334 void UpdateImeAdapter(long native_ime_adapter, |
| 333 int text_input_type, | 335 int text_input_type, |
| 334 int text_input_flags, | 336 int text_input_flags, |
| 335 const std::string& text, | 337 const std::string& text, |
| 336 int selection_start, | 338 int selection_start, |
| 337 int selection_end, | 339 int selection_end, |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 383 bool IsFullscreenRequiredForOrientationLock() const; | 385 bool IsFullscreenRequiredForOrientationLock() const; |
| 384 | 386 |
| 385 // -------------------------------------------------------------------------- | 387 // -------------------------------------------------------------------------- |
| 386 // Methods called from native code | 388 // Methods called from native code |
| 387 // -------------------------------------------------------------------------- | 389 // -------------------------------------------------------------------------- |
| 388 | 390 |
| 389 gfx::Size GetPhysicalBackingSize() const; | 391 gfx::Size GetPhysicalBackingSize() const; |
| 390 gfx::Size GetViewportSizeDip() const; | 392 gfx::Size GetViewportSizeDip() const; |
| 391 bool DoTopControlsShrinkBlinkSize() const; | 393 bool DoTopControlsShrinkBlinkSize() const; |
| 392 float GetTopControlsHeightDip() const; | 394 float GetTopControlsHeightDip() const; |
| 395 float GetBottomControlsHeightDip() const; |
| 393 | 396 |
| 394 void AttachLayer(scoped_refptr<cc::Layer> layer); | 397 void AttachLayer(scoped_refptr<cc::Layer> layer); |
| 395 void RemoveLayer(scoped_refptr<cc::Layer> layer); | 398 void RemoveLayer(scoped_refptr<cc::Layer> layer); |
| 396 | 399 |
| 397 void MoveRangeSelectionExtent(const gfx::PointF& extent); | 400 void MoveRangeSelectionExtent(const gfx::PointF& extent); |
| 398 | 401 |
| 399 void SelectBetweenCoordinates(const gfx::PointF& base, | 402 void SelectBetweenCoordinates(const gfx::PointF& base, |
| 400 const gfx::PointF& extent); | 403 const gfx::PointF& extent); |
| 401 | 404 |
| 402 void OnShowUnhandledTapUIIfNeeded(int x_dip, int y_dip); | 405 void OnShowUnhandledTapUIIfNeeded(int x_dip, int y_dip); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 427 | 430 |
| 428 RenderWidgetHostViewAndroid* GetRenderWidgetHostViewAndroid() const; | 431 RenderWidgetHostViewAndroid* GetRenderWidgetHostViewAndroid() const; |
| 429 | 432 |
| 430 blink::WebGestureEvent MakeGestureEvent(blink::WebInputEvent::Type type, | 433 blink::WebGestureEvent MakeGestureEvent(blink::WebInputEvent::Type type, |
| 431 int64_t time_ms, | 434 int64_t time_ms, |
| 432 float x, | 435 float x, |
| 433 float y) const; | 436 float y) const; |
| 434 | 437 |
| 435 gfx::Size GetViewportSizePix() const; | 438 gfx::Size GetViewportSizePix() const; |
| 436 int GetTopControlsHeightPix() const; | 439 int GetTopControlsHeightPix() const; |
| 440 int GetBottomControlsHeightPix() const; |
| 437 | 441 |
| 438 void SendGestureEvent(const blink::WebGestureEvent& event); | 442 void SendGestureEvent(const blink::WebGestureEvent& event); |
| 439 | 443 |
| 440 // Update focus state of the RenderWidgetHostView. | 444 // Update focus state of the RenderWidgetHostView. |
| 441 void SetFocusInternal(bool focused); | 445 void SetFocusInternal(bool focused); |
| 442 | 446 |
| 443 // Send device_orientation_ to renderer. | 447 // Send device_orientation_ to renderer. |
| 444 void SendOrientationChangeEventInternal(); | 448 void SendOrientationChangeEventInternal(); |
| 445 | 449 |
| 446 float dpi_scale() const { return dpi_scale_; } | 450 float dpi_scale() const { return dpi_scale_; } |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 480 scoped_refptr<GinJavaBridgeDispatcherHost> java_bridge_dispatcher_host_; | 484 scoped_refptr<GinJavaBridgeDispatcherHost> java_bridge_dispatcher_host_; |
| 481 | 485 |
| 482 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl); | 486 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl); |
| 483 }; | 487 }; |
| 484 | 488 |
| 485 bool RegisterContentViewCore(JNIEnv* env); | 489 bool RegisterContentViewCore(JNIEnv* env); |
| 486 | 490 |
| 487 } // namespace content | 491 } // namespace content |
| 488 | 492 |
| 489 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ | 493 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ |
| OLD | NEW |