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

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

Issue 1844013002: Fix main thread top controls scrolling to mirror CC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@propertyTreesBoundsDelta
Patch Set: Override top controls resize() in classes that override resize() Created 4 years, 8 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
OLDNEW
1 1
2 /* 2 /*
3 * Copyright (C) 2009 Google Inc. All rights reserved. 3 * Copyright (C) 2009 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 public: 59 public:
60 // This method closes and deletes the WebWidget. 60 // This method closes and deletes the WebWidget.
61 virtual void close() { } 61 virtual void close() { }
62 62
63 // Returns the current size of the WebWidget. 63 // Returns the current size of the WebWidget.
64 virtual WebSize size() { return WebSize(); } 64 virtual WebSize size() { return WebSize(); }
65 65
66 // Called to resize the WebWidget. 66 // Called to resize the WebWidget.
67 virtual void resize(const WebSize&) { } 67 virtual void resize(const WebSize&) { }
68 68
69 // Called to resize the WebWidget and top controls at the same time. Change
70 // both the widget size and top controls layout affecting height at the same
71 // time to prevent changing the viewport scroll offset due to clamping.
72 virtual void resize(
73 const WebSize&,
74 float topControlsHeight,
75 bool topControlsShrinkLayoutSize) { }
76
69 // Resizes the unscaled visual viewport. Normally the unscaled visual 77 // Resizes the unscaled visual viewport. Normally the unscaled visual
70 // viewport is the same size as the main frame. The passed size becomes the 78 // viewport is the same size as the main frame. The passed size becomes the
71 // size of the viewport when unscaled (i.e. scale = 1). This is used to 79 // size of the viewport when unscaled (i.e. scale = 1). This is used to
72 // shrink the visible viewport to allow things like the ChromeOS virtual 80 // shrink the visible viewport to allow things like the ChromeOS virtual
73 // keyboard to overlay over content but allow scrolling it into view. 81 // keyboard to overlay over content but allow scrolling it into view.
74 virtual void resizeVisualViewport(const WebSize&) { } 82 virtual void resizeVisualViewport(const WebSize&) { }
75 83
76 // Called to notify the WebWidget of entering/exiting fullscreen mode. 84 // Called to notify the WebWidget of entering/exiting fullscreen mode.
77 virtual void didEnterFullScreen() { } 85 virtual void didEnterFullScreen() { }
78 virtual void didExitFullScreen() { } 86 virtual void didExitFullScreen() { }
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 virtual void didChangeWindowResizerRect() { } 247 virtual void didChangeWindowResizerRect() { }
240 248
241 // The page background color. Can be used for filling in areas without 249 // The page background color. Can be used for filling in areas without
242 // content. 250 // content.
243 virtual WebColor backgroundColor() const { return 0xFFFFFFFF; /* SK_ColorWHI TE */ } 251 virtual WebColor backgroundColor() const { return 0xFFFFFFFF; /* SK_ColorWHI TE */ }
244 252
245 // The currently open page popup, which are calendar and datalist pickers 253 // The currently open page popup, which are calendar and datalist pickers
246 // but not the select popup. 254 // but not the select popup.
247 virtual WebPagePopup* pagePopup() const { return 0; } 255 virtual WebPagePopup* pagePopup() const { return 0; }
248 256
249 // Notification about the top controls height. If the boolean is true, then
250 // the embedder shrunk the WebView size by the top controls height.
251 virtual void setTopControlsHeight(float height, bool topControlsShrinkLayout Size) { }
252
253 // Updates top controls constraints and current state. Allows embedder to 257 // Updates top controls constraints and current state. Allows embedder to
254 // control what are valid states for top controls and if it should animate. 258 // control what are valid states for top controls and if it should animate.
255 virtual void updateTopControlsState(WebTopControlsState constraints, WebTopC ontrolsState current, bool animate) { } 259 virtual void updateTopControlsState(WebTopControlsState constraints, WebTopC ontrolsState current, bool animate) { }
256 260
257 protected: 261 protected:
258 ~WebWidget() { } 262 ~WebWidget() { }
259 }; 263 };
260 264
261 } // namespace blink 265 } // namespace blink
262 266
263 #endif 267 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698