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 // Get access to the widget's backing store matching the size of the widget's |
184 // then the current size of the backing store may be less than the size of | 184 // view. If you pass |force_create| as true, then GetBackingStore may block |
185 // the widget's view. If you pass |force_create| as true, then the backing | 185 // for the renderer to send a new frame. Otherwise, NULL will be returned if |
186 // store will be created if it doesn't exist. Otherwise, NULL will be returned | 186 // the backing store doesn't already exist. It will also return NULL if the |
187 // if the backing store doesn't already exist. It will also return NULL if the | |
188 // backing store could not be created. | 187 // backing store could not be created. |
| 188 // |
| 189 // Mac only: NULL may also be returned if the last frame was GPU accelerated. |
| 190 // Call GetView()->HasAcceleratedSurface to determine if the last frame was |
| 191 // accelerated. |
189 BackingStore* GetBackingStore(bool force_create); | 192 BackingStore* GetBackingStore(bool force_create); |
190 | 193 |
191 // Allocate a new backing store of the given size. Returns NULL on failure | 194 // Allocate a new backing store of the given size. Returns NULL on failure |
192 // (for example, if we don't currently have a RenderWidgetHostView.) | 195 // (for example, if we don't currently have a RenderWidgetHostView.) |
193 BackingStore* AllocBackingStore(const gfx::Size& size); | 196 BackingStore* AllocBackingStore(const gfx::Size& size); |
194 | 197 |
195 // When a backing store does asynchronous painting, it will call this function | 198 // 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 | 199 // when it is done with the DIB. We will then forward a message to the |
197 // renderer to send another paint. | 200 // renderer to send another paint. |
198 void DonePaintingToBackingStore(); | 201 void DonePaintingToBackingStore(); |
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
458 void RendererIsResponsive(); | 461 void RendererIsResponsive(); |
459 | 462 |
460 // IPC message handlers | 463 // IPC message handlers |
461 void OnMsgRenderViewReady(); | 464 void OnMsgRenderViewReady(); |
462 void OnMsgRenderViewGone(int status, int error_code); | 465 void OnMsgRenderViewGone(int status, int error_code); |
463 void OnMsgClose(); | 466 void OnMsgClose(); |
464 void OnMsgRequestMove(const gfx::Rect& pos); | 467 void OnMsgRequestMove(const gfx::Rect& pos); |
465 void OnMsgSetTooltipText(const string16& tooltip_text, | 468 void OnMsgSetTooltipText(const string16& tooltip_text, |
466 WebKit::WebTextDirection text_direction_hint); | 469 WebKit::WebTextDirection text_direction_hint); |
467 void OnMsgPaintAtSizeAck(int tag, const gfx::Size& size); | 470 void OnMsgPaintAtSizeAck(int tag, const gfx::Size& size); |
| 471 void OnCompositorSurfaceBuffersSwapped(int32 surface_id, |
| 472 uint64 surface_handle, |
| 473 int32 route_id, |
| 474 int32 gpu_process_host_id); |
468 void OnMsgUpdateRect(const ViewHostMsg_UpdateRect_Params& params); | 475 void OnMsgUpdateRect(const ViewHostMsg_UpdateRect_Params& params); |
469 void OnMsgUpdateIsDelayed(); | 476 void OnMsgUpdateIsDelayed(); |
470 void OnMsgInputEventAck(WebKit::WebInputEvent::Type event_type, | 477 void OnMsgInputEventAck(WebKit::WebInputEvent::Type event_type, |
471 bool processed); | 478 bool processed); |
472 virtual void OnMsgFocus(); | 479 virtual void OnMsgFocus(); |
473 virtual void OnMsgBlur(); | 480 virtual void OnMsgBlur(); |
474 void OnMsgDidChangeNumTouchEvents(int count); | 481 void OnMsgDidChangeNumTouchEvents(int count); |
475 | 482 |
476 void OnMsgSetCursor(const WebCursor& cursor); | 483 void OnMsgSetCursor(const WebCursor& cursor); |
477 void OnMsgTextInputStateChanged(ui::TextInputType type, | 484 void OnMsgTextInputStateChanged(ui::TextInputType type, |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
709 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; | 716 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; |
710 | 717 |
711 scoped_ptr<TapSuppressionController> tap_suppression_controller_; | 718 scoped_ptr<TapSuppressionController> tap_suppression_controller_; |
712 | 719 |
713 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); | 720 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); |
714 }; | 721 }; |
715 | 722 |
716 } // namespace content | 723 } // namespace content |
717 | 724 |
718 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ | 725 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ |
OLD | NEW |