| 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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 bool GetGpuRenderingStats(GpuRenderingStats*) const; | 173 bool GetGpuRenderingStats(GpuRenderingStats*) const; |
| 174 | 174 |
| 175 virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface(); | 175 virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface(); |
| 176 | 176 |
| 177 // Callback for use with BeginSmoothScroll. | 177 // Callback for use with BeginSmoothScroll. |
| 178 typedef base::Callback<void()> SmoothScrollCompletionCallback; | 178 typedef base::Callback<void()> SmoothScrollCompletionCallback; |
| 179 | 179 |
| 180 // Directs the host to begin a smooth scroll. This scroll should have the same | 180 // Directs the host to begin a smooth scroll. This scroll should have the same |
| 181 // performance characteristics as a user-initiated scroll. Returns an ID of | 181 // performance characteristics as a user-initiated scroll. Returns an ID of |
| 182 // the scroll gesture. | 182 // the scroll gesture. |
| 183 void BeginSmoothScroll(bool scroll_down, | 183 bool BeginSmoothScroll(bool scroll_down, |
| 184 const SmoothScrollCompletionCallback& callback, | 184 const SmoothScrollCompletionCallback& callback, |
| 185 int pixels_to_scroll, | 185 int pixels_to_scroll, |
| 186 int mouse_event_x, | 186 int mouse_event_x, |
| 187 int mouse_event_y); | 187 int mouse_event_y); |
| 188 | 188 |
| 189 // Close the underlying WebWidget. | 189 // Close the underlying WebWidget. |
| 190 virtual void Close(); | 190 virtual void Close(); |
| 191 | 191 |
| 192 // Notifies about a compositor frame commit operation having finished. | 192 // Notifies about a compositor frame commit operation having finished. |
| 193 virtual void DidCommitCompositorFrame(); | 193 virtual void DidCommitCompositorFrame(); |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 const std::vector<WebKit::WebCompositionUnderline>& underlines, | 291 const std::vector<WebKit::WebCompositionUnderline>& underlines, |
| 292 int selection_start, | 292 int selection_start, |
| 293 int selection_end); | 293 int selection_end); |
| 294 virtual void OnImeConfirmComposition( | 294 virtual void OnImeConfirmComposition( |
| 295 const string16& text, const ui::Range& replacement_range); | 295 const string16& text, const ui::Range& replacement_range); |
| 296 void OnPaintAtSize(const TransportDIB::Handle& dib_id, | 296 void OnPaintAtSize(const TransportDIB::Handle& dib_id, |
| 297 int tag, | 297 int tag, |
| 298 const gfx::Size& page_size, | 298 const gfx::Size& page_size, |
| 299 const gfx::Size& desired_size); | 299 const gfx::Size& desired_size); |
| 300 void OnRepaint(const gfx::Size& size_to_paint); | 300 void OnRepaint(const gfx::Size& size_to_paint); |
| 301 void OnSmoothScrollCompleted(int gesture_id); | 301 void OnSmoothScrollCompleted(); |
| 302 void OnSetTextDirection(WebKit::WebTextDirection direction); | 302 void OnSetTextDirection(WebKit::WebTextDirection direction); |
| 303 void OnGetFPS(); | 303 void OnGetFPS(); |
| 304 void OnScreenInfoChanged(const WebKit::WebScreenInfo& screen_info); | 304 void OnScreenInfoChanged(const WebKit::WebScreenInfo& screen_info); |
| 305 void OnUpdateScreenRects(const gfx::Rect& view_screen_rect, | 305 void OnUpdateScreenRects(const gfx::Rect& view_screen_rect, |
| 306 const gfx::Rect& window_screen_rect); | 306 const gfx::Rect& window_screen_rect); |
| 307 #if defined(OS_ANDROID) | 307 #if defined(OS_ANDROID) |
| 308 void OnImeBatchStateChanged(bool is_begin); | 308 void OnImeBatchStateChanged(bool is_begin); |
| 309 #endif | 309 #endif |
| 310 | 310 |
| 311 virtual void SetDeviceScaleFactor(float device_scale_factor); | 311 virtual void SetDeviceScaleFactor(float device_scale_factor); |
| (...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 635 WebKit::WebScreenInfo screen_info_; | 635 WebKit::WebScreenInfo screen_info_; |
| 636 | 636 |
| 637 // The device scale factor. This value is computed from the DPI entries in | 637 // The device scale factor. This value is computed from the DPI entries in |
| 638 // |screen_info_| on some platforms, and defaults to 1 on other platforms. | 638 // |screen_info_| on some platforms, and defaults to 1 on other platforms. |
| 639 float device_scale_factor_; | 639 float device_scale_factor_; |
| 640 | 640 |
| 641 // Specifies whether input event throttling is enabled for this widget. | 641 // Specifies whether input event throttling is enabled for this widget. |
| 642 bool throttle_input_events_; | 642 bool throttle_input_events_; |
| 643 | 643 |
| 644 // State associated with the BeginSmoothScroll synthetic scrolling function. | 644 // State associated with the BeginSmoothScroll synthetic scrolling function. |
| 645 int next_smooth_scroll_gesture_id_; | 645 SmoothScrollCompletionCallback pending_smooth_scroll_gesture_; |
| 646 typedef std::map<int, SmoothScrollCompletionCallback> | |
| 647 PendingSmoothScrollGestureMap; | |
| 648 PendingSmoothScrollGestureMap pending_smooth_scroll_gestures_; | |
| 649 | 646 |
| 650 // Specified whether the compositor will run in its own thread. | 647 // Specified whether the compositor will run in its own thread. |
| 651 bool is_threaded_compositing_enabled_; | 648 bool is_threaded_compositing_enabled_; |
| 652 | 649 |
| 653 DISALLOW_COPY_AND_ASSIGN(RenderWidget); | 650 DISALLOW_COPY_AND_ASSIGN(RenderWidget); |
| 654 }; | 651 }; |
| 655 | 652 |
| 656 } // namespace content | 653 } // namespace content |
| 657 | 654 |
| 658 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ | 655 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ |
| OLD | NEW |