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

Unified Diff: chrome/browser/cocoa/tab_contents_controller.h

Issue 155099: Don't install the RWHVMac into the view hierarchy until everything has been p... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/cocoa/tab_contents_controller.h
===================================================================
--- chrome/browser/cocoa/tab_contents_controller.h (revision 19942)
+++ chrome/browser/cocoa/tab_contents_controller.h (working copy)
@@ -12,7 +12,11 @@
class TabStripModel;
// A class that controls the web contents of a tab. It manages displaying the
-// native view for a given TabContents in |contentsBox_|.
+// native view for a given TabContents in |contentsBox_|. Note that just
+// creating the class does not display the view in |contentsBox_|. We defer
+// inserting it until the box is the correct size to avoid multiple resize
+// messages to the renderer. You must call |-ensureContentsVisible| to display
+// the render widget host view.
@interface TabContentsController : NSViewController {
@private
@@ -32,6 +36,10 @@
// enabled.
- (void)willBecomeSelectedTab;
+// Call when the tab view is properly sized and the render widget host view
+// should be put into the view hierarchy.
+- (void)ensureContentsVisible;
+
// Called when the tab contents is updated in some non-descript way (the
// notification from the model isn't specific). |updatedContents| could reflect
// an entirely new tab contents object.
« no previous file with comments | « no previous file | chrome/browser/cocoa/tab_contents_controller.mm » ('j') | chrome/browser/cocoa/tab_strip_controller.mm » ('J')

Powered by Google App Engine
This is Rietveld 408576698