| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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_RENDERER_RENDER_WIDGET_H_ | 5 #ifndef CONTENT_RENDERER_RENDER_WIDGET_H_ |
| 6 #define CONTENT_RENDERER_RENDER_WIDGET_H_ | 6 #define CONTENT_RENDERER_RENDER_WIDGET_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <map> | 9 #include <map> |
| 10 | 10 |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 310 void OnSmoothScrollCompleted(int gesture_id); | 310 void OnSmoothScrollCompleted(int gesture_id); |
| 311 void OnSetTextDirection(WebKit::WebTextDirection direction); | 311 void OnSetTextDirection(WebKit::WebTextDirection direction); |
| 312 void OnGetFPS(); | 312 void OnGetFPS(); |
| 313 void OnScreenInfoChanged(const WebKit::WebScreenInfo& screen_info); | 313 void OnScreenInfoChanged(const WebKit::WebScreenInfo& screen_info); |
| 314 void OnUpdateScreenRects(const gfx::Rect& view_screen_rect, | 314 void OnUpdateScreenRects(const gfx::Rect& view_screen_rect, |
| 315 const gfx::Rect& window_screen_rect); | 315 const gfx::Rect& window_screen_rect); |
| 316 #if defined(OS_ANDROID) | 316 #if defined(OS_ANDROID) |
| 317 void OnImeBatchStateChanged(bool is_begin); | 317 void OnImeBatchStateChanged(bool is_begin); |
| 318 void OnShowImeIfNeeded(); | 318 void OnShowImeIfNeeded(); |
| 319 #endif | 319 #endif |
| 320 void OnSnapshot(const gfx::Rect& src_subrect); |
| 320 | 321 |
| 321 // Notify the compositor about a change in viewport size. This should be | 322 // Notify the compositor about a change in viewport size. This should be |
| 322 // used only with auto resize mode WebWidgets, as normal WebWidgets should | 323 // used only with auto resize mode WebWidgets, as normal WebWidgets should |
| 323 // go through OnResize. | 324 // go through OnResize. |
| 324 void AutoResizeCompositor(); | 325 void AutoResizeCompositor(); |
| 325 | 326 |
| 326 virtual void SetDeviceScaleFactor(float device_scale_factor); | 327 virtual void SetDeviceScaleFactor(float device_scale_factor); |
| 327 | 328 |
| 328 // Override points to notify derived classes that a paint has happened. | 329 // Override points to notify derived classes that a paint has happened. |
| 329 // WillInitiatePaint happens when we're about to generate a new bitmap and | 330 // WillInitiatePaint happens when we're about to generate a new bitmap and |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 471 virtual void DidHandleTouchEvent(const WebKit::WebTouchEvent& event) {} | 472 virtual void DidHandleTouchEvent(const WebKit::WebTouchEvent& event) {} |
| 472 | 473 |
| 473 // Check whether the WebWidget has any touch event handlers registered | 474 // Check whether the WebWidget has any touch event handlers registered |
| 474 // at the given point. | 475 // at the given point. |
| 475 virtual bool HasTouchEventHandlersAt(const gfx::Point& point) const; | 476 virtual bool HasTouchEventHandlersAt(const gfx::Point& point) const; |
| 476 | 477 |
| 477 // Creates a 3D context associated with this view. | 478 // Creates a 3D context associated with this view. |
| 478 WebKit::WebGraphicsContext3D* CreateGraphicsContext3D( | 479 WebKit::WebGraphicsContext3D* CreateGraphicsContext3D( |
| 479 const WebKit::WebGraphicsContext3D::Attributes& attributes); | 480 const WebKit::WebGraphicsContext3D::Attributes& attributes); |
| 480 | 481 |
| 482 bool OnSnapshotHelper(const gfx::Rect& src_subrect, SkBitmap* bitmap); |
| 483 |
| 481 // Routing ID that allows us to communicate to the parent browser process | 484 // Routing ID that allows us to communicate to the parent browser process |
| 482 // RenderWidgetHost. When MSG_ROUTING_NONE, no messages may be sent. | 485 // RenderWidgetHost. When MSG_ROUTING_NONE, no messages may be sent. |
| 483 int32 routing_id_; | 486 int32 routing_id_; |
| 484 | 487 |
| 485 int32 surface_id_; | 488 int32 surface_id_; |
| 486 | 489 |
| 487 // We are responsible for destroying this object via its Close method. | 490 // We are responsible for destroying this object via its Close method. |
| 488 WebKit::WebWidget* webwidget_; | 491 WebKit::WebWidget* webwidget_; |
| 489 | 492 |
| 490 // This is lazily constructed and must not outlive webwidget_. | 493 // This is lazily constructed and must not outlive webwidget_. |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 680 bool is_threaded_compositing_enabled_; | 683 bool is_threaded_compositing_enabled_; |
| 681 | 684 |
| 682 base::WeakPtrFactory<RenderWidget> weak_ptr_factory_; | 685 base::WeakPtrFactory<RenderWidget> weak_ptr_factory_; |
| 683 | 686 |
| 684 DISALLOW_COPY_AND_ASSIGN(RenderWidget); | 687 DISALLOW_COPY_AND_ASSIGN(RenderWidget); |
| 685 }; | 688 }; |
| 686 | 689 |
| 687 } // namespace content | 690 } // namespace content |
| 688 | 691 |
| 689 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ | 692 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ |
| OLD | NEW |