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

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: 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 5cb0a9c35004aee0c7518dd2ec91c3c75dcdb696..cc2d708846a5aedf52ed4a68e0882f217649579b 100644
--- a/Source/WebKit/chromium/src/WebViewImpl.h
+++ b/Source/WebKit/chromium/src/WebViewImpl.h
@@ -174,6 +174,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);
@@ -321,6 +325,17 @@ public:
// load.
void didCommitLoad(bool* isNewNavigation);
+ // Notifies the WebView that layout is happening but the scollbar state
+ // hasn't been updated yet.
+ void layoutBeforeScrollbarUpdate();
+
+ // Indicates two things:
+ // 1) This frame may have a new layout now.
+ // 2) Calling layout() is a no-op.
+ // After calling WebWidget::layout(), expect to get this notification
+ // for each frame unless the frame did not need a layout.
+ void didUpdateLayout(WebFrameImpl*);
+
// Returns true if popup menus should be rendered by the browser, false if
// they should be rendered by WebKit (which is the default).
static bool useExternalPopupMenus();
@@ -489,6 +504,15 @@ private:
InspectorClientImpl m_inspectorClientImpl;
WebSize m_size;
+ // If true, automatically resize the render view around its content.
+ bool m_autoSize;
+ bool m_inLayoutBeforeScrollbarUpdate;
+ // The last size sent out to the WebViewClient about an autosize change.
+ WebSize m_lastAutoSize;
+ // The lower bound on the size when autosizing.
+ WebSize m_minAutoSize;
+ // The upper bound on the size when autosizing.
+ WebSize m_maxAutoSize;
WebPoint m_lastMousePosition;
OwnPtr<WebCore::Page> m_page;

Powered by Google App Engine
This is Rietveld 408576698