Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(206)

Unified Diff: ui/views/controls/webview/webview.h

Issue 10388203: [Views, WebIntents] Enable auto-resizing for WebContents (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Actually made resize work Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/views/web_intent_picker_views.cc ('k') | ui/views/controls/webview/webview.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
};
« no previous file with comments | « chrome/browser/ui/views/web_intent_picker_views.cc ('k') | ui/views/controls/webview/webview.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698