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 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
709 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; | 712 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; |
710 | 713 |
711 scoped_ptr<TapSuppressionController> tap_suppression_controller_; | 714 scoped_ptr<TapSuppressionController> tap_suppression_controller_; |
712 | 715 |
713 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); | 716 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); |
714 }; | 717 }; |
715 | 718 |
716 } // namespace content | 719 } // namespace content |
717 | 720 |
718 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ | 721 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ |
OLD | NEW |