| 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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 // Called when a plugin is moved. These events are queued up and sent with | 153 // Called when a plugin is moved. These events are queued up and sent with |
| 153 // the next paint or scroll message to the host. | 154 // the next paint or scroll message to the host. |
| 154 void SchedulePluginMove(const WebPluginGeometry& move); | 155 void SchedulePluginMove(const WebPluginGeometry& move); |
| 155 | 156 |
| 156 // Called when a plugin window has been destroyed, to make sure the currently | 157 // Called when a plugin window has been destroyed, to make sure the currently |
| 157 // pending moves don't try to reference it. | 158 // pending moves don't try to reference it. |
| 158 void CleanupWindowInPluginMoves(gfx::PluginWindowHandle window); | 159 void CleanupWindowInPluginMoves(gfx::PluginWindowHandle window); |
| 159 | 160 |
| 160 RenderWidgetCompositor* compositor() const; | 161 RenderWidgetCompositor* compositor() const; |
| 161 | 162 |
| 163 const ui::LatencyInfo* current_event_latency_info() const { |
| 164 return current_event_latency_info_; |
| 165 } |
| 166 |
| 162 virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface(bool fallback); | 167 virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface(bool fallback); |
| 163 | 168 |
| 164 // Callback for use with synthetic gestures (e.g. BeginSmoothScroll). | 169 // Callback for use with synthetic gestures (e.g. BeginSmoothScroll). |
| 165 typedef base::Callback<void()> SyntheticGestureCompletionCallback; | 170 typedef base::Callback<void()> SyntheticGestureCompletionCallback; |
| 166 | 171 |
| 167 // Send a synthetic gesture to the browser to be queued to the synthetic | 172 // Send a synthetic gesture to the browser to be queued to the synthetic |
| 168 // gesture controller. | 173 // gesture controller. |
| 169 void QueueSyntheticGesture( | 174 void QueueSyntheticGesture( |
| 170 scoped_ptr<SyntheticGestureParams> gesture_params, | 175 scoped_ptr<SyntheticGestureParams> gesture_params, |
| 171 const SyntheticGestureCompletionCallback& callback); | 176 const SyntheticGestureCompletionCallback& callback); |
| (...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 660 | 665 |
| 661 // State associated with synthetic gestures. Synthetic gestures are processed | 666 // State associated with synthetic gestures. Synthetic gestures are processed |
| 662 // in-order, so a queue is sufficient to identify the correct state for a | 667 // in-order, so a queue is sufficient to identify the correct state for a |
| 663 // completed gesture. | 668 // completed gesture. |
| 664 std::queue<SyntheticGestureCompletionCallback> | 669 std::queue<SyntheticGestureCompletionCallback> |
| 665 pending_synthetic_gesture_callbacks_; | 670 pending_synthetic_gesture_callbacks_; |
| 666 | 671 |
| 667 // Specified whether the compositor will run in its own thread. | 672 // Specified whether the compositor will run in its own thread. |
| 668 bool is_threaded_compositing_enabled_; | 673 bool is_threaded_compositing_enabled_; |
| 669 | 674 |
| 675 const ui::LatencyInfo* current_event_latency_info_; |
| 676 |
| 670 uint32 next_output_surface_id_; | 677 uint32 next_output_surface_id_; |
| 671 | 678 |
| 672 #if defined(OS_ANDROID) | 679 #if defined(OS_ANDROID) |
| 673 // Indicates value in the focused text field is in dirty state, i.e. modified | 680 // Indicates value in the focused text field is in dirty state, i.e. modified |
| 674 // by script etc., not by user input. | 681 // by script etc., not by user input. |
| 675 bool text_field_is_dirty_; | 682 bool text_field_is_dirty_; |
| 676 | 683 |
| 677 // A counter for number of outstanding messages from the renderer to the | 684 // A counter for number of outstanding messages from the renderer to the |
| 678 // browser regarding IME-type events that have not been acknowledged by the | 685 // browser regarding IME-type events that have not been acknowledged by the |
| 679 // browser. If this value is not 0 IME events will be dropped. | 686 // browser. If this value is not 0 IME events will be dropped. |
| (...skipping 27 matching lines...) Expand all Loading... |
| 707 | 714 |
| 708 ui::MenuSourceType context_menu_source_type_; | 715 ui::MenuSourceType context_menu_source_type_; |
| 709 gfx::Point touch_editing_context_menu_location_; | 716 gfx::Point touch_editing_context_menu_location_; |
| 710 | 717 |
| 711 DISALLOW_COPY_AND_ASSIGN(RenderWidget); | 718 DISALLOW_COPY_AND_ASSIGN(RenderWidget); |
| 712 }; | 719 }; |
| 713 | 720 |
| 714 } // namespace content | 721 } // namespace content |
| 715 | 722 |
| 716 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ | 723 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ |
| OLD | NEW |