diff options
author | mpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-16 05:52:23 +0000 |
---|---|---|
committer | mpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-16 05:52:23 +0000 |
commit | 4eabd06ab6f594ee7244be72efb03b51e778d478 (patch) | |
tree | dcc81e49cf857343014e39a813ada7b1995c8570 /chrome/browser/ui/cocoa/extensions/extension_view_mac.h | |
parent | f86f596f260b883a4763437a49926bc483cea071 (diff) | |
download | chromium_src-4eabd06ab6f594ee7244be72efb03b51e778d478.zip chromium_src-4eabd06ab6f594ee7244be72efb03b51e778d478.tar.gz chromium_src-4eabd06ab6f594ee7244be72efb03b51e778d478.tar.bz2 |
Have ExtensionHost use TabContents instead of RenderViewHost. Try #2.
The first landing broke popups on the Mac. Specifically, the auto-resizing of TabContents interfered with how ExtensionViewMac tried to resize itself, causing an infinite feedback loop. Also, we need to defer updating the size of the container until the ExtensionHost is loaded so that we don't display an empty window.
BUG=84146
TEST=extensions still work
Review URL: http://codereview.chromium.org/8498022
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110262 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/cocoa/extensions/extension_view_mac.h')
-rw-r--r-- | chrome/browser/ui/cocoa/extensions/extension_view_mac.h | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/chrome/browser/ui/cocoa/extensions/extension_view_mac.h b/chrome/browser/ui/cocoa/extensions/extension_view_mac.h index abcc31e..373d798 100644 --- a/chrome/browser/ui/cocoa/extensions/extension_view_mac.h +++ b/chrome/browser/ui/cocoa/extensions/extension_view_mac.h @@ -14,7 +14,6 @@ class Browser; class ExtensionHost; class RenderViewHost; -class RenderWidgetHostViewMac; class SkBitmap; // This class represents extension views. An extension view internally contains @@ -35,6 +34,10 @@ class ExtensionViewMac { // Returns the browser the extension belongs to. Browser* browser() const { return browser_; } + // Method for the ExtensionHost to notify us that the extension page is + // loaded. + void DidStopLoading(); + // Sets the extensions's background image. void SetBackground(const SkBitmap& background); @@ -63,18 +66,21 @@ class ExtensionViewMac { void CreateWidgetHostView(); + // We wait to show the ExtensionView until several things have loaded. + void ShowIfCompletelyLoaded(); + Browser* browser_; // weak ExtensionHost* extension_host_; // weak - // Created by us, but owned by its |native_view()|. We |release| the - // rwhv's native view in our destructor, effectively freeing this. - RenderWidgetHostViewMac* render_widget_host_view_; - // The background the view should have once it is initialized. This is set // when the view has a custom background, but hasn't been initialized yet. SkBitmap pending_background_; + // What we should set the preferred width to once the ExtensionView has + // loaded. + gfx::Size pending_preferred_size_; + DISALLOW_COPY_AND_ASSIGN(ExtensionViewMac); }; |