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

Unified Diff: Source/WebKit/chromium/src/WebViewImpl.h

Issue 8714006: Add autoresize capability for Chromium. (Closed) Base URL: http://git.chromium.org/external/WebKit_trimmed.git@master
Patch Set: Current patch Created 9 years, 1 month 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
Index: Source/WebKit/chromium/src/WebViewImpl.h
diff --git a/Source/WebKit/chromium/src/WebViewImpl.h b/Source/WebKit/chromium/src/WebViewImpl.h
index 7c2dd1e48478bd59501cd58b989832d2cf409e7e..497da967d38756ecf88cd7130c366011c04388db 100644
--- a/Source/WebKit/chromium/src/WebViewImpl.h
+++ b/Source/WebKit/chromium/src/WebViewImpl.h
@@ -176,6 +176,10 @@ public:
virtual void enableFixedLayoutMode(bool enable);
virtual WebSize fixedLayoutSize() const;
virtual void setFixedLayoutSize(const WebSize&);
+ virtual void enableAutoSizeMode(
+ bool enable,
+ const WebSize& minSize,
+ const WebSize& maxSize);
virtual void performMediaPlayerAction(
const WebMediaPlayerAction& action,
const WebPoint& location);
@@ -339,6 +343,21 @@ public:
return m_contextMenuAllowed;
}
+ bool shouldAutoSize() const
+ {
+ return m_shouldAutoSize;
+ }
+
+ WebCore::IntSize minAutoSize() const
+ {
+ return m_minAutoSize;
+ }
+
+ WebCore::IntSize maxAutoSize() const
+ {
+ return m_maxAutoSize;
+ }
+
// Set the disposition for how this webview is to be initially shown.
void setInitialNavigationPolicy(WebNavigationPolicy policy)
{
@@ -498,6 +517,12 @@ private:
InspectorClientImpl m_inspectorClientImpl;
WebSize m_size;
+ // If true, automatically resize the render view around its content.
+ bool m_shouldAutoSize;
+ // The lower bound on the size when autosizing.
+ WebCore::IntSize m_minAutoSize;
+ // The upper bound on the size when autosizing.
+ WebCore::IntSize m_maxAutoSize;
WebPoint m_lastMousePosition;
OwnPtr<WebCore::Page> m_page;

Powered by Google App Engine
This is Rietveld 408576698