| 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 22 matching lines...) Expand all Loading... |
| 33 | 33 |
| 34 #include "../platform/WebCommon.h" | 34 #include "../platform/WebCommon.h" |
| 35 #include "../platform/WebDragOperation.h" | 35 #include "../platform/WebDragOperation.h" |
| 36 #include "../platform/WebPageVisibilityState.h" | 36 #include "../platform/WebPageVisibilityState.h" |
| 37 #include "public/web/WebWidget.h" | 37 #include "public/web/WebWidget.h" |
| 38 | 38 |
| 39 namespace blink { | 39 namespace blink { |
| 40 | 40 |
| 41 class WebDragData; | 41 class WebDragData; |
| 42 class WebLocalFrame; | 42 class WebLocalFrame; |
| 43 class WebInputMethodController; | |
| 44 class WebView; | 43 class WebView; |
| 45 class WebWidgetClient; | 44 class WebWidgetClient; |
| 46 | 45 |
| 47 class WebFrameWidget : public WebWidget { | 46 class WebFrameWidget : public WebWidget { |
| 48 public: | 47 public: |
| 49 BLINK_EXPORT static WebFrameWidget* create(WebWidgetClient*, WebLocalFrame*); | 48 BLINK_EXPORT static WebFrameWidget* create(WebWidgetClient*, WebLocalFrame*); |
| 50 // 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 |
| 51 // away from WebView inheriting WebWidget. | 50 // away from WebView inheriting WebWidget. |
| 52 // TODO(dcheng): Remove once transition is complete. | 51 // TODO(dcheng): Remove once transition is complete. |
| 53 BLINK_EXPORT static WebFrameWidget* create(WebWidgetClient*, | 52 BLINK_EXPORT static WebFrameWidget* create(WebWidgetClient*, |
| (...skipping 20 matching lines...) Expand all Loading... |
| 74 // persists across subsequent navigations. Defaults to white prior to the | 73 // persists across subsequent navigations. Defaults to white prior to the |
| 75 // first call to this method. | 74 // first call to this method. |
| 76 virtual void setBaseBackgroundColor(WebColor) = 0; | 75 virtual void setBaseBackgroundColor(WebColor) = 0; |
| 77 | 76 |
| 78 // Returns the local root of this WebFrameWidget. | 77 // Returns the local root of this WebFrameWidget. |
| 79 virtual WebLocalFrame* localRoot() const = 0; | 78 virtual WebLocalFrame* localRoot() const = 0; |
| 80 | 79 |
| 81 // WebWidget implementation. | 80 // WebWidget implementation. |
| 82 bool isWebFrameWidget() const final { return true; } | 81 bool isWebFrameWidget() const final { return true; } |
| 83 | 82 |
| 84 // Current instance of the active WebInputMethodController, that is, the | |
| 85 // WebInputMethodController corresponding to (and owned by) the focused | |
| 86 // WebLocalFrameImpl. It might return nullptr when there are no focused | |
| 87 // frames or possibly when the WebFrameWidget does not accept IME events. | |
| 88 virtual WebInputMethodController* getActiveWebInputMethodController() | |
| 89 const = 0; | |
| 90 | |
| 91 // Callback methods when a drag-and-drop operation is trying to drop something | 83 // Callback methods when a drag-and-drop operation is trying to drop something |
| 92 // on the WebFrameWidget. | 84 // on the WebFrameWidget. |
| 93 virtual WebDragOperation dragTargetDragEnter( | 85 virtual WebDragOperation dragTargetDragEnter( |
| 94 const WebDragData&, | 86 const WebDragData&, |
| 95 const WebPoint& pointInViewport, | 87 const WebPoint& pointInViewport, |
| 96 const WebPoint& screenPoint, | 88 const WebPoint& screenPoint, |
| 97 WebDragOperationsMask operationsAllowed, | 89 WebDragOperationsMask operationsAllowed, |
| 98 int modifiers) = 0; | 90 int modifiers) = 0; |
| 99 virtual WebDragOperation dragTargetDragOver( | 91 virtual WebDragOperation dragTargetDragOver( |
| 100 const WebPoint& pointInViewport, | 92 const WebPoint& pointInViewport, |
| (...skipping 12 matching lines...) Expand all Loading... |
| 113 WebDragOperation) = 0; | 105 WebDragOperation) = 0; |
| 114 | 106 |
| 115 // Notfies the WebFrameWidget that the system drag and drop operation has | 107 // Notfies the WebFrameWidget that the system drag and drop operation has |
| 116 // ended. | 108 // ended. |
| 117 virtual void dragSourceSystemDragEnded() = 0; | 109 virtual void dragSourceSystemDragEnded() = 0; |
| 118 }; | 110 }; |
| 119 | 111 |
| 120 } // namespace blink | 112 } // namespace blink |
| 121 | 113 |
| 122 #endif | 114 #endif |
| OLD | NEW |