| 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 WebView; | 43 class WebView; |
| 42 class WebWidgetClient; | 44 class WebWidgetClient; |
| 43 | 45 |
| 44 class WebFrameWidget : public WebWidget { | 46 class WebFrameWidget : public WebWidget { |
| 45 public: | 47 public: |
| 46 BLINK_EXPORT static WebFrameWidget* create(WebWidgetClient*, WebLocalFrame*); | 48 BLINK_EXPORT static WebFrameWidget* create(WebWidgetClient*, WebLocalFrame*); |
| 47 // Creates a frame widget for a WebView. Temporary helper to help transition | 49 // Creates a frame widget for a WebView. Temporary helper to help transition |
| 48 // away from WebView inheriting WebWidget. | 50 // away from WebView inheriting WebWidget. |
| 49 // TODO(dcheng): Remove once transition is complete. | 51 // TODO(dcheng): Remove once transition is complete. |
| (...skipping 16 matching lines...) Expand all Loading... |
| 66 // effect the default background color used for pages with no | 68 // effect the default background color used for pages with no |
| 67 // background-color style in effect, or used as the alpha-blended basis for | 69 // background-color style in effect, or used as the alpha-blended basis for |
| 68 // any pages with translucent background-color style. (For pages with opaque | 70 // any pages with translucent background-color style. (For pages with opaque |
| 69 // background-color style, this property is effectively ignored). | 71 // background-color style, this property is effectively ignored). |
| 70 // Setting this takes effect for the currently loaded page, if any, and | 72 // Setting this takes effect for the currently loaded page, if any, and |
| 71 // persists across subsequent navigations. Defaults to white prior to the | 73 // persists across subsequent navigations. Defaults to white prior to the |
| 72 // first call to this method. | 74 // first call to this method. |
| 73 virtual void setBaseBackgroundColor(WebColor) = 0; | 75 virtual void setBaseBackgroundColor(WebColor) = 0; |
| 74 | 76 |
| 75 // Returns the local root of this WebFrameWidget. | 77 // Returns the local root of this WebFrameWidget. |
| 76 virtual WebLocalFrame* localRoot() = 0; | 78 virtual WebLocalFrame* localRoot() const = 0; |
| 77 | 79 |
| 78 // WebWidget implementation. | 80 // WebWidget implementation. |
| 79 bool isWebFrameWidget() const final { return true; } | 81 bool isWebFrameWidget() const final { return true; } |
| 82 |
| 83 // Callback methods when a drag-and-drop operation is trying to drop something |
| 84 // on the WebWidget. |
| 85 virtual WebDragOperation dragTargetDragEnter( |
| 86 const WebDragData&, |
| 87 const WebPoint& pointInViewport, |
| 88 const WebPoint& screenPoint, |
| 89 WebDragOperationsMask operationsAllowed, |
| 90 int modifiers) = 0; |
| 91 virtual WebDragOperation dragTargetDragOver( |
| 92 const WebPoint& pointInViewport, |
| 93 const WebPoint& screenPoint, |
| 94 WebDragOperationsMask operationsAllowed, |
| 95 int modifiers) = 0; |
| 96 virtual void dragTargetDragLeave() = 0; |
| 97 virtual void dragTargetDrop(const WebDragData&, |
| 98 const WebPoint& pointInViewport, |
| 99 const WebPoint& screenPoint, |
| 100 int modifiers) = 0; |
| 80 }; | 101 }; |
| 81 | 102 |
| 82 } // namespace blink | 103 } // namespace blink |
| 83 | 104 |
| 84 #endif | 105 #endif |
| OLD | NEW |