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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 virtual void paint(WebCanvas*, const WebRect&) OVERRIDE; | 105 virtual void paint(WebCanvas*, const WebRect&) OVERRIDE; |
106 #if OS(ANDROID) | 106 #if OS(ANDROID) |
107 virtual void paintCompositedDeprecated(WebCanvas*, const WebRect&) OVERRIDE; | 107 virtual void paintCompositedDeprecated(WebCanvas*, const WebRect&) OVERRIDE; |
108 #endif | 108 #endif |
109 virtual void compositeAndReadbackAsync(WebCompositeAndReadbackAsyncCallback*
) OVERRIDE; | 109 virtual void compositeAndReadbackAsync(WebCompositeAndReadbackAsyncCallback*
) OVERRIDE; |
110 virtual bool isTrackingRepaints() const OVERRIDE; | 110 virtual bool isTrackingRepaints() const OVERRIDE; |
111 virtual void themeChanged() OVERRIDE; | 111 virtual void themeChanged() OVERRIDE; |
112 virtual bool handleInputEvent(const WebInputEvent&) OVERRIDE; | 112 virtual bool handleInputEvent(const WebInputEvent&) OVERRIDE; |
113 virtual void setCursorVisibilityState(bool isVisible) OVERRIDE; | 113 virtual void setCursorVisibilityState(bool isVisible) OVERRIDE; |
114 virtual bool hasTouchEventHandlersAt(const WebPoint&) OVERRIDE; | 114 virtual bool hasTouchEventHandlersAt(const WebPoint&) OVERRIDE; |
| 115 |
| 116 // FIXME(bokan): Old pinch path only - This should be removed once old pinch |
| 117 // is removed. |
115 virtual void applyViewportDeltas( | 118 virtual void applyViewportDeltas( |
116 const WebSize& scrollDelta, | 119 const WebSize& scrollDelta, |
117 float pageScaleDelta, | 120 float pageScaleDelta, |
118 float topControlsDelta) OVERRIDE; | 121 float topControlsDelta) OVERRIDE; |
| 122 virtual void applyViewportDeltas( |
| 123 const WebSize& pinchViewportDelta, |
| 124 const WebSize& mainFrameDelta, |
| 125 float pageScaleDelta, |
| 126 float topControlsDelta) OVERRIDE; |
119 virtual void mouseCaptureLost() OVERRIDE; | 127 virtual void mouseCaptureLost() OVERRIDE; |
120 virtual void setFocus(bool enable) OVERRIDE; | 128 virtual void setFocus(bool enable) OVERRIDE; |
121 virtual bool setComposition( | 129 virtual bool setComposition( |
122 const WebString& text, | 130 const WebString& text, |
123 const WebVector<WebCompositionUnderline>& underlines, | 131 const WebVector<WebCompositionUnderline>& underlines, |
124 int selectionStart, | 132 int selectionStart, |
125 int selectionEnd) OVERRIDE; | 133 int selectionEnd) OVERRIDE; |
126 virtual bool confirmComposition() OVERRIDE; | 134 virtual bool confirmComposition() OVERRIDE; |
127 virtual bool confirmComposition(ConfirmCompositionBehavior selectionBehavior
) OVERRIDE; | 135 virtual bool confirmComposition(ConfirmCompositionBehavior selectionBehavior
) OVERRIDE; |
128 virtual bool confirmComposition(const WebString& text) OVERRIDE; | 136 virtual bool confirmComposition(const WebString& text) OVERRIDE; |
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
476 | 484 |
477 // Exposed for tests. | 485 // Exposed for tests. |
478 unsigned numLinkHighlights() { return m_linkHighlights.size(); } | 486 unsigned numLinkHighlights() { return m_linkHighlights.size(); } |
479 LinkHighlight* linkHighlight(int i) { return m_linkHighlights[i].get(); } | 487 LinkHighlight* linkHighlight(int i) { return m_linkHighlights[i].get(); } |
480 | 488 |
481 WebSettingsImpl* settingsImpl(); | 489 WebSettingsImpl* settingsImpl(); |
482 | 490 |
483 // Returns the bounding box of the block type node touched by the WebRect. | 491 // Returns the bounding box of the block type node touched by the WebRect. |
484 WebRect computeBlockBounds(const WebRect&, bool ignoreClipping); | 492 WebRect computeBlockBounds(const WebRect&, bool ignoreClipping); |
485 | 493 |
| 494 // FIXME(bokan): Replace with PinchViewport::clampDocumentOffsetAtScale once |
| 495 // old-path is gone. |
486 IntPoint clampOffsetAtScale(const IntPoint& offset, float scale); | 496 IntPoint clampOffsetAtScale(const IntPoint& offset, float scale); |
487 | 497 |
488 // Exposed for tests. | 498 // Exposed for tests. |
489 WebVector<WebCompositionUnderline> compositionUnderlines() const; | 499 WebVector<WebCompositionUnderline> compositionUnderlines() const; |
490 | 500 |
491 WebLayerTreeView* layerTreeView() const { return m_layerTreeView; } | 501 WebLayerTreeView* layerTreeView() const { return m_layerTreeView; } |
492 | 502 |
493 bool pinchVirtualViewportEnabled() const; | 503 bool pinchVirtualViewportEnabled() const; |
494 | 504 |
495 bool matchesHeuristicsForGpuRasterizationForTesting() const { return m_match
esHeuristicsForGpuRasterization; } | 505 bool matchesHeuristicsForGpuRasterizationForTesting() const { return m_match
esHeuristicsForGpuRasterization; } |
496 | 506 |
497 private: | 507 private: |
498 void setTopControlsContentOffset(float); | 508 void setTopControlsContentOffset(float); |
499 | 509 |
500 // TODO(bokan): Remains for legacy pinch. Remove once it's gone. Made privat
e to | 510 // TODO(bokan): Remains for legacy pinch. Remove once it's gone. Made privat
e to |
501 // prevent external usage | 511 // prevent external usage |
502 virtual void setPageScaleFactor(float scaleFactor, const WebPoint& origin) O
VERRIDE; | 512 virtual void setPageScaleFactor(float scaleFactor, const WebPoint& origin) O
VERRIDE; |
| 513 void setPageScaleFactorAndLocation(float, const FloatPoint&); |
503 | 514 |
504 void scrollAndRescaleViewports(float scaleFactor, const IntPoint& mainFrameO
rigin, const FloatPoint& pinchViewportOrigin); | 515 void scrollAndRescaleViewports(float scaleFactor, const IntPoint& mainFrameO
rigin, const FloatPoint& pinchViewportOrigin); |
505 | 516 |
506 IntRect visibleRectInDocument() const; | 517 IntRect visibleRectInDocument() const; |
507 | 518 |
508 float legibleScale() const; | 519 float legibleScale() const; |
509 void refreshPageScaleFactorAfterLayout(); | 520 void refreshPageScaleFactorAfterLayout(); |
510 void resumeTreeViewCommits(); | 521 void resumeTreeViewCommits(); |
511 void setUserAgentPageScaleConstraints(PageScaleConstraints newConstraints); | 522 void setUserAgentPageScaleConstraints(PageScaleConstraints newConstraints); |
512 float clampPageScaleFactorToLimits(float) const; | 523 float clampPageScaleFactorToLimits(float) const; |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
733 float m_topControlsContentOffset; | 744 float m_topControlsContentOffset; |
734 }; | 745 }; |
735 | 746 |
736 // We have no ways to check if the specified WebView is an instance of | 747 // We have no ways to check if the specified WebView is an instance of |
737 // WebViewImpl because WebViewImpl is the only implementation of WebView. | 748 // WebViewImpl because WebViewImpl is the only implementation of WebView. |
738 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true); | 749 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true); |
739 | 750 |
740 } // namespace blink | 751 } // namespace blink |
741 | 752 |
742 #endif | 753 #endif |
OLD | NEW |