| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_ | 5 #ifndef CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_ |
| 6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_ | 6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 // This tells the renderer to paint into a bitmap and return it, | 215 // This tells the renderer to paint into a bitmap and return it, |
| 216 // regardless of whether the tab is hidden or not. It resizes the | 216 // regardless of whether the tab is hidden or not. It resizes the |
| 217 // web widget to match the |page_size| and then returns the bitmap | 217 // web widget to match the |page_size| and then returns the bitmap |
| 218 // scaled so it matches the |desired_size|, so that the scaling | 218 // scaled so it matches the |desired_size|, so that the scaling |
| 219 // happens on the rendering thread. When the bitmap is ready, the | 219 // happens on the rendering thread. When the bitmap is ready, the |
| 220 // renderer sends a PaintAtSizeACK to this host, and the painting | 220 // renderer sends a PaintAtSizeACK to this host, and the painting |
| 221 // observer is notified. Note that this bypasses most of the update | 221 // observer is notified. Note that this bypasses most of the update |
| 222 // logic that is normally invoked, and doesn't put the results into | 222 // logic that is normally invoked, and doesn't put the results into |
| 223 // the backing store. | 223 // the backing store. |
| 224 void PaintAtSize(TransportDIB::Handle dib_handle, | 224 void PaintAtSize(TransportDIB::Handle dib_handle, |
| 225 int sequence_id, |
| 225 const gfx::Size& page_size, | 226 const gfx::Size& page_size, |
| 226 const gfx::Size& desired_size); | 227 const gfx::Size& desired_size); |
| 227 | 228 |
| 228 // Get access to the widget's backing store. If a resize is in progress, | 229 // Get access to the widget's backing store. If a resize is in progress, |
| 229 // then the current size of the backing store may be less than the size of | 230 // then the current size of the backing store may be less than the size of |
| 230 // the widget's view. If you pass |force_create| as true, then the backing | 231 // the widget's view. If you pass |force_create| as true, then the backing |
| 231 // store will be created if it doesn't exist. Otherwise, NULL will be returned | 232 // store will be created if it doesn't exist. Otherwise, NULL will be returned |
| 232 // if the backing store doesn't already exist. It will also return NULL if the | 233 // if the backing store doesn't already exist. It will also return NULL if the |
| 233 // backing store could not be created. | 234 // backing store could not be created. |
| 234 BackingStore* GetBackingStore(bool force_create); | 235 BackingStore* GetBackingStore(bool force_create); |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 469 // Called if we know the renderer is responsive. When we currently think the | 470 // Called if we know the renderer is responsive. When we currently think the |
| 470 // renderer is unresponsive, this will clear that state and call | 471 // renderer is unresponsive, this will clear that state and call |
| 471 // NotifyRendererResponsive. | 472 // NotifyRendererResponsive. |
| 472 void RendererIsResponsive(); | 473 void RendererIsResponsive(); |
| 473 | 474 |
| 474 // IPC message handlers | 475 // IPC message handlers |
| 475 void OnMsgRenderViewReady(); | 476 void OnMsgRenderViewReady(); |
| 476 void OnMsgRenderViewGone(); | 477 void OnMsgRenderViewGone(); |
| 477 void OnMsgClose(); | 478 void OnMsgClose(); |
| 478 void OnMsgRequestMove(const gfx::Rect& pos); | 479 void OnMsgRequestMove(const gfx::Rect& pos); |
| 479 void OnMsgPaintAtSizeAck(const TransportDIB::Handle& dib_handle, | 480 void OnMsgPaintAtSizeAck(int seq_id, |
| 480 const gfx::Size& size); | 481 const gfx::Size& size); |
| 481 void OnMsgUpdateRect(const ViewHostMsg_UpdateRect_Params& params); | 482 void OnMsgUpdateRect(const ViewHostMsg_UpdateRect_Params& params); |
| 482 void OnMsgCreateVideo(const gfx::Size& size); | 483 void OnMsgCreateVideo(const gfx::Size& size); |
| 483 void OnMsgUpdateVideo(TransportDIB::Id bitmap, const gfx::Rect& bitmap_rect); | 484 void OnMsgUpdateVideo(TransportDIB::Id bitmap, const gfx::Rect& bitmap_rect); |
| 484 void OnMsgDestroyVideo(); | 485 void OnMsgDestroyVideo(); |
| 485 void OnMsgInputEventAck(const IPC::Message& message); | 486 void OnMsgInputEventAck(const IPC::Message& message); |
| 486 void OnMsgFocus(); | 487 void OnMsgFocus(); |
| 487 void OnMsgBlur(); | 488 void OnMsgBlur(); |
| 488 | 489 |
| 489 void OnMsgSetCursor(const WebCursor& cursor); | 490 void OnMsgSetCursor(const WebCursor& cursor); |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 696 // we don't do it more than once. | 697 // we don't do it more than once. |
| 697 bool requested_accessibility_tree_; | 698 bool requested_accessibility_tree_; |
| 698 | 699 |
| 699 // Optional video YUV layer for used for out-of-process compositing. | 700 // Optional video YUV layer for used for out-of-process compositing. |
| 700 scoped_ptr<VideoLayer> video_layer_; | 701 scoped_ptr<VideoLayer> video_layer_; |
| 701 | 702 |
| 702 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHost); | 703 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHost); |
| 703 }; | 704 }; |
| 704 | 705 |
| 705 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_ | 706 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_ |
| OLD | NEW |