Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(134)

Side by Side Diff: content/browser/renderer_host/render_widget_host_impl.h

Issue 9980016: Delete background tab IOSurfaces on Mac. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed auto-resize and fullscreen toggle Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
645 // This value denotes the number of input events yet to be acknowledged 658 // This value denotes the number of input events yet to be acknowledged
646 // by the renderer. 659 // by the renderer.
647 int in_flight_event_count_; 660 int in_flight_event_count_;
648 661
649 // This timer runs to check if time_when_considered_hung_ has past. 662 // This timer runs to check if time_when_considered_hung_ has past.
650 base::OneShotTimer<RenderWidgetHostImpl> hung_renderer_timer_; 663 base::OneShotTimer<RenderWidgetHostImpl> hung_renderer_timer_;
651 664
652 // Flag to detect recursive calls to GetBackingStore(). 665 // Flag to detect recursive calls to GetBackingStore().
653 bool in_get_backing_store_; 666 bool in_get_backing_store_;
654 667
668 // Flag to trigger the GetBackingStore method to abort early.
669 bool abort_get_backing_store_;
670
655 // Set when we call DidPaintRect/DidScrollRect on the view. 671 // Set when we call DidPaintRect/DidScrollRect on the view.
656 bool view_being_painted_; 672 bool view_being_painted_;
657 673
658 // Used for UMA histogram logging to measure the time for a repaint view 674 // Used for UMA histogram logging to measure the time for a repaint view
659 // operation to finish. 675 // operation to finish.
660 base::TimeTicks repaint_start_time_; 676 base::TimeTicks repaint_start_time_;
661 677
662 // Queue of keyboard events that we need to track. 678 // Queue of keyboard events that we need to track.
663 typedef std::deque<NativeWebKeyboardEvent> KeyQueue; 679 typedef std::deque<NativeWebKeyboardEvent> KeyQueue;
664 680
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
709 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; 725 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_;
710 726
711 scoped_ptr<TapSuppressionController> tap_suppression_controller_; 727 scoped_ptr<TapSuppressionController> tap_suppression_controller_;
712 728
713 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); 729 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl);
714 }; 730 };
715 731
716 } // namespace content 732 } // namespace content
717 733
718 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ 734 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_helper.cc ('k') | content/browser/renderer_host/render_widget_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698