Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 15 matching lines...) Expand all Loading... | |
| 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 WebWidget_h | 31 #ifndef WebWidget_h |
| 32 #define WebWidget_h | 32 #define WebWidget_h |
| 33 | 33 |
| 34 #include "../platform/WebCanvas.h" | 34 #include "../platform/WebCanvas.h" |
| 35 #include "../platform/WebCommon.h" | 35 #include "../platform/WebCommon.h" |
| 36 #include "../platform/WebPoint.h" | |
| 36 #include "../platform/WebRect.h" | 37 #include "../platform/WebRect.h" |
| 37 #include "../platform/WebSize.h" | 38 #include "../platform/WebSize.h" |
| 38 #include "WebBeginFrameArgs.h" | 39 #include "WebBeginFrameArgs.h" |
| 39 #include "WebCompositionUnderline.h" | 40 #include "WebCompositionUnderline.h" |
| 40 #include "WebTextDirection.h" | 41 #include "WebTextDirection.h" |
| 41 #include "WebTextInputInfo.h" | 42 #include "WebTextInputInfo.h" |
| 42 | 43 |
| 43 namespace blink { | 44 namespace blink { |
| 44 | 45 |
| 45 class WebCompositeAndReadbackAsyncCallback; | 46 class WebCompositeAndReadbackAsyncCallback; |
| 46 class WebInputEvent; | 47 class WebInputEvent; |
| 47 class WebLayerTreeView; | 48 class WebLayerTreeView; |
| 48 class WebMouseEvent; | 49 class WebMouseEvent; |
| 49 class WebString; | 50 class WebString; |
| 50 struct WebPoint; | 51 struct WebPoint; |
| 51 struct WebRenderingStats; | 52 struct WebRenderingStats; |
| 52 template <typename T> class WebVector; | 53 template <typename T> class WebVector; |
| 54 class WebPagePopup; | |
|
tkent
2014/09/05 01:59:05
nit: Please insert this between WebMouseEvent and
keishi
2014/09/11 12:53:26
Done.
| |
| 53 | 55 |
| 54 class WebWidget { | 56 class WebWidget { |
| 55 public: | 57 public: |
| 56 // This method closes and deletes the WebWidget. | 58 // This method closes and deletes the WebWidget. |
| 57 virtual void close() { } | 59 virtual void close() { } |
| 58 | 60 |
| 59 // Returns the current size of the WebWidget. | 61 // Returns the current size of the WebWidget. |
| 60 virtual WebSize size() { return WebSize(); } | 62 virtual WebSize size() { return WebSize(); } |
| 61 | 63 |
| 64 virtual WebPoint screenPosition() { return WebPoint(); } | |
|
tkent
2014/09/05 01:59:05
This should not be necessary because we already ha
keishi
2014/09/11 12:53:26
Done.
| |
| 65 | |
| 62 // Used to group a series of resize events. For example, if the user | 66 // Used to group a series of resize events. For example, if the user |
| 63 // drags a resizer then willStartLiveResize will be called, followed by a | 67 // drags a resizer then willStartLiveResize will be called, followed by a |
| 64 // sequence of resize events, ending with willEndLiveResize when the user | 68 // sequence of resize events, ending with willEndLiveResize when the user |
| 65 // lets go of the resizer. | 69 // lets go of the resizer. |
| 66 virtual void willStartLiveResize() { } | 70 virtual void willStartLiveResize() { } |
| 67 | 71 |
| 68 // Called to resize the WebWidget. | 72 // Called to resize the WebWidget. |
| 69 virtual void resize(const WebSize&) { } | 73 virtual void resize(const WebSize&) { } |
| 70 | 74 |
| 71 // Resizes the unscaled pinch viewport. Normally the unscaled pinch | 75 // Resizes the unscaled pinch viewport. Normally the unscaled pinch |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 247 // Informs the WebWidget that the resizer rect changed. Happens for example | 251 // Informs the WebWidget that the resizer rect changed. Happens for example |
| 248 // on mac, when a widget appears below the WebWidget without changing the | 252 // on mac, when a widget appears below the WebWidget without changing the |
| 249 // WebWidget's size (WebWidget::resize() automatically checks the resizer | 253 // WebWidget's size (WebWidget::resize() automatically checks the resizer |
| 250 // rect.) | 254 // rect.) |
| 251 virtual void didChangeWindowResizerRect() { } | 255 virtual void didChangeWindowResizerRect() { } |
| 252 | 256 |
| 253 // The page background color. Can be used for filling in areas without | 257 // The page background color. Can be used for filling in areas without |
| 254 // content. | 258 // content. |
| 255 virtual WebColor backgroundColor() const { return 0xFFFFFFFF; /* SK_ColorWHI TE */ } | 259 virtual WebColor backgroundColor() const { return 0xFFFFFFFF; /* SK_ColorWHI TE */ } |
| 256 | 260 |
| 261 // The currently open popup. | |
| 262 virtual WebPagePopup* popup() const { return 0; } | |
|
tkent
2014/09/05 01:59:04
nit: |popup| sounds too generic. Maybe |pagePopup|
keishi
2014/09/11 12:53:26
Done.
| |
| 263 | |
| 257 protected: | 264 protected: |
| 258 ~WebWidget() { } | 265 ~WebWidget() { } |
| 259 }; | 266 }; |
| 260 | 267 |
| 261 } // namespace blink | 268 } // namespace blink |
| 262 | 269 |
| 263 #endif | 270 #endif |
| OLD | NEW |