| 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 |
| 11 #include "base/auto_reset.h" |
| 11 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
| 12 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
| 13 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
| 14 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
| 15 #include "base/observer_list.h" | 16 #include "base/observer_list.h" |
| 16 #include "base/time/time.h" | 17 #include "base/time/time.h" |
| 17 #include "base/timer/timer.h" | 18 #include "base/timer/timer.h" |
| 18 #include "cc/debug/rendering_stats_instrumentation.h" | 19 #include "cc/debug/rendering_stats_instrumentation.h" |
| 19 #include "content/common/content_export.h" | 20 #include "content/common/content_export.h" |
| 20 #include "content/common/cursors/webcursor.h" | 21 #include "content/common/cursors/webcursor.h" |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 // Called when a plugin is moved. These events are queued up and sent with | 159 // Called when a plugin is moved. These events are queued up and sent with |
| 159 // the next paint or scroll message to the host. | 160 // the next paint or scroll message to the host. |
| 160 void SchedulePluginMove(const WebPluginGeometry& move); | 161 void SchedulePluginMove(const WebPluginGeometry& move); |
| 161 | 162 |
| 162 // Called when a plugin window has been destroyed, to make sure the currently | 163 // Called when a plugin window has been destroyed, to make sure the currently |
| 163 // pending moves don't try to reference it. | 164 // pending moves don't try to reference it. |
| 164 void CleanupWindowInPluginMoves(gfx::PluginWindowHandle window); | 165 void CleanupWindowInPluginMoves(gfx::PluginWindowHandle window); |
| 165 | 166 |
| 166 RenderWidgetCompositor* compositor() const; | 167 RenderWidgetCompositor* compositor() const; |
| 167 | 168 |
| 169 const ui::LatencyInfo* current_event_latency_info() const { |
| 170 return current_event_latency_info_; |
| 171 } |
| 172 |
| 168 virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface(bool fallback); | 173 virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface(bool fallback); |
| 169 | 174 |
| 170 // Callback for use with synthetic gestures (e.g. BeginSmoothScroll). | 175 // Callback for use with synthetic gestures (e.g. BeginSmoothScroll). |
| 171 typedef base::Callback<void()> SyntheticGestureCompletionCallback; | 176 typedef base::Callback<void()> SyntheticGestureCompletionCallback; |
| 172 | 177 |
| 173 // Send a synthetic gesture to the browser to be queued to the synthetic | 178 // Send a synthetic gesture to the browser to be queued to the synthetic |
| 174 // gesture controller. | 179 // gesture controller. |
| 175 void QueueSyntheticGesture( | 180 void QueueSyntheticGesture( |
| 176 scoped_ptr<SyntheticGestureParams> gesture_params, | 181 scoped_ptr<SyntheticGestureParams> gesture_params, |
| 177 const SyntheticGestureCompletionCallback& callback); | 182 const SyntheticGestureCompletionCallback& callback); |
| (...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 691 | 696 |
| 692 // State associated with synthetic gestures. Synthetic gestures are processed | 697 // State associated with synthetic gestures. Synthetic gestures are processed |
| 693 // in-order, so a queue is sufficient to identify the correct state for a | 698 // in-order, so a queue is sufficient to identify the correct state for a |
| 694 // completed gesture. | 699 // completed gesture. |
| 695 std::queue<SyntheticGestureCompletionCallback> | 700 std::queue<SyntheticGestureCompletionCallback> |
| 696 pending_synthetic_gesture_callbacks_; | 701 pending_synthetic_gesture_callbacks_; |
| 697 | 702 |
| 698 // Specified whether the compositor will run in its own thread. | 703 // Specified whether the compositor will run in its own thread. |
| 699 bool is_threaded_compositing_enabled_; | 704 bool is_threaded_compositing_enabled_; |
| 700 | 705 |
| 706 const ui::LatencyInfo* current_event_latency_info_; |
| 707 |
| 701 uint32 next_output_surface_id_; | 708 uint32 next_output_surface_id_; |
| 702 | 709 |
| 703 #if defined(OS_ANDROID) | 710 #if defined(OS_ANDROID) |
| 704 // Indicates value in the focused text field is in dirty state, i.e. modified | 711 // Indicates value in the focused text field is in dirty state, i.e. modified |
| 705 // by script etc., not by user input. | 712 // by script etc., not by user input. |
| 706 bool text_field_is_dirty_; | 713 bool text_field_is_dirty_; |
| 707 | 714 |
| 708 // A counter for number of outstanding messages from the renderer to the | 715 // A counter for number of outstanding messages from the renderer to the |
| 709 // browser regarding IME-type events that have not been acknowledged by the | 716 // browser regarding IME-type events that have not been acknowledged by the |
| 710 // browser. If this value is not 0 IME events will be dropped. | 717 // browser. If this value is not 0 IME events will be dropped. |
| (...skipping 16 matching lines...) Expand all Loading... |
| 727 | 734 |
| 728 ui::MenuSourceType context_menu_source_type_; | 735 ui::MenuSourceType context_menu_source_type_; |
| 729 gfx::Point touch_editing_context_menu_location_; | 736 gfx::Point touch_editing_context_menu_location_; |
| 730 | 737 |
| 731 DISALLOW_COPY_AND_ASSIGN(RenderWidget); | 738 DISALLOW_COPY_AND_ASSIGN(RenderWidget); |
| 732 }; | 739 }; |
| 733 | 740 |
| 734 } // namespace content | 741 } // namespace content |
| 735 | 742 |
| 736 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ | 743 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ |
| OLD | NEW |