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

Side by Side Diff: Source/web/WebViewImpl.h

Issue 560623002: Adjust maximum scroll bounds on FrameView to account for top controls. (Blink-side) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 3 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 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 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 470 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 481
482 // Exposed for tests. 482 // Exposed for tests.
483 WebVector<WebCompositionUnderline> compositionUnderlines() const; 483 WebVector<WebCompositionUnderline> compositionUnderlines() const;
484 484
485 WebLayerTreeView* layerTreeView() const { return m_layerTreeView; } 485 WebLayerTreeView* layerTreeView() const { return m_layerTreeView; }
486 486
487 bool pinchVirtualViewportEnabled() const; 487 bool pinchVirtualViewportEnabled() const;
488 488
489 bool matchesHeuristicsForGpuRasterizationForTesting() const { return m_match esHeuristicsForGpuRasterization; } 489 bool matchesHeuristicsForGpuRasterizationForTesting() const { return m_match esHeuristicsForGpuRasterization; }
490 490
491 virtual void setTopControlsLayoutHeight(float) OVERRIDE;
492
491 private: 493 private:
494 void didUpdateTopControls();
492 void setTopControlsContentOffset(float); 495 void setTopControlsContentOffset(float);
493 496
494 // TODO(bokan): Remains for legacy pinch. Remove once it's gone. Made privat e to 497 // TODO(bokan): Remains for legacy pinch. Remove once it's gone. Made privat e to
495 // prevent external usage 498 // prevent external usage
496 virtual void setPageScaleFactor(float scaleFactor, const WebPoint& origin) O VERRIDE; 499 virtual void setPageScaleFactor(float scaleFactor, const WebPoint& origin) O VERRIDE;
497 500
498 float legibleScale() const; 501 float legibleScale() const;
499 void refreshPageScaleFactorAfterLayout(); 502 void refreshPageScaleFactorAfterLayout();
500 void resumeTreeViewCommits(); 503 void resumeTreeViewCommits();
501 void setUserAgentPageScaleConstraints(PageScaleConstraints newConstraints); 504 void setUserAgentPageScaleConstraints(PageScaleConstraints newConstraints);
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
713 bool m_showFPSCounter; 716 bool m_showFPSCounter;
714 bool m_showPaintRects; 717 bool m_showPaintRects;
715 bool m_showDebugBorders; 718 bool m_showDebugBorders;
716 bool m_continuousPaintingEnabled; 719 bool m_continuousPaintingEnabled;
717 bool m_showScrollBottleneckRects; 720 bool m_showScrollBottleneckRects;
718 WebColor m_baseBackgroundColor; 721 WebColor m_baseBackgroundColor;
719 WebColor m_backgroundColorOverride; 722 WebColor m_backgroundColorOverride;
720 float m_zoomFactorOverride; 723 float m_zoomFactorOverride;
721 724
722 bool m_userGestureObserved; 725 bool m_userGestureObserved;
726
727 // The top controls offset since the last compositor commit.
723 float m_topControlsContentOffset; 728 float m_topControlsContentOffset;
729
730 // The top controls offset at the time of the last Resize event. This is the
731 // amount that the viewport was shrunk by to accomodate the top controls.
732 float m_topControlsLayoutHeight;
724 }; 733 };
725 734
726 // We have no ways to check if the specified WebView is an instance of 735 // We have no ways to check if the specified WebView is an instance of
727 // WebViewImpl because WebViewImpl is the only implementation of WebView. 736 // WebViewImpl because WebViewImpl is the only implementation of WebView.
728 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true); 737 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true);
729 738
730 } // namespace blink 739 } // namespace blink
731 740
732 #endif 741 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698