| 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 #include "wtf/OwnPtr.h" | 61 #include "wtf/OwnPtr.h" |
| 62 #include "wtf/RefCounted.h" | 62 #include "wtf/RefCounted.h" |
| 63 #include "wtf/Vector.h" | 63 #include "wtf/Vector.h" |
| 64 | 64 |
| 65 namespace blink { | 65 namespace blink { |
| 66 | 66 |
| 67 class DataObject; | 67 class DataObject; |
| 68 class Frame; | 68 class Frame; |
| 69 class FullscreenController; | 69 class FullscreenController; |
| 70 class LinkHighlight; | 70 class LinkHighlight; |
| 71 class PopupContainer; | |
| 72 class RenderLayerCompositor; | 71 class RenderLayerCompositor; |
| 73 class UserGestureToken; | 72 class UserGestureToken; |
| 74 class WebActiveGestureAnimation; | 73 class WebActiveGestureAnimation; |
| 75 class WebDevToolsAgentPrivate; | 74 class WebDevToolsAgentPrivate; |
| 76 class WebLayerTreeView; | 75 class WebLayerTreeView; |
| 77 class WebLocalFrameImpl; | 76 class WebLocalFrameImpl; |
| 78 class WebImage; | 77 class WebImage; |
| 79 class WebPagePopupImpl; | 78 class WebPagePopupImpl; |
| 80 class WebPlugin; | 79 class WebPlugin; |
| 81 class WebSettingsImpl; | 80 class WebSettingsImpl; |
| (...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 407 | 406 |
| 408 // Start a system drag and drop operation. | 407 // Start a system drag and drop operation. |
| 409 void startDragging( | 408 void startDragging( |
| 410 LocalFrame*, | 409 LocalFrame*, |
| 411 const WebDragData& dragData, | 410 const WebDragData& dragData, |
| 412 WebDragOperationsMask mask, | 411 WebDragOperationsMask mask, |
| 413 const WebImage& dragImage, | 412 const WebImage& dragImage, |
| 414 const WebPoint& dragImageOffset); | 413 const WebPoint& dragImageOffset); |
| 415 | 414 |
| 416 // Notification that a popup was opened/closed. | 415 // Notification that a popup was opened/closed. |
| 417 void popupOpened(PopupContainer*); | |
| 418 void popupClosed(PopupContainer*); | |
| 419 PagePopup* openPagePopup(PagePopupClient*, const IntRect& originBoundsInRoot
View); | 416 PagePopup* openPagePopup(PagePopupClient*, const IntRect& originBoundsInRoot
View); |
| 420 void closePagePopup(PagePopup*); | 417 void closePagePopup(PagePopup*); |
| 421 LocalDOMWindow* pagePopupWindow() const; | 418 LocalDOMWindow* pagePopupWindow() const; |
| 422 | 419 |
| 423 // Returns the input event we're currently processing. This is used in some | 420 // Returns the input event we're currently processing. This is used in some |
| 424 // cases where the WebCore DOM event doesn't have the information we need. | 421 // cases where the WebCore DOM event doesn't have the information we need. |
| 425 static const WebInputEvent* currentInputEvent() | 422 static const WebInputEvent* currentInputEvent() |
| 426 { | 423 { |
| 427 return m_currentInputEvent; | 424 return m_currentInputEvent; |
| 428 } | 425 } |
| 429 | 426 |
| 430 GraphicsLayer* rootGraphicsLayer(); | 427 GraphicsLayer* rootGraphicsLayer(); |
| 431 void setRootGraphicsLayer(GraphicsLayer*); | 428 void setRootGraphicsLayer(GraphicsLayer*); |
| 432 void scheduleCompositingLayerSync(); | 429 void scheduleCompositingLayerSync(); |
| 433 GraphicsLayerFactory* graphicsLayerFactory() const; | 430 GraphicsLayerFactory* graphicsLayerFactory() const; |
| 434 RenderLayerCompositor* compositor() const; | 431 RenderLayerCompositor* compositor() const; |
| 435 void registerForAnimations(WebLayer*); | 432 void registerForAnimations(WebLayer*); |
| 436 void scheduleAnimation(); | 433 void scheduleAnimation(); |
| 437 | 434 |
| 438 virtual void setVisibilityState(WebPageVisibilityState, bool) override; | 435 virtual void setVisibilityState(WebPageVisibilityState, bool) override; |
| 439 | 436 |
| 440 PopupContainer* selectPopup() const { return m_selectPopup.get(); } | 437 bool hasOpenedPopup() const { return m_pagePopup; } |
| 441 bool hasOpenedPopup() const { return m_selectPopup || m_pagePopup; } | |
| 442 | 438 |
| 443 // Returns true if the event leads to scrolling. | 439 // Returns true if the event leads to scrolling. |
| 444 static bool mapKeyCodeForScroll( | 440 static bool mapKeyCodeForScroll( |
| 445 int keyCode, | 441 int keyCode, |
| 446 ScrollDirection*, | 442 ScrollDirection*, |
| 447 ScrollGranularity*); | 443 ScrollGranularity*); |
| 448 | 444 |
| 449 // Called by a full frame plugin inside this view to inform it that its | 445 // Called by a full frame plugin inside this view to inform it that its |
| 450 // zoom level has been updated. The plugin should only call this function | 446 // zoom level has been updated. The plugin should only call this function |
| 451 // if the zoom change was triggered by the browser, it's only needed in case | 447 // if the zoom change was triggered by the browser, it's only needed in case |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 559 WebString inputModeOfFocusedElement(); | 555 WebString inputModeOfFocusedElement(); |
| 560 | 556 |
| 561 // Returns true if the event was actually processed. | 557 // Returns true if the event was actually processed. |
| 562 bool keyEventDefault(const WebKeyboardEvent&); | 558 bool keyEventDefault(const WebKeyboardEvent&); |
| 563 | 559 |
| 564 bool confirmComposition(const WebString& text, ConfirmCompositionBehavior); | 560 bool confirmComposition(const WebString& text, ConfirmCompositionBehavior); |
| 565 | 561 |
| 566 // Returns true if the view was scrolled. | 562 // Returns true if the view was scrolled. |
| 567 bool scrollViewWithKeyboard(int keyCode, int modifiers); | 563 bool scrollViewWithKeyboard(int keyCode, int modifiers); |
| 568 | 564 |
| 569 void hideSelectPopup(); | |
| 570 | |
| 571 // Converts |pos| from window coordinates to contents coordinates and gets | 565 // Converts |pos| from window coordinates to contents coordinates and gets |
| 572 // the HitTestResult for it. | 566 // the HitTestResult for it. |
| 573 HitTestResult hitTestResultForWindowPos(const IntPoint&); | 567 HitTestResult hitTestResultForWindowPos(const IntPoint&); |
| 574 | 568 |
| 575 // Consolidate some common code between starting a drag over a target and | 569 // Consolidate some common code between starting a drag over a target and |
| 576 // updating a drag over a target. If we're starting a drag, |isEntering| | 570 // updating a drag over a target. If we're starting a drag, |isEntering| |
| 577 // should be true. | 571 // should be true. |
| 578 WebDragOperation dragTargetDragEnterOrOver(const WebPoint& clientPoint, | 572 WebDragOperation dragTargetDragEnterOrOver(const WebPoint& clientPoint, |
| 579 const WebPoint& screenPoint, | 573 const WebPoint& screenPoint, |
| 580 DragAction, | 574 DragAction, |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 690 bool m_imeAcceptEvents; | 684 bool m_imeAcceptEvents; |
| 691 | 685 |
| 692 // The available drag operations (copy, move link...) allowed by the source. | 686 // The available drag operations (copy, move link...) allowed by the source. |
| 693 WebDragOperation m_operationsAllowed; | 687 WebDragOperation m_operationsAllowed; |
| 694 | 688 |
| 695 // The current drag operation as negotiated by the source and destination. | 689 // The current drag operation as negotiated by the source and destination. |
| 696 // When not equal to DragOperationNone, the drag data can be dropped onto th
e | 690 // When not equal to DragOperationNone, the drag data can be dropped onto th
e |
| 697 // current drop target in this WebView (the drop target can accept the drop)
. | 691 // current drop target in this WebView (the drop target can accept the drop)
. |
| 698 WebDragOperation m_dragOperation; | 692 WebDragOperation m_dragOperation; |
| 699 | 693 |
| 700 // The popup associated with a select element. | |
| 701 RefPtrWillBePersistent<PopupContainer> m_selectPopup; | |
| 702 | |
| 703 // The popup associated with an input element. | 694 // The popup associated with an input element. |
| 704 RefPtr<WebPagePopupImpl> m_pagePopup; | 695 RefPtr<WebPagePopupImpl> m_pagePopup; |
| 705 | 696 |
| 706 OwnPtr<WebDevToolsAgentPrivate> m_devToolsAgent; | 697 OwnPtr<WebDevToolsAgentPrivate> m_devToolsAgent; |
| 707 OwnPtr<PageOverlayList> m_pageOverlays; | 698 OwnPtr<PageOverlayList> m_pageOverlays; |
| 708 | 699 |
| 709 // Whether the webview is rendering transparently. | 700 // Whether the webview is rendering transparently. |
| 710 bool m_isTransparent; | 701 bool m_isTransparent; |
| 711 | 702 |
| 712 // Whether the user can press tab to focus links. | 703 // Whether the user can press tab to focus links. |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 761 }; | 752 }; |
| 762 | 753 |
| 763 DEFINE_TYPE_CASTS(WebViewImpl, WebWidget, widget, widget->isWebView(), widget.is
WebView()); | 754 DEFINE_TYPE_CASTS(WebViewImpl, WebWidget, widget, widget->isWebView(), widget.is
WebView()); |
| 764 // We have no ways to check if the specified WebView is an instance of | 755 // We have no ways to check if the specified WebView is an instance of |
| 765 // WebViewImpl because WebViewImpl is the only implementation of WebView. | 756 // WebViewImpl because WebViewImpl is the only implementation of WebView. |
| 766 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true); | 757 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true); |
| 767 | 758 |
| 768 } // namespace blink | 759 } // namespace blink |
| 769 | 760 |
| 770 #endif | 761 #endif |
| OLD | NEW |