Index: ui/views/controls/webview/webview.h |
diff --git a/ui/views/controls/webview/webview.h b/ui/views/controls/webview/webview.h |
index de6fa7c418ef69cd730bb04911117dc1c70f5315..6622203c0bbe55a674ffac5031ff67201e66097c 100644 |
--- a/ui/views/controls/webview/webview.h |
+++ b/ui/views/controls/webview/webview.h |
@@ -70,6 +70,10 @@ class VIEWS_EXPORT WebView : public View, |
allow_accelerators_ = allow_accelerators; |
} |
+ // Allows us to set the preferred size of a WebView, which will allow proper |
+ // layout of dialogs containing WebViews when they need to be resized. |
+ void SetPreferredSize(const gfx::Size& preferred_size); |
sky
2012/05/21 14:47:05
How about: "Sets the preferred size. If empty View
groby-ooo-7-16
2012/05/21 18:58:58
Done.
|
+ |
// Overridden from View: |
virtual std::string GetClassName() const OVERRIDE; |
@@ -86,6 +90,7 @@ class VIEWS_EXPORT WebView : public View, |
virtual void AboutToRequestFocusFromTabTraversal(bool reverse) OVERRIDE; |
virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; |
virtual gfx::NativeViewAccessible GetNativeViewAccessible() OVERRIDE; |
+ virtual gfx::Size GetPreferredSize() OVERRIDE; |
// Overridden from content::NotificationObserver: |
virtual void Observe(int type, |
@@ -115,6 +120,7 @@ class VIEWS_EXPORT WebView : public View, |
content::BrowserContext* browser_context_; |
content::NotificationRegistrar registrar_; |
bool allow_accelerators_; |
+ gfx::Size preferred_size_; |
DISALLOW_COPY_AND_ASSIGN(WebView); |
}; |