diff options
author | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-27 23:04:48 +0000 |
---|---|---|
committer | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-27 23:04:48 +0000 |
commit | 7deaa81460cae8f40cbd3408a611527b2299c354 (patch) | |
tree | df5bd337270d024838b2b83595c970156e741f85 /chrome/browser/extensions/extension_view.h | |
parent | 12a7aa885e5067665577bb86b20f004f0e8c57cb (diff) | |
download | chromium_src-7deaa81460cae8f40cbd3408a611527b2299c354.zip chromium_src-7deaa81460cae8f40cbd3408a611527b2299c354.tar.gz chromium_src-7deaa81460cae8f40cbd3408a611527b2299c354.tar.bz2 |
Fix several painting glitches for toolstrips.
* Reset HWND size when HWNDHtmlView changes size. The two should always be in sync.
* Race: We might already have frames when RenderWidget receives a new background, need to set these to transparent too.
* Race: Toolstrip background not always available by the time ExtensionToolstrip is constucted
* Make images line up correctly for toolstrip buttons.
Review URL: http://codereview.chromium.org/99042
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14682 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_view.h')
-rwxr-xr-x | chrome/browser/extensions/extension_view.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/chrome/browser/extensions/extension_view.h b/chrome/browser/extensions/extension_view.h index 7c11371..51c84a3 100755 --- a/chrome/browser/extensions/extension_view.h +++ b/chrome/browser/extensions/extension_view.h @@ -7,6 +7,7 @@ #include "chrome/browser/renderer_host/render_view_host_delegate.h" #include "chrome/browser/tab_contents/render_view_host_delegate_helper.h" +#include "skia/include/SkBitmap.h" // TODO(port): Port these files. #if defined(OS_WIN) @@ -30,14 +31,19 @@ class ExtensionView : public HWNDHtmlView, public RenderViewHostDelegate, public RenderViewHostDelegate::View { public: + // ExtensionView ExtensionView(Extension* extension, const GURL& url, SiteInstance* instance, Browser* browser); + Extension* extension() { return extension_; } + // HWNDHtmlView virtual void CreatingRenderer(); + virtual void SetBackground(const SkBitmap& background); + // RenderViewHostDelegate // TODO(mpcomplete): GetProfile is unused. virtual Profile* GetProfile() const { return NULL; } @@ -73,8 +79,10 @@ class ExtensionView : public HWNDHtmlView, virtual void TakeFocus(bool reverse); virtual void HandleKeyboardEvent(const NativeWebKeyboardEvent& event); - Extension* extension() { return extension_; } private: + // We wait to show the ExtensionView until several things have loaded. + void ShowIfCompletelyLoaded(); + // The extension that we're hosting in this view. Extension* extension_; @@ -84,6 +92,13 @@ class ExtensionView : public HWNDHtmlView, // Common implementations of some RenderViewHostDelegate::View methods. RenderViewHostDelegateViewHelper delegate_view_helper_; + // Whether the RenderWidget has reported that it has stopped loading. + bool did_stop_loading_; + + // What we should set the preferred width to once the ExtensionView has + // loaded. + int pending_preferred_width_; + DISALLOW_COPY_AND_ASSIGN(ExtensionView); }; |