Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Side by Side Diff: content/renderer/render_widget.h

Issue 288393004: [DevTools] Send ack early when paused in mouse move to keep events coming. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed comments Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
14 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
15 #include "base/observer_list.h" 15 #include "base/observer_list.h"
16 #include "base/time/time.h" 16 #include "base/time/time.h"
17 #include "base/timer/timer.h" 17 #include "base/timer/timer.h"
18 #include "cc/debug/rendering_stats_instrumentation.h" 18 #include "cc/debug/rendering_stats_instrumentation.h"
19 #include "content/common/content_export.h" 19 #include "content/common/content_export.h"
20 #include "content/common/cursors/webcursor.h" 20 #include "content/common/cursors/webcursor.h"
21 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" 21 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h"
22 #include "content/common/input/synthetic_gesture_params.h" 22 #include "content/common/input/synthetic_gesture_params.h"
23 #include "ipc/ipc_listener.h" 23 #include "ipc/ipc_listener.h"
24 #include "ipc/ipc_sender.h" 24 #include "ipc/ipc_sender.h"
25 #include "third_party/WebKit/public/platform/WebRect.h" 25 #include "third_party/WebKit/public/platform/WebRect.h"
26 #include "third_party/WebKit/public/web/WebCompositionUnderline.h" 26 #include "third_party/WebKit/public/web/WebCompositionUnderline.h"
27 #include "third_party/WebKit/public/web/WebInputEvent.h"
27 #include "third_party/WebKit/public/web/WebPopupType.h" 28 #include "third_party/WebKit/public/web/WebPopupType.h"
28 #include "third_party/WebKit/public/web/WebTextDirection.h" 29 #include "third_party/WebKit/public/web/WebTextDirection.h"
29 #include "third_party/WebKit/public/web/WebTextInputInfo.h" 30 #include "third_party/WebKit/public/web/WebTextInputInfo.h"
30 #include "third_party/WebKit/public/web/WebTouchAction.h" 31 #include "third_party/WebKit/public/web/WebTouchAction.h"
31 #include "third_party/WebKit/public/web/WebWidget.h" 32 #include "third_party/WebKit/public/web/WebWidget.h"
32 #include "third_party/WebKit/public/web/WebWidgetClient.h" 33 #include "third_party/WebKit/public/web/WebWidgetClient.h"
33 #include "third_party/skia/include/core/SkBitmap.h" 34 #include "third_party/skia/include/core/SkBitmap.h"
34 #include "ui/base/ime/text_input_mode.h" 35 #include "ui/base/ime/text_input_mode.h"
35 #include "ui/base/ime/text_input_type.h" 36 #include "ui/base/ime/text_input_type.h"
36 #include "ui/base/ui_base_types.h" 37 #include "ui/base/ui_base_types.h"
37 #include "ui/gfx/native_widget_types.h" 38 #include "ui/gfx/native_widget_types.h"
38 #include "ui/gfx/range/range.h" 39 #include "ui/gfx/range/range.h"
39 #include "ui/gfx/rect.h" 40 #include "ui/gfx/rect.h"
40 #include "ui/gfx/vector2d.h" 41 #include "ui/gfx/vector2d.h"
41 #include "ui/gfx/vector2d_f.h" 42 #include "ui/gfx/vector2d_f.h"
42 #include "ui/surface/transport_dib.h" 43 #include "ui/surface/transport_dib.h"
43 44
44 struct ViewHostMsg_UpdateRect_Params; 45 struct ViewHostMsg_UpdateRect_Params;
45 struct ViewMsg_Resize_Params; 46 struct ViewMsg_Resize_Params;
46 class ViewHostMsg_UpdateRect; 47 class ViewHostMsg_UpdateRect;
47 48
48 namespace IPC { 49 namespace IPC {
49 class SyncMessage; 50 class SyncMessage;
50 } 51 }
51 52
52 namespace blink { 53 namespace blink {
53 struct WebDeviceEmulationParams; 54 struct WebDeviceEmulationParams;
54 class WebGestureEvent; 55 class WebGestureEvent;
55 class WebInputEvent;
56 class WebKeyboardEvent; 56 class WebKeyboardEvent;
57 class WebMouseEvent; 57 class WebMouseEvent;
58 class WebTouchEvent; 58 class WebTouchEvent;
59 } 59 }
60 60
61 namespace cc { class OutputSurface; } 61 namespace cc { class OutputSurface; }
62 62
63 namespace gfx { 63 namespace gfx {
64 class Range; 64 class Range;
65 } 65 }
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 void FinishHandlingImeEvent(); 181 void FinishHandlingImeEvent();
182 182
183 // Returns whether we currently should handle an IME event. 183 // Returns whether we currently should handle an IME event.
184 bool ShouldHandleImeEvent(); 184 bool ShouldHandleImeEvent();
185 185
186 virtual void InstrumentWillBeginFrame(int frame_id) {} 186 virtual void InstrumentWillBeginFrame(int frame_id) {}
187 virtual void InstrumentDidBeginFrame() {} 187 virtual void InstrumentDidBeginFrame() {}
188 virtual void InstrumentDidCancelFrame() {} 188 virtual void InstrumentDidCancelFrame() {}
189 virtual void InstrumentWillComposite() {} 189 virtual void InstrumentWillComposite() {}
190 190
191 // When paused in debugger, we send ack for mouse event early. This ensures
192 // that we continue receiving mouse moves and pass them to debugger. Returns
193 // whether we are paused in mouse move event and sent the ack.
194 bool SendAckForMouseMoveFromDebugger();
195
196 // When resumed from pause in debugger while handling mouse move,
197 // we should not send an extra ack (see SendAckForCurrentMouseMove).
198 void IgnoreAckForMouseMoveFromDebugger();
199
191 bool UsingSynchronousRendererCompositor() const; 200 bool UsingSynchronousRendererCompositor() const;
192 201
193 // ScreenMetricsEmulator class manages screen emulation inside a render 202 // ScreenMetricsEmulator class manages screen emulation inside a render
194 // widget. This includes resizing, placing view on the screen at desired 203 // widget. This includes resizing, placing view on the screen at desired
195 // position, changing device scale factor, and scaling down the whole 204 // position, changing device scale factor, and scaling down the whole
196 // widget if required to fit into the browser window. 205 // widget if required to fit into the browser window.
197 class ScreenMetricsEmulator; 206 class ScreenMetricsEmulator;
198 207
199 // Emulates screen and widget metrics. Supplied values override everything 208 // Emulates screen and widget metrics. Supplied values override everything
200 // coming from host. 209 // coming from host.
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 575
567 // Indicates whether we have been focused/unfocused by the browser. 576 // Indicates whether we have been focused/unfocused by the browser.
568 bool has_focus_; 577 bool has_focus_;
569 578
570 // Are we currently handling an input event? 579 // Are we currently handling an input event?
571 bool handling_input_event_; 580 bool handling_input_event_;
572 581
573 // Are we currently handling an ime event? 582 // Are we currently handling an ime event?
574 bool handling_ime_event_; 583 bool handling_ime_event_;
575 584
576 // Are we currently handling a touchstart event? 585 // Type of event we are currently handling.
577 bool handling_touchstart_event_; 586 blink::WebInputEvent::Type handling_event_type_;
587
588 // Whether we should not sent ack for current mouse move.
589 bool ignore_ack_for_mouse_move_from_debugger_;
578 590
579 // True if we have requested this widget be closed. No more messages will 591 // True if we have requested this widget be closed. No more messages will
580 // be sent, except for a Close. 592 // be sent, except for a Close.
581 bool closing_; 593 bool closing_;
582 594
583 // Whether this RenderWidget is currently swapped out, such that the view is 595 // Whether this RenderWidget is currently swapped out, such that the view is
584 // being rendered by another process. If all RenderWidgets in a process are 596 // being rendered by another process. If all RenderWidgets in a process are
585 // swapped out, the process can exit. 597 // swapped out, the process can exit.
586 bool is_swapped_out_; 598 bool is_swapped_out_;
587 599
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
695 707
696 ui::MenuSourceType context_menu_source_type_; 708 ui::MenuSourceType context_menu_source_type_;
697 gfx::Point touch_editing_context_menu_location_; 709 gfx::Point touch_editing_context_menu_location_;
698 710
699 DISALLOW_COPY_AND_ASSIGN(RenderWidget); 711 DISALLOW_COPY_AND_ASSIGN(RenderWidget);
700 }; 712 };
701 713
702 } // namespace content 714 } // namespace content
703 715
704 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ 716 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698