| 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 , public RefCounted<WebViewImpl> | 99 , public RefCounted<WebViewImpl> |
| 100 , WTF_NON_EXPORTED_BASE(public WebGestureCurveTarget) | 100 , WTF_NON_EXPORTED_BASE(public WebGestureCurveTarget) |
| 101 , public PageWidgetEventHandler { | 101 , public PageWidgetEventHandler { |
| 102 public: | 102 public: |
| 103 static WebViewImpl* create(WebViewClient*); | 103 static WebViewImpl* create(WebViewClient*); |
| 104 static HashSet<WebViewImpl*>& allInstances(); | 104 static HashSet<WebViewImpl*>& allInstances(); |
| 105 | 105 |
| 106 // WebWidget methods: | 106 // WebWidget methods: |
| 107 void close() override; | 107 void close() override; |
| 108 WebSize size() override; | 108 WebSize size() override; |
| 109 void resize(const WebSize&, float topControlsHeight, bool topControlsShrinkL
ayoutSize) override; |
| 109 void resize(const WebSize&) override; | 110 void resize(const WebSize&) override; |
| 110 void resizeVisualViewport(const WebSize&) override; | 111 void resizeVisualViewport(const WebSize&) override; |
| 111 void didEnterFullScreen() override; | 112 void didEnterFullScreen() override; |
| 112 void didExitFullScreen() override; | 113 void didExitFullScreen() override; |
| 113 | 114 |
| 114 void beginFrame(double lastFrameTimeMonotonic) override; | 115 void beginFrame(double lastFrameTimeMonotonic) override; |
| 115 | 116 |
| 116 void updateAllLifecyclePhases() override; | 117 void updateAllLifecyclePhases() override; |
| 117 void paint(WebCanvas*, const WebRect&) override; | 118 void paint(WebCanvas*, const WebRect&) override; |
| 118 #if OS(ANDROID) | 119 #if OS(ANDROID) |
| (...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 494 | 495 |
| 495 WebSettingsImpl* settingsImpl(); | 496 WebSettingsImpl* settingsImpl(); |
| 496 | 497 |
| 497 // Returns the bounding box of the block type node touched by the WebPoint. | 498 // Returns the bounding box of the block type node touched by the WebPoint. |
| 498 WebRect computeBlockBound(const WebPoint&, bool ignoreClipping); | 499 WebRect computeBlockBound(const WebPoint&, bool ignoreClipping); |
| 499 | 500 |
| 500 WebLayerTreeView* layerTreeView() const { return m_layerTreeView; } | 501 WebLayerTreeView* layerTreeView() const { return m_layerTreeView; } |
| 501 | 502 |
| 502 bool matchesHeuristicsForGpuRasterizationForTesting() const { return m_match
esHeuristicsForGpuRasterization; } | 503 bool matchesHeuristicsForGpuRasterizationForTesting() const { return m_match
esHeuristicsForGpuRasterization; } |
| 503 | 504 |
| 504 void setTopControlsHeight(float height, bool topControlsShrinkLayoutSize) ov
erride; | |
| 505 void updateTopControlsState(WebTopControlsState constraint, WebTopControlsSt
ate current, bool animate) override; | 505 void updateTopControlsState(WebTopControlsState constraint, WebTopControlsSt
ate current, bool animate) override; |
| 506 | 506 |
| 507 TopControls& topControls(); | 507 TopControls& topControls(); |
| 508 // Called anytime top controls layout height or content offset have changed. | 508 // Called anytime top controls layout height or content offset have changed. |
| 509 void didUpdateTopControls(); | 509 void didUpdateTopControls(); |
| 510 | 510 |
| 511 void forceNextWebGLContextCreationToFail() override; | 511 void forceNextWebGLContextCreationToFail() override; |
| 512 void forceNextDrawingBufferCreationToFail() override; | 512 void forceNextDrawingBufferCreationToFail() override; |
| 513 | 513 |
| 514 IntSize mainFrameSize(); | 514 IntSize mainFrameSize(); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 538 void setPageScaleFactorAndLocation(float, const FloatPoint&); | 538 void setPageScaleFactorAndLocation(float, const FloatPoint&); |
| 539 | 539 |
| 540 void scrollAndRescaleViewports(float scaleFactor, const IntPoint& mainFrameO
rigin, const FloatPoint& visualViewportOrigin); | 540 void scrollAndRescaleViewports(float scaleFactor, const IntPoint& mainFrameO
rigin, const FloatPoint& visualViewportOrigin); |
| 541 | 541 |
| 542 float maximumLegiblePageScale() const; | 542 float maximumLegiblePageScale() const; |
| 543 void refreshPageScaleFactorAfterLayout(); | 543 void refreshPageScaleFactorAfterLayout(); |
| 544 void resumeTreeViewCommitsIfRenderingReady(); | 544 void resumeTreeViewCommitsIfRenderingReady(); |
| 545 IntSize contentsSize() const; | 545 IntSize contentsSize() const; |
| 546 | 546 |
| 547 void performResize(); | 547 void performResize(); |
| 548 void resizeViewWhileAnchored(FrameView*); | 548 void resizeViewWhileAnchored(FrameView*, float topControlsHeight, bool topCo
ntrolsShrinkLayoutSize); |
| 549 | 549 |
| 550 friend class WebView; // So WebView::Create can call our constructor | 550 friend class WebView; // So WebView::Create can call our constructor |
| 551 friend class WTF::RefCounted<WebViewImpl>; | 551 friend class WTF::RefCounted<WebViewImpl>; |
| 552 friend void setCurrentInputEventForTest(const WebInputEvent*); | 552 friend void setCurrentInputEventForTest(const WebInputEvent*); |
| 553 | 553 |
| 554 enum DragAction { | 554 enum DragAction { |
| 555 DragEnter, | 555 DragEnter, |
| 556 DragOver | 556 DragOver |
| 557 }; | 557 }; |
| 558 | 558 |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 771 }; | 771 }; |
| 772 | 772 |
| 773 DEFINE_TYPE_CASTS(WebViewImpl, WebWidget, widget, widget->isWebView(), widget.is
WebView()); | 773 DEFINE_TYPE_CASTS(WebViewImpl, WebWidget, widget, widget->isWebView(), widget.is
WebView()); |
| 774 // We have no ways to check if the specified WebView is an instance of | 774 // We have no ways to check if the specified WebView is an instance of |
| 775 // WebViewImpl because WebViewImpl is the only implementation of WebView. | 775 // WebViewImpl because WebViewImpl is the only implementation of WebView. |
| 776 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true); | 776 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true); |
| 777 | 777 |
| 778 } // namespace blink | 778 } // namespace blink |
| 779 | 779 |
| 780 #endif | 780 #endif |
| OLD | NEW |