diff options
author | pinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-06 20:09:06 +0000 |
---|---|---|
committer | pinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-06 20:09:06 +0000 |
commit | 6e9d11ebd13b9e3582697f7480c3d920331dc087 (patch) | |
tree | 6545c2f5ecbdb66c3785a2abdae158464ea63503 /chrome/browser/cocoa/tab_contents_controller.h | |
parent | e8dec209df749eac3a3e566d96d0fdde3dadbe1e (diff) | |
download | chromium_src-6e9d11ebd13b9e3582697f7480c3d920331dc087.zip chromium_src-6e9d11ebd13b9e3582697f7480c3d920331dc087.tar.gz chromium_src-6e9d11ebd13b9e3582697f7480c3d920331dc087.tar.bz2 |
Don't install the RWHVMac into the view hierarchy until everything has been properly sized. This avoids sending spurrious resize message with incorrect sizes to the renderer.
BUG=15717
TEST=pages should always be the correct size when loaded in bg or foreground. No more flashing a small size then redrawing.
Review URL: http://codereview.chromium.org/155099
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19973 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/tab_contents_controller.h')
-rw-r--r-- | chrome/browser/cocoa/tab_contents_controller.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/chrome/browser/cocoa/tab_contents_controller.h b/chrome/browser/cocoa/tab_contents_controller.h index f79b9ea..e262db1 100644 --- a/chrome/browser/cocoa/tab_contents_controller.h +++ b/chrome/browser/cocoa/tab_contents_controller.h @@ -12,7 +12,11 @@ class TabContentsCommandObserver; 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 @@ class TabStripModel; // 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. |