OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 24 matching lines...) Expand all Loading... | |
35 | 35 |
36 namespace IPC { | 36 namespace IPC { |
37 class SyncMessage; | 37 class SyncMessage; |
38 } | 38 } |
39 | 39 |
40 namespace skia { | 40 namespace skia { |
41 class PlatformCanvas; | 41 class PlatformCanvas; |
42 } | 42 } |
43 | 43 |
44 namespace WebKit { | 44 namespace WebKit { |
45 class WebInputEvent; | |
45 class WebMouseEvent; | 46 class WebMouseEvent; |
46 class WebWidget; | 47 class WebWidget; |
47 struct WebPopupMenuInfo; | 48 struct WebPopupMenuInfo; |
48 } | 49 } |
49 | 50 |
50 namespace webkit { | 51 namespace webkit { |
51 namespace npapi { | 52 namespace npapi { |
52 struct WebPluginGeometry; | 53 struct WebPluginGeometry; |
53 } // namespace npapi | 54 } // namespace npapi |
54 | 55 |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
297 void SetPendingWindowRect(const WebKit::WebRect& r); | 298 void SetPendingWindowRect(const WebKit::WebRect& r); |
298 | 299 |
299 // Called by OnHandleInputEvent() to notify subclasses that a key event was | 300 // Called by OnHandleInputEvent() to notify subclasses that a key event was |
300 // just handled. | 301 // just handled. |
301 virtual void DidHandleKeyEvent() {} | 302 virtual void DidHandleKeyEvent() {} |
302 | 303 |
303 // Called by OnHandleInputEvent() to notify subclasses that a mouse event was | 304 // Called by OnHandleInputEvent() to notify subclasses that a mouse event was |
304 // just handled. | 305 // just handled. |
305 virtual void DidHandleMouseEvent(const WebKit::WebMouseEvent& event) {} | 306 virtual void DidHandleMouseEvent(const WebKit::WebMouseEvent& event) {} |
306 | 307 |
308 // Called by OnHandleInputEvent() to notify subclasses that an mouse event is | |
309 // about to be handled. | |
310 // Returns true if no further handling is needed. In that case, the event | |
311 // won't be sent to WebKit or trigger DidHandleMouseEvent(). | |
312 virtual bool BeforeHandleMouseEvent(const WebKit::WebMouseEvent& event) { | |
brettw
2011/09/14 22:17:58
Can you implement this in the .cc file? I realize
yzshen1
2011/09/19 20:48:41
Done. Thanks!
| |
313 return false; | |
314 } | |
315 | |
307 // Routing ID that allows us to communicate to the parent browser process | 316 // Routing ID that allows us to communicate to the parent browser process |
308 // RenderWidgetHost. When MSG_ROUTING_NONE, no messages may be sent. | 317 // RenderWidgetHost. When MSG_ROUTING_NONE, no messages may be sent. |
309 int32 routing_id_; | 318 int32 routing_id_; |
310 | 319 |
311 // We are responsible for destroying this object via its Close method. | 320 // We are responsible for destroying this object via its Close method. |
312 WebKit::WebWidget* webwidget_; | 321 WebKit::WebWidget* webwidget_; |
313 | 322 |
314 // Set to the ID of the view that initiated creating this view, if any. When | 323 // Set to the ID of the view that initiated creating this view, if any. When |
315 // the view was initiated by the browser (the common case), this will be | 324 // the view was initiated by the browser (the common case), this will be |
316 // MSG_ROUTING_NONE. This is used in determining ownership when opening | 325 // MSG_ROUTING_NONE. This is used in determining ownership when opening |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
438 bool animation_task_posted_; | 447 bool animation_task_posted_; |
439 bool invalidation_task_posted_; | 448 bool invalidation_task_posted_; |
440 | 449 |
441 bool has_disable_gpu_vsync_switch_; | 450 bool has_disable_gpu_vsync_switch_; |
442 base::TimeTicks last_do_deferred_update_time_; | 451 base::TimeTicks last_do_deferred_update_time_; |
443 | 452 |
444 DISALLOW_COPY_AND_ASSIGN(RenderWidget); | 453 DISALLOW_COPY_AND_ASSIGN(RenderWidget); |
445 }; | 454 }; |
446 | 455 |
447 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ | 456 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ |
OLD | NEW |