| 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 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 // a time period where we may have set a new window rect which has not yet | 294 // a time period where we may have set a new window rect which has not yet |
| 294 // been processed by the browser. So we maintain a pending window rect | 295 // been processed by the browser. So we maintain a pending window rect |
| 295 // size. If JS code sets the WindowRect, and then immediately calls | 296 // size. If JS code sets the WindowRect, and then immediately calls |
| 296 // GetWindowRect() we'll use this pending window rect as the size. | 297 // GetWindowRect() we'll use this pending window rect as the size. |
| 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 |
| 304 // Called by OnHandleInputEvent() to notify subclasses that a mouse event is |
| 305 // about to be handled. |
| 306 // Returns true if no further handling is needed. In that case, the event |
| 307 // won't be sent to WebKit or trigger DidHandleMouseEvent(). |
| 308 virtual bool WillHandleMouseEvent(const WebKit::WebMouseEvent& event); |
| 309 |
| 303 // Called by OnHandleInputEvent() to notify subclasses that a mouse event was | 310 // Called by OnHandleInputEvent() to notify subclasses that a mouse event was |
| 304 // just handled. | 311 // just handled. |
| 305 virtual void DidHandleMouseEvent(const WebKit::WebMouseEvent& event) {} | 312 virtual void DidHandleMouseEvent(const WebKit::WebMouseEvent& event) {} |
| 306 | 313 |
| 307 // Routing ID that allows us to communicate to the parent browser process | 314 // Routing ID that allows us to communicate to the parent browser process |
| 308 // RenderWidgetHost. When MSG_ROUTING_NONE, no messages may be sent. | 315 // RenderWidgetHost. When MSG_ROUTING_NONE, no messages may be sent. |
| 309 int32 routing_id_; | 316 int32 routing_id_; |
| 310 | 317 |
| 311 // We are responsible for destroying this object via its Close method. | 318 // We are responsible for destroying this object via its Close method. |
| 312 WebKit::WebWidget* webwidget_; | 319 WebKit::WebWidget* webwidget_; |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 438 bool animation_task_posted_; | 445 bool animation_task_posted_; |
| 439 bool invalidation_task_posted_; | 446 bool invalidation_task_posted_; |
| 440 | 447 |
| 441 bool has_disable_gpu_vsync_switch_; | 448 bool has_disable_gpu_vsync_switch_; |
| 442 base::TimeTicks last_do_deferred_update_time_; | 449 base::TimeTicks last_do_deferred_update_time_; |
| 443 | 450 |
| 444 DISALLOW_COPY_AND_ASSIGN(RenderWidget); | 451 DISALLOW_COPY_AND_ASSIGN(RenderWidget); |
| 445 }; | 452 }; |
| 446 | 453 |
| 447 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ | 454 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ |
| OLD | NEW |