| OLD | NEW |
| 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 , public WebGestureCurveTarget | 69 , public WebGestureCurveTarget |
| 70 , public PageWidgetEventHandler { | 70 , public PageWidgetEventHandler { |
| 71 public: | 71 public: |
| 72 static WebViewImpl* create(WebViewClient*); | 72 static WebViewImpl* create(WebViewClient*); |
| 73 | 73 |
| 74 // WebWidget methods: | 74 // WebWidget methods: |
| 75 virtual void close() override; | 75 virtual void close() override; |
| 76 virtual WebSize size() override; | 76 virtual WebSize size() override; |
| 77 virtual void willStartLiveResize() override; | 77 virtual void willStartLiveResize() override; |
| 78 virtual void resize(const WebSize&) override; | 78 virtual void resize(const WebSize&) override; |
| 79 virtual void resizePinchViewport(const WebSize&) override; | |
| 80 virtual void willEndLiveResize() override; | 79 virtual void willEndLiveResize() override; |
| 81 | 80 |
| 82 virtual void beginFrame(const WebBeginFrameArgs&) override; | 81 virtual void beginFrame(const WebBeginFrameArgs&) override; |
| 83 virtual void didCommitFrameToCompositor() override; | 82 virtual void didCommitFrameToCompositor() override; |
| 84 | 83 |
| 85 virtual void layout() override; | 84 virtual void layout() override; |
| 86 virtual void paint(WebCanvas*, const WebRect&) override; | 85 virtual void paint(WebCanvas*, const WebRect&) override; |
| 87 #if OS(ANDROID) | 86 #if OS(ANDROID) |
| 88 virtual void paintCompositedDeprecated(WebCanvas*, const WebRect&) override; | 87 virtual void paintCompositedDeprecated(WebCanvas*, const WebRect&) override; |
| 89 #endif | 88 #endif |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 virtual void scrollFocusedNodeIntoRect(const WebRect&) override; | 142 virtual void scrollFocusedNodeIntoRect(const WebRect&) override; |
| 144 virtual void zoomToFindInPageRect(const WebRect&) override; | 143 virtual void zoomToFindInPageRect(const WebRect&) override; |
| 145 virtual void advanceFocus(bool reverse) override; | 144 virtual void advanceFocus(bool reverse) override; |
| 146 virtual double zoomLevel() override; | 145 virtual double zoomLevel() override; |
| 147 virtual double setZoomLevel(double) override; | 146 virtual double setZoomLevel(double) override; |
| 148 virtual void zoomLimitsChanged(double minimumZoomLevel, double maximumZoomLe
vel) override; | 147 virtual void zoomLimitsChanged(double minimumZoomLevel, double maximumZoomLe
vel) override; |
| 149 virtual float textZoomFactor() override; | 148 virtual float textZoomFactor() override; |
| 150 virtual float setTextZoomFactor(float) override; | 149 virtual float setTextZoomFactor(float) override; |
| 151 virtual bool zoomToMultipleTargetsRect(const WebRect&) override; | 150 virtual bool zoomToMultipleTargetsRect(const WebRect&) override; |
| 152 virtual void setMainFrameScrollOffset(const WebPoint&) override; | 151 virtual void setMainFrameScrollOffset(const WebPoint&) override; |
| 153 virtual void setPinchViewportOffset(const WebFloatPoint&) override; | |
| 154 virtual WebFloatPoint pinchViewportOffset() const override; | |
| 155 virtual void resetScrollAndScaleState() override; | 152 virtual void resetScrollAndScaleState() override; |
| 156 virtual WebSize contentsPreferredMinimumSize() override; | 153 virtual WebSize contentsPreferredMinimumSize() override; |
| 157 | 154 |
| 158 virtual float deviceScaleFactor() const override; | 155 virtual float deviceScaleFactor() const override; |
| 159 virtual void setDeviceScaleFactor(float) override; | 156 virtual void setDeviceScaleFactor(float) override; |
| 160 | 157 |
| 161 virtual void setFixedLayoutSize(const WebSize&) override; | 158 virtual void setFixedLayoutSize(const WebSize&) override; |
| 162 | 159 |
| 163 virtual void performMediaPlayerAction( | 160 virtual void performMediaPlayerAction( |
| 164 const WebMediaPlayerAction& action, | 161 const WebMediaPlayerAction& action, |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 WebSettingsImpl* settingsImpl(); | 317 WebSettingsImpl* settingsImpl(); |
| 321 | 318 |
| 322 // Returns the bounding box of the block type node touched by the WebRect. | 319 // Returns the bounding box of the block type node touched by the WebRect. |
| 323 WebRect computeBlockBounds(const WebRect&, bool ignoreClipping); | 320 WebRect computeBlockBounds(const WebRect&, bool ignoreClipping); |
| 324 | 321 |
| 325 IntPoint clampOffsetAtScale(const IntPoint& offset, float scale); | 322 IntPoint clampOffsetAtScale(const IntPoint& offset, float scale); |
| 326 | 323 |
| 327 // Exposed for tests. | 324 // Exposed for tests. |
| 328 WebVector<WebCompositionUnderline> compositionUnderlines() const; | 325 WebVector<WebCompositionUnderline> compositionUnderlines() const; |
| 329 | 326 |
| 330 bool pinchVirtualViewportEnabled() const; | |
| 331 | |
| 332 bool matchesHeuristicsForGpuRasterizationForTesting() const { return m_match
esHeuristicsForGpuRasterization; } | 327 bool matchesHeuristicsForGpuRasterizationForTesting() const { return m_match
esHeuristicsForGpuRasterization; } |
| 333 | 328 |
| 334 private: | 329 private: |
| 335 float legibleScale() const; | 330 float legibleScale() const; |
| 336 void resumeTreeViewCommits(); | 331 void resumeTreeViewCommits(); |
| 337 IntSize contentsSize() const; | 332 IntSize contentsSize() const; |
| 338 | 333 |
| 339 void resetSavedScrollAndScaleState(); | 334 void resetSavedScrollAndScaleState(); |
| 340 | 335 |
| 341 void updateMainFrameScrollPosition(const IntPoint& scrollPosition, bool prog
rammaticScroll); | 336 void updateMainFrameScrollPosition(const IntPoint& scrollPosition, bool prog
rammaticScroll); |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 497 bool m_userGestureObserved; | 492 bool m_userGestureObserved; |
| 498 }; | 493 }; |
| 499 | 494 |
| 500 // We have no ways to check if the specified WebView is an instance of | 495 // We have no ways to check if the specified WebView is an instance of |
| 501 // WebViewImpl because WebViewImpl is the only implementation of WebView. | 496 // WebViewImpl because WebViewImpl is the only implementation of WebView. |
| 502 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true); | 497 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true); |
| 503 | 498 |
| 504 } // namespace blink | 499 } // namespace blink |
| 505 | 500 |
| 506 #endif | 501 #endif |
| OLD | NEW |