diff options
author | erikkay@chromium.org <erikkay@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-16 14:57:25 +0000 |
---|---|---|
committer | erikkay@chromium.org <erikkay@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-16 14:57:25 +0000 |
commit | ab32b16c9acd73a2f2d2a92f1e8e5083b51b3953 (patch) | |
tree | e3910fea8522ea0a6e34d30b40a0a659c4a9d93f /chrome/browser/cocoa | |
parent | 357ff69d8564f44ffb7eb8ff3214d9cf7885dd63 (diff) | |
download | chromium_src-ab32b16c9acd73a2f2d2a92f1e8e5083b51b3953.zip chromium_src-ab32b16c9acd73a2f2d2a92f1e8e5083b51b3953.tar.gz chromium_src-ab32b16c9acd73a2f2d2a92f1e8e5083b51b3953.tar.bz2 |
Popup width and height are now dynamic.
BUG=24471
TEST=none
Review URL: http://codereview.chromium.org/273046
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29274 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa')
-rw-r--r-- | chrome/browser/cocoa/extension_view_mac.h | 5 | ||||
-rw-r--r-- | chrome/browser/cocoa/extension_view_mac.mm | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/chrome/browser/cocoa/extension_view_mac.h b/chrome/browser/cocoa/extension_view_mac.h index 8abb481..4ce4c13 100644 --- a/chrome/browser/cocoa/extension_view_mac.h +++ b/chrome/browser/cocoa/extension_view_mac.h @@ -7,6 +7,7 @@ #include "app/gfx/native_widget_types.h" #include "base/basictypes.h" +#include "base/gfx/size.h" #include "third_party/skia/include/core/SkBitmap.h" class Browser; @@ -40,9 +41,9 @@ class ExtensionViewMac { // Sets the extensions's background image. void SetBackground(const SkBitmap& background); - // Method for the ExtensionHost to notify us about the correct width for + // Method for the ExtensionHost to notify us about the correct size for // extension contents. - void UpdatePreferredWidth(int pref_width); + void UpdatePreferredSize(const gfx::Size& new_size); // Method for the ExtensionHost to notify us when the RenderViewHost has a // connection. diff --git a/chrome/browser/cocoa/extension_view_mac.mm b/chrome/browser/cocoa/extension_view_mac.mm index c9844b3..171cc30 100644 --- a/chrome/browser/cocoa/extension_view_mac.mm +++ b/chrome/browser/cocoa/extension_view_mac.mm @@ -44,7 +44,7 @@ void ExtensionViewMac::SetBackground(const SkBitmap& background) { } } -void ExtensionViewMac::UpdatePreferredWidth(int pref_width) { +void ExtensionViewMac::UpdatePreferredSize(const gfx::Size& new_size) { // TODO(thakis, erikkay): Windows does some tricks to resize the extension // view not before it's visible. Do something similar here. @@ -52,7 +52,7 @@ void ExtensionViewMac::UpdatePreferredWidth(int pref_width) { // resizing. NSView* view = native_view(); NSRect frame = [view frame]; - frame.size.width = pref_width; + frame.size.width = new_size.width(); // RenderWidgetHostViewCocoa overrides setFrame but not setFrameSize. [view setFrame:frame]; |