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 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
678 | 683 |
679 // State associated with synthetic gestures. Synthetic gestures are processed | 684 // State associated with synthetic gestures. Synthetic gestures are processed |
680 // in-order, so a queue is sufficient to identify the correct state for a | 685 // in-order, so a queue is sufficient to identify the correct state for a |
681 // completed gesture. | 686 // completed gesture. |
682 std::queue<SyntheticGestureCompletionCallback> | 687 std::queue<SyntheticGestureCompletionCallback> |
683 pending_synthetic_gesture_callbacks_; | 688 pending_synthetic_gesture_callbacks_; |
684 | 689 |
685 // Specified whether the compositor will run in its own thread. | 690 // Specified whether the compositor will run in its own thread. |
686 bool is_threaded_compositing_enabled_; | 691 bool is_threaded_compositing_enabled_; |
687 | 692 |
| 693 const ui::LatencyInfo* current_event_latency_info_; |
| 694 |
688 uint32 next_output_surface_id_; | 695 uint32 next_output_surface_id_; |
689 | 696 |
690 #if defined(OS_ANDROID) | 697 #if defined(OS_ANDROID) |
691 // Indicates value in the focused text field is in dirty state, i.e. modified | 698 // Indicates value in the focused text field is in dirty state, i.e. modified |
692 // by script etc., not by user input. | 699 // by script etc., not by user input. |
693 bool text_field_is_dirty_; | 700 bool text_field_is_dirty_; |
694 | 701 |
695 // A counter for number of outstanding messages from the renderer to the | 702 // A counter for number of outstanding messages from the renderer to the |
696 // browser regarding IME-type events that have not been acknowledged by the | 703 // browser regarding IME-type events that have not been acknowledged by the |
697 // browser. If this value is not 0 IME events will be dropped. | 704 // browser. If this value is not 0 IME events will be dropped. |
(...skipping 27 matching lines...) Expand all Loading... |
725 | 732 |
726 ui::MenuSourceType context_menu_source_type_; | 733 ui::MenuSourceType context_menu_source_type_; |
727 gfx::Point touch_editing_context_menu_location_; | 734 gfx::Point touch_editing_context_menu_location_; |
728 | 735 |
729 DISALLOW_COPY_AND_ASSIGN(RenderWidget); | 736 DISALLOW_COPY_AND_ASSIGN(RenderWidget); |
730 }; | 737 }; |
731 | 738 |
732 } // namespace content | 739 } // namespace content |
733 | 740 |
734 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ | 741 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ |
OLD | NEW |