| 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 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 355 bool scrollBy(const WebFloatSize& delta, const WebFloatSize& velocity) overr
ide; | 355 bool scrollBy(const WebFloatSize& delta, const WebFloatSize& velocity) overr
ide; |
| 356 | 356 |
| 357 // Handles context menu events orignated via the the keyboard. These | 357 // Handles context menu events orignated via the the keyboard. These |
| 358 // include the VK_APPS virtual key and the Shift+F10 combine. Code is | 358 // include the VK_APPS virtual key and the Shift+F10 combine. Code is |
| 359 // based on the Webkit function bool WebView::handleContextMenuEvent(WPARAM | 359 // based on the Webkit function bool WebView::handleContextMenuEvent(WPARAM |
| 360 // wParam, LPARAM lParam) in webkit\webkit\win\WebView.cpp. The only | 360 // wParam, LPARAM lParam) in webkit\webkit\win\WebView.cpp. The only |
| 361 // significant change in this function is the code to convert from a | 361 // significant change in this function is the code to convert from a |
| 362 // Keyboard event to the Right Mouse button down event. | 362 // Keyboard event to the Right Mouse button down event. |
| 363 WebInputEventResult sendContextMenuEvent(const WebKeyboardEvent&); | 363 WebInputEventResult sendContextMenuEvent(const WebKeyboardEvent&); |
| 364 | 364 |
| 365 void showContextMenuAtPoint(float x, float y, PassRefPtrWillBeRawPtr<Context
MenuProvider>); | 365 void showContextMenuAtPoint(float x, float y, RawPtr<ContextMenuProvider>); |
| 366 | 366 |
| 367 void showContextMenuForElement(WebElement); | 367 void showContextMenuForElement(WebElement); |
| 368 | 368 |
| 369 // Notifies the WebView that a load has been committed. isNewNavigation | 369 // Notifies the WebView that a load has been committed. isNewNavigation |
| 370 // will be true if a new session history item should be created for that | 370 // will be true if a new session history item should be created for that |
| 371 // load. isNavigationWithinPage will be true if the navigation does | 371 // load. isNavigationWithinPage will be true if the navigation does |
| 372 // not take the user away from the current page. | 372 // not take the user away from the current page. |
| 373 void didCommitLoad(bool isNewNavigation, bool isNavigationWithinPage); | 373 void didCommitLoad(bool isNewNavigation, bool isNavigationWithinPage); |
| 374 | 374 |
| 375 void postLayoutResize(WebLocalFrameImpl* webframe); | 375 void postLayoutResize(WebLocalFrameImpl* webframe); |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 451 | 451 |
| 452 // Called by a full frame plugin inside this view to inform it that its | 452 // Called by a full frame plugin inside this view to inform it that its |
| 453 // zoom level has been updated. The plugin should only call this function | 453 // zoom level has been updated. The plugin should only call this function |
| 454 // if the zoom change was triggered by the browser, it's only needed in case | 454 // if the zoom change was triggered by the browser, it's only needed in case |
| 455 // a plugin can update its own zoom, say because of its own UI. | 455 // a plugin can update its own zoom, say because of its own UI. |
| 456 void fullFramePluginZoomLevelChanged(double zoomLevel); | 456 void fullFramePluginZoomLevelChanged(double zoomLevel); |
| 457 | 457 |
| 458 void computeScaleAndScrollForBlockRect(const WebPoint& hitPoint, const WebRe
ct& blockRect, float padding, float defaultScaleWhenAlreadyLegible, float& scale
, WebPoint& scroll); | 458 void computeScaleAndScrollForBlockRect(const WebPoint& hitPoint, const WebRe
ct& blockRect, float padding, float defaultScaleWhenAlreadyLegible, float& scale
, WebPoint& scroll); |
| 459 Node* bestTapNode(const GestureEventWithHitTestResults& targetedTapEvent); | 459 Node* bestTapNode(const GestureEventWithHitTestResults& targetedTapEvent); |
| 460 void enableTapHighlightAtPoint(const GestureEventWithHitTestResults& targete
dTapEvent); | 460 void enableTapHighlightAtPoint(const GestureEventWithHitTestResults& targete
dTapEvent); |
| 461 void enableTapHighlights(WillBeHeapVector<RawPtrWillBeMember<Node>>&); | 461 void enableTapHighlights(HeapVector<Member<Node>>&); |
| 462 void computeScaleAndScrollForFocusedNode(Node* focusedNode, bool zoomInToLeg
ibleScale, float& scale, IntPoint& scroll, bool& needAnimation); | 462 void computeScaleAndScrollForFocusedNode(Node* focusedNode, bool zoomInToLeg
ibleScale, float& scale, IntPoint& scroll, bool& needAnimation); |
| 463 | 463 |
| 464 void animateDoubleTapZoom(const IntPoint&); | 464 void animateDoubleTapZoom(const IntPoint&); |
| 465 | 465 |
| 466 void enableFakePageScaleAnimationForTesting(bool); | 466 void enableFakePageScaleAnimationForTesting(bool); |
| 467 bool fakeDoubleTapAnimationPendingForTesting() const { return m_doubleTapZoo
mPending; } | 467 bool fakeDoubleTapAnimationPendingForTesting() const { return m_doubleTapZoo
mPending; } |
| 468 IntPoint fakePageScaleAnimationTargetPositionForTesting() const { return m_f
akePageScaleAnimationTargetPosition; } | 468 IntPoint fakePageScaleAnimationTargetPositionForTesting() const { return m_f
akePageScaleAnimationTargetPosition; } |
| 469 float fakePageScaleAnimationPageScaleForTesting() const { return m_fakePageS
caleAnimationPageScaleFactor; } | 469 float fakePageScaleAnimationPageScaleForTesting() const { return m_fakePageS
caleAnimationPageScaleFactor; } |
| 470 bool fakePageScaleAnimationUseAnchorForTesting() const { return m_fakePageSc
aleAnimationUseAnchor; } | 470 bool fakePageScaleAnimationUseAnchorForTesting() const { return m_fakePageSc
aleAnimationUseAnchor; } |
| 471 | 471 |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 619 void disablePopupMouseWheelEventListener(); | 619 void disablePopupMouseWheelEventListener(); |
| 620 | 620 |
| 621 void cancelPagePopup(); | 621 void cancelPagePopup(); |
| 622 void updatePageOverlays(); | 622 void updatePageOverlays(); |
| 623 | 623 |
| 624 float deviceScaleFactor() const; | 624 float deviceScaleFactor() const; |
| 625 | 625 |
| 626 WebViewClient* m_client; // Can be 0 (e.g. unittests, shared workers, etc.) | 626 WebViewClient* m_client; // Can be 0 (e.g. unittests, shared workers, etc.) |
| 627 WebSpellCheckClient* m_spellCheckClient; | 627 WebSpellCheckClient* m_spellCheckClient; |
| 628 | 628 |
| 629 OwnPtrWillBePersistent<ChromeClientImpl> m_chromeClientImpl; | 629 Persistent<ChromeClientImpl> m_chromeClientImpl; |
| 630 ContextMenuClientImpl m_contextMenuClientImpl; | 630 ContextMenuClientImpl m_contextMenuClientImpl; |
| 631 DragClientImpl m_dragClientImpl; | 631 DragClientImpl m_dragClientImpl; |
| 632 EditorClientImpl m_editorClientImpl; | 632 EditorClientImpl m_editorClientImpl; |
| 633 SpellCheckerClientImpl m_spellCheckerClientImpl; | 633 SpellCheckerClientImpl m_spellCheckerClientImpl; |
| 634 StorageClientImpl m_storageClientImpl; | 634 StorageClientImpl m_storageClientImpl; |
| 635 | 635 |
| 636 WebSize m_size; | 636 WebSize m_size; |
| 637 // If true, automatically resize the layout view around its content. | 637 // If true, automatically resize the layout view around its content. |
| 638 bool m_shouldAutoResize; | 638 bool m_shouldAutoResize; |
| 639 // The lower bound on the size when auto-resizing. | 639 // The lower bound on the size when auto-resizing. |
| 640 IntSize m_minAutoSize; | 640 IntSize m_minAutoSize; |
| 641 // The upper bound on the size when auto-resizing. | 641 // The upper bound on the size when auto-resizing. |
| 642 IntSize m_maxAutoSize; | 642 IntSize m_maxAutoSize; |
| 643 | 643 |
| 644 OwnPtrWillBePersistent<Page> m_page; | 644 Persistent<Page> m_page; |
| 645 | 645 |
| 646 // An object that can be used to manipulate m_page->settings() without linki
ng | 646 // An object that can be used to manipulate m_page->settings() without linki
ng |
| 647 // against WebCore. This is lazily allocated the first time GetWebSettings() | 647 // against WebCore. This is lazily allocated the first time GetWebSettings() |
| 648 // is called. | 648 // is called. |
| 649 OwnPtr<WebSettingsImpl> m_webSettings; | 649 OwnPtr<WebSettingsImpl> m_webSettings; |
| 650 | 650 |
| 651 // A copy of the web drop data object we received from the browser. | 651 // A copy of the web drop data object we received from the browser. |
| 652 Persistent<DataObject> m_currentDragData; | 652 Persistent<DataObject> m_currentDragData; |
| 653 | 653 |
| 654 // The point relative to the client area where the mouse was last pressed | 654 // The point relative to the client area where the mouse was last pressed |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 707 WebDragOperation m_operationsAllowed; | 707 WebDragOperation m_operationsAllowed; |
| 708 | 708 |
| 709 // The current drag operation as negotiated by the source and destination. | 709 // The current drag operation as negotiated by the source and destination. |
| 710 // When not equal to DragOperationNone, the drag data can be dropped onto th
e | 710 // When not equal to DragOperationNone, the drag data can be dropped onto th
e |
| 711 // current drop target in this WebView (the drop target can accept the drop)
. | 711 // current drop target in this WebView (the drop target can accept the drop)
. |
| 712 WebDragOperation m_dragOperation; | 712 WebDragOperation m_dragOperation; |
| 713 | 713 |
| 714 // The popup associated with an input/select element. | 714 // The popup associated with an input/select element. |
| 715 RefPtr<WebPagePopupImpl> m_pagePopup; | 715 RefPtr<WebPagePopupImpl> m_pagePopup; |
| 716 | 716 |
| 717 OwnPtrWillBePersistent<DevToolsEmulator> m_devToolsEmulator; | 717 Persistent<DevToolsEmulator> m_devToolsEmulator; |
| 718 OwnPtr<PageOverlay> m_pageColorOverlay; | 718 OwnPtr<PageOverlay> m_pageColorOverlay; |
| 719 | 719 |
| 720 // Whether the webview is rendering transparently. | 720 // Whether the webview is rendering transparently. |
| 721 bool m_isTransparent; | 721 bool m_isTransparent; |
| 722 | 722 |
| 723 // Whether the user can press tab to focus links. | 723 // Whether the user can press tab to focus links. |
| 724 bool m_tabsToLinks; | 724 bool m_tabsToLinks; |
| 725 | 725 |
| 726 // If set, the (plugin) node which has mouse capture. | 726 // If set, the (plugin) node which has mouse capture. |
| 727 RefPtrWillBePersistent<Node> m_mouseCaptureNode; | 727 Persistent<Node> m_mouseCaptureNode; |
| 728 RefPtr<UserGestureToken> m_mouseCaptureGestureToken; | 728 RefPtr<UserGestureToken> m_mouseCaptureGestureToken; |
| 729 | 729 |
| 730 RefPtr<UserGestureToken> m_pointerLockGestureToken; | 730 RefPtr<UserGestureToken> m_pointerLockGestureToken; |
| 731 | 731 |
| 732 WebLayerTreeView* m_layerTreeView; | 732 WebLayerTreeView* m_layerTreeView; |
| 733 WebLayer* m_rootLayer; | 733 WebLayer* m_rootLayer; |
| 734 GraphicsLayer* m_rootGraphicsLayer; | 734 GraphicsLayer* m_rootGraphicsLayer; |
| 735 bool m_matchesHeuristicsForGpuRasterization; | 735 bool m_matchesHeuristicsForGpuRasterization; |
| 736 static const WebInputEvent* m_currentInputEvent; | 736 static const WebInputEvent* m_currentInputEvent; |
| 737 | 737 |
| 738 MediaKeysClientImpl m_mediaKeysClientImpl; | 738 MediaKeysClientImpl m_mediaKeysClientImpl; |
| 739 OwnPtr<WebActiveGestureAnimation> m_gestureAnimation; | 739 OwnPtr<WebActiveGestureAnimation> m_gestureAnimation; |
| 740 WebPoint m_positionOnFlingStart; | 740 WebPoint m_positionOnFlingStart; |
| 741 WebPoint m_globalPositionOnFlingStart; | 741 WebPoint m_globalPositionOnFlingStart; |
| 742 int m_flingModifier; | 742 int m_flingModifier; |
| 743 WebGestureDevice m_flingSourceDevice; | 743 WebGestureDevice m_flingSourceDevice; |
| 744 Vector<OwnPtr<LinkHighlightImpl>> m_linkHighlights; | 744 Vector<OwnPtr<LinkHighlightImpl>> m_linkHighlights; |
| 745 OwnPtr<CompositorAnimationTimeline> m_linkHighlightsTimeline; | 745 OwnPtr<CompositorAnimationTimeline> m_linkHighlightsTimeline; |
| 746 OwnPtrWillBePersistent<FullscreenController> m_fullscreenController; | 746 Persistent<FullscreenController> m_fullscreenController; |
| 747 | 747 |
| 748 bool m_showFPSCounter; | 748 bool m_showFPSCounter; |
| 749 WebColor m_baseBackgroundColor; | 749 WebColor m_baseBackgroundColor; |
| 750 WebColor m_backgroundColorOverride; | 750 WebColor m_backgroundColorOverride; |
| 751 float m_zoomFactorOverride; | 751 float m_zoomFactorOverride; |
| 752 | 752 |
| 753 bool m_userGestureObserved; | 753 bool m_userGestureObserved; |
| 754 bool m_shouldDispatchFirstVisuallyNonEmptyLayout; | 754 bool m_shouldDispatchFirstVisuallyNonEmptyLayout; |
| 755 bool m_shouldDispatchFirstLayoutAfterFinishedParsing; | 755 bool m_shouldDispatchFirstLayoutAfterFinishedParsing; |
| 756 bool m_shouldDispatchFirstLayoutAfterFinishedLoading; | 756 bool m_shouldDispatchFirstLayoutAfterFinishedLoading; |
| 757 WebDisplayMode m_displayMode; | 757 WebDisplayMode m_displayMode; |
| 758 | 758 |
| 759 FloatSize m_elasticOverscroll; | 759 FloatSize m_elasticOverscroll; |
| 760 | 760 |
| 761 RefPtrWillBePersistent<EventListener> m_popupMouseWheelEventListener; | 761 Persistent<EventListener> m_popupMouseWheelEventListener; |
| 762 | 762 |
| 763 WebPageImportanceSignals m_pageImportanceSignals; | 763 WebPageImportanceSignals m_pageImportanceSignals; |
| 764 | 764 |
| 765 const OwnPtr<WebViewScheduler> m_scheduler; | 765 const OwnPtr<WebViewScheduler> m_scheduler; |
| 766 | 766 |
| 767 // Manages the layer tree created for this page in Slimming Paint v2. | 767 // Manages the layer tree created for this page in Slimming Paint v2. |
| 768 PaintArtifactCompositor m_paintArtifactCompositor; | 768 PaintArtifactCompositor m_paintArtifactCompositor; |
| 769 }; | 769 }; |
| 770 | 770 |
| 771 DEFINE_TYPE_CASTS(WebViewImpl, WebWidget, widget, widget->isWebView(), widget.is
WebView()); | 771 DEFINE_TYPE_CASTS(WebViewImpl, WebWidget, widget, widget->isWebView(), widget.is
WebView()); |
| 772 // We have no ways to check if the specified WebView is an instance of | 772 // We have no ways to check if the specified WebView is an instance of |
| 773 // WebViewImpl because WebViewImpl is the only implementation of WebView. | 773 // WebViewImpl because WebViewImpl is the only implementation of WebView. |
| 774 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true); | 774 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true); |
| 775 | 775 |
| 776 } // namespace blink | 776 } // namespace blink |
| 777 | 777 |
| 778 #endif | 778 #endif |
| OLD | NEW |