| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2014 Google Inc. All rights reserved. | 2 * Copyright (C) 2014 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 14 matching lines...) Expand all Loading... |
| 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #ifndef WebFrameWidget_h | 31 #ifndef WebFrameWidget_h |
| 32 #define WebFrameWidget_h | 32 #define WebFrameWidget_h |
| 33 | 33 |
| 34 #include "../platform/WebCommon.h" | 34 #include "../platform/WebCommon.h" |
| 35 #include "../platform/WebDragOperation.h" |
| 35 #include "../platform/WebPageVisibilityState.h" | 36 #include "../platform/WebPageVisibilityState.h" |
| 36 #include "public/web/WebWidget.h" | 37 #include "public/web/WebWidget.h" |
| 37 | 38 |
| 38 namespace blink { | 39 namespace blink { |
| 39 | 40 |
| 41 class WebDragData; |
| 40 class WebLocalFrame; | 42 class WebLocalFrame; |
| 41 class WebInputMethodController; | 43 class WebInputMethodController; |
| 42 class WebView; | 44 class WebView; |
| 43 class WebWidgetClient; | 45 class WebWidgetClient; |
| 44 | 46 |
| 45 class WebFrameWidget : public WebWidget { | 47 class WebFrameWidget : public WebWidget { |
| 46 public: | 48 public: |
| 47 BLINK_EXPORT static WebFrameWidget* create(WebWidgetClient*, WebLocalFrame*); | 49 BLINK_EXPORT static WebFrameWidget* create(WebWidgetClient*, WebLocalFrame*); |
| 48 // Creates a frame widget for a WebView. Temporary helper to help transition | 50 // Creates a frame widget for a WebView. Temporary helper to help transition |
| 49 // away from WebView inheriting WebWidget. | 51 // away from WebView inheriting WebWidget. |
| (...skipping 17 matching lines...) Expand all Loading... |
| 67 // effect the default background color used for pages with no | 69 // effect the default background color used for pages with no |
| 68 // background-color style in effect, or used as the alpha-blended basis for | 70 // background-color style in effect, or used as the alpha-blended basis for |
| 69 // any pages with translucent background-color style. (For pages with opaque | 71 // any pages with translucent background-color style. (For pages with opaque |
| 70 // background-color style, this property is effectively ignored). | 72 // background-color style, this property is effectively ignored). |
| 71 // Setting this takes effect for the currently loaded page, if any, and | 73 // Setting this takes effect for the currently loaded page, if any, and |
| 72 // persists across subsequent navigations. Defaults to white prior to the | 74 // persists across subsequent navigations. Defaults to white prior to the |
| 73 // first call to this method. | 75 // first call to this method. |
| 74 virtual void setBaseBackgroundColor(WebColor) = 0; | 76 virtual void setBaseBackgroundColor(WebColor) = 0; |
| 75 | 77 |
| 76 // Returns the local root of this WebFrameWidget. | 78 // Returns the local root of this WebFrameWidget. |
| 77 virtual WebLocalFrame* localRoot() = 0; | 79 virtual WebLocalFrame* localRoot() const = 0; |
| 78 | 80 |
| 79 // WebWidget implementation. | 81 // WebWidget implementation. |
| 80 bool isWebFrameWidget() const final { return true; } | 82 bool isWebFrameWidget() const final { return true; } |
| 81 | 83 |
| 82 // Current instance of the active WebInputMethodController, that is, the | 84 // Current instance of the active WebInputMethodController, that is, the |
| 83 // WebInputMethodController corresponding to (and owned by) the focused | 85 // WebInputMethodController corresponding to (and owned by) the focused |
| 84 // WebLocalFrameImpl. It might return nullptr when there are no focused | 86 // WebLocalFrameImpl. It might return nullptr when there are no focused |
| 85 // frames or possibly when the WebFrameWidget does not accept IME events. | 87 // frames or possibly when the WebFrameWidget does not accept IME events. |
| 86 virtual WebInputMethodController* getActiveWebInputMethodController() | 88 virtual WebInputMethodController* getActiveWebInputMethodController() |
| 87 const = 0; | 89 const = 0; |
| 90 |
| 91 // Callback methods when a drag-and-drop operation is trying to drop something |
| 92 // on the WebWidget. |
| 93 virtual WebDragOperation dragTargetDragEnter( |
| 94 const WebDragData&, |
| 95 const WebPoint& pointInViewport, |
| 96 const WebPoint& screenPoint, |
| 97 WebDragOperationsMask operationsAllowed, |
| 98 int modifiers) = 0; |
| 99 virtual WebDragOperation dragTargetDragOver( |
| 100 const WebPoint& pointInViewport, |
| 101 const WebPoint& screenPoint, |
| 102 WebDragOperationsMask operationsAllowed, |
| 103 int modifiers) = 0; |
| 104 virtual void dragTargetDragLeave() = 0; |
| 105 virtual void dragTargetDrop(const WebDragData&, |
| 106 const WebPoint& pointInViewport, |
| 107 const WebPoint& screenPoint, |
| 108 int modifiers) = 0; |
| 88 }; | 109 }; |
| 89 | 110 |
| 90 } // namespace blink | 111 } // namespace blink |
| 91 | 112 |
| 92 #endif | 113 #endif |
| OLD | NEW |