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

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

Issue 19220002: [WIP] BufferedInputRouter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix client assignment Created 7 years, 3 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
« no previous file with comments | « content/renderer/gpu/renderer_event_packet.cc ('k') | content/renderer/render_widget.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/memory/weak_ptr.h" 15 #include "base/memory/weak_ptr.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/browser_rendering_stats.h" 19 #include "content/common/browser_rendering_stats.h"
20 #include "content/common/content_export.h" 20 #include "content/common/content_export.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/event_packet.h"
23 #include "content/common/input/input_event_disposition.h"
24 #include "content/renderer/gpu/renderer_event_packet.h"
22 #include "content/renderer/paint_aggregator.h" 25 #include "content/renderer/paint_aggregator.h"
23 #include "ipc/ipc_listener.h" 26 #include "ipc/ipc_listener.h"
24 #include "ipc/ipc_sender.h" 27 #include "ipc/ipc_sender.h"
25 #include "third_party/WebKit/public/platform/WebRect.h" 28 #include "third_party/WebKit/public/platform/WebRect.h"
26 #include "third_party/WebKit/public/web/WebCompositionUnderline.h" 29 #include "third_party/WebKit/public/web/WebCompositionUnderline.h"
27 #include "third_party/WebKit/public/web/WebPopupType.h" 30 #include "third_party/WebKit/public/web/WebPopupType.h"
28 #include "third_party/WebKit/public/web/WebTextDirection.h" 31 #include "third_party/WebKit/public/web/WebTextDirection.h"
29 #include "third_party/WebKit/public/web/WebTextInputInfo.h" 32 #include "third_party/WebKit/public/web/WebTextInputInfo.h"
30 #include "third_party/WebKit/public/web/WebWidget.h" 33 #include "third_party/WebKit/public/web/WebWidget.h"
31 #include "third_party/WebKit/public/web/WebWidgetClient.h" 34 #include "third_party/WebKit/public/web/WebWidgetClient.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 class RenderWidgetCompositor; 72 class RenderWidgetCompositor;
70 class RenderWidgetTest; 73 class RenderWidgetTest;
71 struct GpuRenderingStats; 74 struct GpuRenderingStats;
72 struct WebPluginGeometry; 75 struct WebPluginGeometry;
73 76
74 // RenderWidget provides a communication bridge between a WebWidget and 77 // RenderWidget provides a communication bridge between a WebWidget and
75 // a RenderWidgetHost, the latter of which lives in a different process. 78 // a RenderWidgetHost, the latter of which lives in a different process.
76 class CONTENT_EXPORT RenderWidget 79 class CONTENT_EXPORT RenderWidget
77 : public IPC::Listener, 80 : public IPC::Listener,
78 public IPC::Sender, 81 public IPC::Sender,
82 NON_EXPORTED_BASE(public RendererEventPacket::Dispatcher),
79 NON_EXPORTED_BASE(virtual public WebKit::WebWidgetClient), 83 NON_EXPORTED_BASE(virtual public WebKit::WebWidgetClient),
80 NON_EXPORTED_BASE(public WebGraphicsContext3DSwapBuffersClient), 84 NON_EXPORTED_BASE(public WebGraphicsContext3DSwapBuffersClient),
81 public base::RefCounted<RenderWidget> { 85 public base::RefCounted<RenderWidget> {
82 public: 86 public:
83 // Creates a new RenderWidget. The opener_id is the routing ID of the 87 // Creates a new RenderWidget. The opener_id is the routing ID of the
84 // RenderView that this widget lives inside. 88 // RenderView that this widget lives inside.
85 static RenderWidget* Create(int32 opener_id, 89 static RenderWidget* Create(int32 opener_id,
86 WebKit::WebPopupType popup_type, 90 WebKit::WebPopupType popup_type,
87 const WebKit::WebScreenInfo& screen_info); 91 const WebKit::WebScreenInfo& screen_info);
88 92
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 virtual void SetBackground(const SkBitmap& bitmap); 279 virtual void SetBackground(const SkBitmap& bitmap);
276 280
277 // Resizes the render widget. 281 // Resizes the render widget.
278 void Resize(const gfx::Size& new_size, 282 void Resize(const gfx::Size& new_size,
279 const gfx::Size& physical_backing_size, 283 const gfx::Size& physical_backing_size,
280 float overdraw_bottom_height, 284 float overdraw_bottom_height,
281 const gfx::Rect& resizer_rect, 285 const gfx::Rect& resizer_rect,
282 bool is_fullscreen, 286 bool is_fullscreen,
283 ResizeAck resize_ack); 287 ResizeAck resize_ack);
284 288
289 InputEventDisposition HandleWebEvent(const WebKit::WebInputEvent* event,
290 const ui::LatencyInfo& latency_info,
291 bool keyboard_shortcut,
292 bool send_ack);
293
294 // RendererEventPacket::Dispatcher
295 virtual InputEventDisposition Dispatch(const IPC::Message& message) OVERRIDE;
296 virtual InputEventDisposition Dispatch(int routing_id,
297 const WebKit::WebInputEvent* web_event,
298 const ui::LatencyInfo& latency_info,
299 bool is_keyboard_shortcut) OVERRIDE;
300
285 // RenderWidget IPC message handlers 301 // RenderWidget IPC message handlers
286 void OnHandleInputEvent(const WebKit::WebInputEvent* event, 302 void OnHandleInputEvent(const WebKit::WebInputEvent* event,
287 const ui::LatencyInfo& latency_info, 303 const ui::LatencyInfo& latency_info,
288 bool keyboard_shortcut); 304 bool keyboard_shortcut);
305 void OnHandleEventPacket(const EventPacket& event_packet,
306 const InputEventDispositions& dispositions);
289 void OnCursorVisibilityChange(bool is_visible); 307 void OnCursorVisibilityChange(bool is_visible);
290 void OnMouseCaptureLost(); 308 void OnMouseCaptureLost();
291 virtual void OnSetFocus(bool enable); 309 virtual void OnSetFocus(bool enable);
292 void OnClose(); 310 void OnClose();
293 void OnCreatingNewAck(); 311 void OnCreatingNewAck();
294 virtual void OnResize(const ViewMsg_Resize_Params& params); 312 virtual void OnResize(const ViewMsg_Resize_Params& params);
295 void OnChangeResizeRect(const gfx::Rect& resizer_rect); 313 void OnChangeResizeRect(const gfx::Rect& resizer_rect);
296 virtual void OnWasHidden(); 314 virtual void OnWasHidden();
297 virtual void OnWasShown(bool needs_repainting); 315 virtual void OnWasShown(bool needs_repainting);
298 virtual void OnWasSwappedOut(); 316 virtual void OnWasSwappedOut();
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after
739 #endif 757 #endif
740 758
741 base::WeakPtrFactory<RenderWidget> weak_ptr_factory_; 759 base::WeakPtrFactory<RenderWidget> weak_ptr_factory_;
742 760
743 DISALLOW_COPY_AND_ASSIGN(RenderWidget); 761 DISALLOW_COPY_AND_ASSIGN(RenderWidget);
744 }; 762 };
745 763
746 } // namespace content 764 } // namespace content
747 765
748 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ 766 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_
OLDNEW
« no previous file with comments | « content/renderer/gpu/renderer_event_packet.cc ('k') | content/renderer/render_widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698