OLD | NEW |
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_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <deque> | 9 #include <deque> |
10 #include <string> | 10 #include <string> |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 bool is_accelerated_compositing_active() { | 173 bool is_accelerated_compositing_active() { |
174 return is_accelerated_compositing_active_; | 174 return is_accelerated_compositing_active_; |
175 } | 175 } |
176 | 176 |
177 // Notifies the RenderWidgetHost that the View was destroyed. | 177 // Notifies the RenderWidgetHost that the View was destroyed. |
178 void ViewDestroyed(); | 178 void ViewDestroyed(); |
179 | 179 |
180 // Indicates if the page has finished loading. | 180 // Indicates if the page has finished loading. |
181 void SetIsLoading(bool is_loading); | 181 void SetIsLoading(bool is_loading); |
182 | 182 |
183 // Get access to the widget's backing store. If a resize is in progress, | 183 // Check for the existance of a BackingStore of the given |desired_size| and |
184 // then the current size of the backing store may be less than the size of | 184 // return it if it exists. If the BackingStore is GPU, true is returned and |
185 // the widget's view. If you pass |force_create| as true, then the backing | 185 // |*backing_store| is set to NULL. |
186 // store will be created if it doesn't exist. Otherwise, NULL will be returned | 186 bool TryGetBackingStore(const gfx::Size& desired_size, |
187 // if the backing store doesn't already exist. It will also return NULL if the | 187 BackingStore** backing_store); |
| 188 |
| 189 // Get access to the widget's backing store matching the size of the widget's |
| 190 // view. If you pass |force_create| as true, then GetBackingStore may block |
| 191 // for the renderer to send a new frame. Otherwise, NULL will be returned if |
| 192 // the backing store doesn't already exist. It will also return NULL if the |
188 // backing store could not be created. | 193 // backing store could not be created. |
| 194 // |
| 195 // Mac only: NULL may also be returned if the last frame was GPU accelerated. |
| 196 // Call GetView()->HasAcceleratedSurface to determine if the last frame was |
| 197 // accelerated. |
189 BackingStore* GetBackingStore(bool force_create); | 198 BackingStore* GetBackingStore(bool force_create); |
190 | 199 |
191 // Allocate a new backing store of the given size. Returns NULL on failure | 200 // Allocate a new backing store of the given size. Returns NULL on failure |
192 // (for example, if we don't currently have a RenderWidgetHostView.) | 201 // (for example, if we don't currently have a RenderWidgetHostView.) |
193 BackingStore* AllocBackingStore(const gfx::Size& size); | 202 BackingStore* AllocBackingStore(const gfx::Size& size); |
194 | 203 |
195 // When a backing store does asynchronous painting, it will call this function | 204 // When a backing store does asynchronous painting, it will call this function |
196 // when it is done with the DIB. We will then forward a message to the | 205 // when it is done with the DIB. We will then forward a message to the |
197 // renderer to send another paint. | 206 // renderer to send another paint. |
198 void DonePaintingToBackingStore(); | 207 void DonePaintingToBackingStore(); |
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
458 void RendererIsResponsive(); | 467 void RendererIsResponsive(); |
459 | 468 |
460 // IPC message handlers | 469 // IPC message handlers |
461 void OnMsgRenderViewReady(); | 470 void OnMsgRenderViewReady(); |
462 void OnMsgRenderViewGone(int status, int error_code); | 471 void OnMsgRenderViewGone(int status, int error_code); |
463 void OnMsgClose(); | 472 void OnMsgClose(); |
464 void OnMsgRequestMove(const gfx::Rect& pos); | 473 void OnMsgRequestMove(const gfx::Rect& pos); |
465 void OnMsgSetTooltipText(const string16& tooltip_text, | 474 void OnMsgSetTooltipText(const string16& tooltip_text, |
466 WebKit::WebTextDirection text_direction_hint); | 475 WebKit::WebTextDirection text_direction_hint); |
467 void OnMsgPaintAtSizeAck(int tag, const gfx::Size& size); | 476 void OnMsgPaintAtSizeAck(int tag, const gfx::Size& size); |
| 477 void OnCompositorSurfaceBuffersSwapped(int32 surface_id, |
| 478 uint64 surface_handle, |
| 479 int32 route_id, |
| 480 int32 gpu_process_host_id); |
468 void OnMsgUpdateRect(const ViewHostMsg_UpdateRect_Params& params); | 481 void OnMsgUpdateRect(const ViewHostMsg_UpdateRect_Params& params); |
469 void OnMsgUpdateIsDelayed(); | 482 void OnMsgUpdateIsDelayed(); |
470 void OnMsgInputEventAck(WebKit::WebInputEvent::Type event_type, | 483 void OnMsgInputEventAck(WebKit::WebInputEvent::Type event_type, |
471 bool processed); | 484 bool processed); |
472 virtual void OnMsgFocus(); | 485 virtual void OnMsgFocus(); |
473 virtual void OnMsgBlur(); | 486 virtual void OnMsgBlur(); |
474 void OnMsgDidChangeNumTouchEvents(int count); | 487 void OnMsgDidChangeNumTouchEvents(int count); |
475 | 488 |
476 void OnMsgSetCursor(const WebCursor& cursor); | 489 void OnMsgSetCursor(const WebCursor& cursor); |
477 void OnMsgTextInputStateChanged(ui::TextInputType type, | 490 void OnMsgTextInputStateChanged(ui::TextInputType type, |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
709 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; | 722 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; |
710 | 723 |
711 scoped_ptr<TapSuppressionController> tap_suppression_controller_; | 724 scoped_ptr<TapSuppressionController> tap_suppression_controller_; |
712 | 725 |
713 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); | 726 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); |
714 }; | 727 }; |
715 | 728 |
716 } // namespace content | 729 } // namespace content |
717 | 730 |
718 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ | 731 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ |
OLD | NEW |