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_HELPER_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HELPER_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HELPER_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HELPER_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <map> | 9 #include <map> |
10 | 10 |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 // InvokeLater. This approach is necessary since window resize is followed up | 73 // InvokeLater. This approach is necessary since window resize is followed up |
74 // immediately by a request to repaint the window. | 74 // immediately by a request to repaint the window. |
75 // | 75 // |
76 // | 76 // |
77 // OPTIMIZED TAB SWITCHING | 77 // OPTIMIZED TAB SWITCHING |
78 // | 78 // |
79 // When a RenderWidgetHost is in a background tab, it is flagged as hidden. | 79 // When a RenderWidgetHost is in a background tab, it is flagged as hidden. |
80 // This causes the corresponding RenderWidget to stop sending BackingStore | 80 // This causes the corresponding RenderWidget to stop sending BackingStore |
81 // messages. The RenderWidgetHost also discards its backingstore when it is | 81 // messages. The RenderWidgetHost also discards its backingstore when it is |
82 // hidden, which helps free up memory. As a result, when a RenderWidgetHost | 82 // hidden, which helps free up memory. As a result, when a RenderWidgetHost |
83 // is restored, it can be momentarily be without a backingstore. (Restoring a | 83 // is restored, it can be momentarily be without a backingstore. (Restoring |
84 // RenderWidgetHost results in a WasRestored message being sent to the | 84 // a RenderWidgetHost results in a WasShown message being sent to the |
85 // RenderWidget, which triggers a full BackingStore message.) This can lead | 85 // RenderWidget, which triggers a full BackingStore message.) This can lead |
86 // to an observed rendering glitch as the WebContentsImpl will just have to | 86 // to an observed rendering glitch as the WebContentsImpl will just have to |
87 // fill white overtop the RenderWidgetHost until the RenderWidgetHost receives | 87 // fill white overtop the RenderWidgetHost until the RenderWidgetHost |
88 // a BackingStore message to refresh its backingstore. | 88 // receives a BackingStore message to refresh its backingstore. |
89 // | 89 // |
90 // To avoid this 'white flash', the RenderWidgetHost again makes use of the | 90 // To avoid this 'white flash', the RenderWidgetHost again makes use of the |
91 // RenderWidgetHelper's WaitForBackingStoreMsg method. When the | 91 // RenderWidgetHelper's WaitForBackingStoreMsg method. When the |
92 // RenderWidgetHost's GetBackingStore method is called, it will call | 92 // RenderWidgetHost's GetBackingStore method is called, it will call |
93 // WaitForBackingStoreMsg if it has no backingstore. | 93 // WaitForBackingStoreMsg if it has no backingstore. |
94 // | 94 // |
95 // TRANSPORT DIB CREATION | 95 // TRANSPORT DIB CREATION |
96 // | 96 // |
97 // On some platforms (currently the Mac) the renderer cannot create transport | 97 // On some platforms (currently the Mac) the renderer cannot create transport |
98 // DIBs because of sandbox limitations. Thus, it has to make synchronous IPCs | 98 // DIBs because of sandbox limitations. Thus, it has to make synchronous IPCs |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 base::AtomicSequenceNumber next_routing_id_; | 242 base::AtomicSequenceNumber next_routing_id_; |
243 | 243 |
244 ResourceDispatcherHostImpl* resource_dispatcher_host_; | 244 ResourceDispatcherHostImpl* resource_dispatcher_host_; |
245 | 245 |
246 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHelper); | 246 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHelper); |
247 }; | 247 }; |
248 | 248 |
249 } // namespace content | 249 } // namespace content |
250 | 250 |
251 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HELPER_H_ | 251 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HELPER_H_ |
OLD | NEW |