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

Side by Side Diff: public/web/WebWidget.h

Issue 882683003: Normalize top controls offset to (0, 1), Blink-side. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rename to shownratio Created 5 years, 10 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 unified diff | Download patch
« no previous file with comments | « public/platform/WebLayerTreeView.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 virtual void setCursorVisibilityState(bool isVisible) { } 131 virtual void setCursorVisibilityState(bool isVisible) { }
132 132
133 // Check whether the given point hits any registered touch event handlers. 133 // Check whether the given point hits any registered touch event handlers.
134 virtual bool hasTouchEventHandlersAt(const WebPoint&) { return true; } 134 virtual bool hasTouchEventHandlersAt(const WebPoint&) { return true; }
135 135
136 // Applies viewport related properties during a commit from the compositor 136 // Applies viewport related properties during a commit from the compositor
137 // thread. 137 // thread.
138 virtual void applyViewportDeltas( 138 virtual void applyViewportDeltas(
139 const WebSize& scrollDelta, 139 const WebSize& scrollDelta,
140 float scaleFactor, 140 float scaleFactor,
141 float topControlsDelta) { } 141 float topControlsShownRatioDelta) { }
142 142
143 // Applies viewport related properties during a commit from the compositor 143 // Applies viewport related properties during a commit from the compositor
144 // thread. 144 // thread.
145 // FIXME: Remove this version once CC side switches to use WebFloatSize vers ion. 145 // FIXME: Remove this version once CC side switches to use WebFloatSize vers ion.
146 // crbug.com/414283. 146 // crbug.com/414283.
147 virtual void applyViewportDeltas( 147 virtual void applyViewportDeltas(
148 const WebSize& pinchViewportDelta, 148 const WebSize& pinchViewportDelta,
149 const WebSize& mainFrameDelta, 149 const WebSize& mainFrameDelta,
150 const WebFloatSize& elasticOverscrollDelta, 150 const WebFloatSize& elasticOverscrollDelta,
151 float scaleFactor, 151 float scaleFactor,
152 float topControlsDelta) { } 152 float topControlsShownRatioDelta) { }
153 153
154 // Applies viewport related properties during a commit from the compositor 154 // Applies viewport related properties during a commit from the compositor
155 // thread. 155 // thread.
156 virtual void applyViewportDeltas( 156 virtual void applyViewportDeltas(
157 const WebFloatSize& pinchViewportDelta, 157 const WebFloatSize& pinchViewportDelta,
158 const WebFloatSize& mainFrameDelta, 158 const WebFloatSize& mainFrameDelta,
159 const WebFloatSize& elasticOverscrollDelta, 159 const WebFloatSize& elasticOverscrollDelta,
160 float scaleFactor, 160 float scaleFactor,
161 float topControlsDelta) { } 161 float topControlsShownRatioDelta) { }
162 162
163 // Called to inform the WebWidget that mouse capture was lost. 163 // Called to inform the WebWidget that mouse capture was lost.
164 virtual void mouseCaptureLost() { } 164 virtual void mouseCaptureLost() { }
165 165
166 // Called to inform the WebWidget that it has gained or lost keyboard focus. 166 // Called to inform the WebWidget that it has gained or lost keyboard focus.
167 virtual void setFocus(bool) { } 167 virtual void setFocus(bool) { }
168 168
169 // Called to inform the WebWidget of a new composition text. 169 // Called to inform the WebWidget of a new composition text.
170 // If selectionStart and selectionEnd has the same value, then it indicates 170 // If selectionStart and selectionEnd has the same value, then it indicates
171 // the input caret position. If the text is empty, then the existing 171 // the input caret position. If the text is empty, then the existing
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 virtual void didChangeWindowResizerRect() { } 264 virtual void didChangeWindowResizerRect() { }
265 265
266 // The page background color. Can be used for filling in areas without 266 // The page background color. Can be used for filling in areas without
267 // content. 267 // content.
268 virtual WebColor backgroundColor() const { return 0xFFFFFFFF; /* SK_ColorWHI TE */ } 268 virtual WebColor backgroundColor() const { return 0xFFFFFFFF; /* SK_ColorWHI TE */ }
269 269
270 // The currently open page popup, which are calendar and datalist pickers 270 // The currently open page popup, which are calendar and datalist pickers
271 // but not the select popup. 271 // but not the select popup.
272 virtual WebPagePopup* pagePopup() const { return 0; } 272 virtual WebPagePopup* pagePopup() const { return 0; }
273 273
274 // Sets the height subtracted from the Widget to accomodate the top controls . 274 // TODO(aelias): Delete this after Blink roll.
275 virtual void setTopControlsLayoutHeight(float) { } 275 virtual void setTopControlsLayoutHeight(float) { }
276 276
277 // Notification about the top controls height. If the boolean is true, then
278 // the embedder shrunk the WebView size by the top controls height.
279 virtual void setTopControlsHeight(float height, bool topControlsShrinkLayout Size) { }
280
277 protected: 281 protected:
278 ~WebWidget() { } 282 ~WebWidget() { }
279 }; 283 };
280 284
281 } // namespace blink 285 } // namespace blink
282 286
283 #endif 287 #endif
OLDNEW
« no previous file with comments | « public/platform/WebLayerTreeView.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698