| 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 <deque> | 9 #include <deque> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 // The compositing surface assigned by the RenderWidgetHost | 84 // The compositing surface assigned by the RenderWidgetHost |
| 85 // (or RenderViewHost). Will be gfx::kNullPluginWindow if not assigned yet, | 85 // (or RenderViewHost). Will be gfx::kNullPluginWindow if not assigned yet, |
| 86 // in which case we should not create any GPU command buffers with it. | 86 // in which case we should not create any GPU command buffers with it. |
| 87 // The routing ID assigned by the RenderProcess. Will be MSG_ROUTING_NONE if | 87 // The routing ID assigned by the RenderProcess. Will be MSG_ROUTING_NONE if |
| 88 // not yet assigned a view ID, in which case, the process MUST NOT send | 88 // not yet assigned a view ID, in which case, the process MUST NOT send |
| 89 // messages with this ID to the parent. | 89 // messages with this ID to the parent. |
| 90 int32 routing_id() const { | 90 int32 routing_id() const { |
| 91 return routing_id_; | 91 return routing_id_; |
| 92 } | 92 } |
| 93 | 93 |
| 94 int32 surface_id() const { |
| 95 return surface_id_; |
| 96 } |
| 97 |
| 94 // May return NULL when the window is closing. | 98 // May return NULL when the window is closing. |
| 95 WebKit::WebWidget* webwidget() const { return webwidget_; } | 99 WebKit::WebWidget* webwidget() const { return webwidget_; } |
| 96 | 100 |
| 97 gfx::NativeViewId host_window() const { return host_window_; } | 101 gfx::NativeViewId host_window() const { return host_window_; } |
| 98 gfx::Size size() const { return size_; } | 102 gfx::Size size() const { return size_; } |
| 99 bool has_focus() const { return has_focus_; } | 103 bool has_focus() const { return has_focus_; } |
| 100 bool is_fullscreen() const { return is_fullscreen_; } | 104 bool is_fullscreen() const { return is_fullscreen_; } |
| 101 bool is_hidden() const { return is_hidden_; } | 105 bool is_hidden() const { return is_hidden_; } |
| 102 | 106 |
| 103 // IPC::Channel::Listener | 107 // IPC::Channel::Listener |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 virtual void DidHandleTouchEvent(const WebKit::WebTouchEvent& event) {} | 335 virtual void DidHandleTouchEvent(const WebKit::WebTouchEvent& event) {} |
| 332 | 336 |
| 333 // Should return true if the underlying WebWidget is responsible for | 337 // Should return true if the underlying WebWidget is responsible for |
| 334 // the scheduling of compositing requests. | 338 // the scheduling of compositing requests. |
| 335 virtual bool WebWidgetHandlesCompositorScheduling() const; | 339 virtual bool WebWidgetHandlesCompositorScheduling() const; |
| 336 | 340 |
| 337 // Routing ID that allows us to communicate to the parent browser process | 341 // Routing ID that allows us to communicate to the parent browser process |
| 338 // RenderWidgetHost. When MSG_ROUTING_NONE, no messages may be sent. | 342 // RenderWidgetHost. When MSG_ROUTING_NONE, no messages may be sent. |
| 339 int32 routing_id_; | 343 int32 routing_id_; |
| 340 | 344 |
| 345 int32 surface_id_; |
| 346 |
| 341 // We are responsible for destroying this object via its Close method. | 347 // We are responsible for destroying this object via its Close method. |
| 342 WebKit::WebWidget* webwidget_; | 348 WebKit::WebWidget* webwidget_; |
| 343 | 349 |
| 344 // Set to the ID of the view that initiated creating this view, if any. When | 350 // Set to the ID of the view that initiated creating this view, if any. When |
| 345 // the view was initiated by the browser (the common case), this will be | 351 // the view was initiated by the browser (the common case), this will be |
| 346 // MSG_ROUTING_NONE. This is used in determining ownership when opening | 352 // MSG_ROUTING_NONE. This is used in determining ownership when opening |
| 347 // child tabs. See RenderWidget::createWebViewWithRequest. | 353 // child tabs. See RenderWidget::createWebViewWithRequest. |
| 348 // | 354 // |
| 349 // This ID may refer to an invalid view if that view is closed before this | 355 // This ID may refer to an invalid view if that view is closed before this |
| 350 // view is. | 356 // view is. |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 480 // delay sending of UpdateRect until the corresponding SwapBuffers has been | 486 // delay sending of UpdateRect until the corresponding SwapBuffers has been |
| 481 // executed. Since we can have several in flight, we need to keep them in a | 487 // executed. Since we can have several in flight, we need to keep them in a |
| 482 // queue. Note: some SwapBuffers may not correspond to an update, in which | 488 // queue. Note: some SwapBuffers may not correspond to an update, in which |
| 483 // case NULL is added to the queue. | 489 // case NULL is added to the queue. |
| 484 std::deque<ViewHostMsg_UpdateRect*> updates_pending_swap_; | 490 std::deque<ViewHostMsg_UpdateRect*> updates_pending_swap_; |
| 485 | 491 |
| 486 DISALLOW_COPY_AND_ASSIGN(RenderWidget); | 492 DISALLOW_COPY_AND_ASSIGN(RenderWidget); |
| 487 }; | 493 }; |
| 488 | 494 |
| 489 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ | 495 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ |
| OLD | NEW |