| 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 | 100 |
| 101 // Called to paint the rectangular region within the WebWidget | 101 // Called to paint the rectangular region within the WebWidget |
| 102 // onto the specified canvas at (viewPort.x,viewPort.y). You MUST call | 102 // onto the specified canvas at (viewPort.x,viewPort.y). You MUST call |
| 103 // Layout before calling this method. It is okay to call paint | 103 // Layout before calling this method. It is okay to call paint |
| 104 // multiple times once layout has been called, assuming no other | 104 // multiple times once layout has been called, assuming no other |
| 105 // changes are made to the WebWidget (e.g., once events are | 105 // changes are made to the WebWidget (e.g., once events are |
| 106 // processed, it should be assumed that another call to layout is | 106 // processed, it should be assumed that another call to layout is |
| 107 // warranted before painting again). | 107 // warranted before painting again). |
| 108 virtual void paint(WebCanvas*, const WebRect& viewPort) { } | 108 virtual void paint(WebCanvas*, const WebRect& viewPort) { } |
| 109 | 109 |
| 110 virtual void paintCompositedDeprecated(WebCanvas*, const WebRect&) { } | |
| 111 | |
| 112 // The caller is responsible for keeping the WebCompositeAndReadbackAsyncCal
lback | |
| 113 // object alive until it is called. This should only be called when | |
| 114 // isAcceleratedCompositingActive() is true. | |
| 115 virtual void compositeAndReadbackAsync(WebCompositeAndReadbackAsyncCallback*
) { } | |
| 116 | |
| 117 // Returns true if we've started tracking repaint rectangles. | 110 // Returns true if we've started tracking repaint rectangles. |
| 118 virtual bool isTrackingRepaints() const { return false; } | 111 virtual bool isTrackingRepaints() const { return false; } |
| 119 | 112 |
| 120 // Indicates that the compositing surface associated with this WebWidget is | 113 // Indicates that the compositing surface associated with this WebWidget is |
| 121 // ready to use. | 114 // ready to use. |
| 122 virtual void setCompositorSurfaceReady() { } | 115 virtual void setCompositorSurfaceReady() { } |
| 123 | 116 |
| 124 // Called to inform the WebWidget of a change in theme. | 117 // Called to inform the WebWidget of a change in theme. |
| 125 // Implementors that cache rendered copies of widgets need to re-render | 118 // Implementors that cache rendered copies of widgets need to re-render |
| 126 // on receiving this message | 119 // on receiving this message |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 | 191 |
| 199 // Fetch the current selection range of this WebWidget. If there is no | 192 // Fetch the current selection range of this WebWidget. If there is no |
| 200 // selection, it will output a 0-length range with the location at the | 193 // selection, it will output a 0-length range with the location at the |
| 201 // caret. Returns true and fills the out-paramters on success; returns false | 194 // caret. Returns true and fills the out-paramters on success; returns false |
| 202 // on failure. | 195 // on failure. |
| 203 virtual bool caretOrSelectionRange(size_t* location, size_t* length) { retur
n false; } | 196 virtual bool caretOrSelectionRange(size_t* location, size_t* length) { retur
n false; } |
| 204 | 197 |
| 205 // Changes the text direction of the selected input node. | 198 // Changes the text direction of the selected input node. |
| 206 virtual void setTextDirection(WebTextDirection) { } | 199 virtual void setTextDirection(WebTextDirection) { } |
| 207 | 200 |
| 208 // Returns true if the WebWidget uses GPU accelerated compositing | |
| 209 // to render its contents. | |
| 210 virtual bool isAcceleratedCompositingActive() const { return false; } | |
| 211 | |
| 212 // The WebLayerTreeView initialized on this WebWidgetClient will be going aw
ay and | |
| 213 // is no longer safe to access. | |
| 214 virtual void willCloseLayerTreeView() { } | |
| 215 | |
| 216 // Calling WebWidgetClient::requestPointerLock() will result in one | 201 // Calling WebWidgetClient::requestPointerLock() will result in one |
| 217 // return call to didAcquirePointerLock() or didNotAcquirePointerLock(). | 202 // return call to didAcquirePointerLock() or didNotAcquirePointerLock(). |
| 218 virtual void didAcquirePointerLock() { } | 203 virtual void didAcquirePointerLock() { } |
| 219 virtual void didNotAcquirePointerLock() { } | 204 virtual void didNotAcquirePointerLock() { } |
| 220 | 205 |
| 221 // Pointer lock was held, but has been lost. This may be due to a | 206 // Pointer lock was held, but has been lost. This may be due to a |
| 222 // request via WebWidgetClient::requestPointerUnlock(), or for other | 207 // request via WebWidgetClient::requestPointerUnlock(), or for other |
| 223 // reasons such as the user exiting lock, window focus changing, etc. | 208 // reasons such as the user exiting lock, window focus changing, etc. |
| 224 virtual void didLosePointerLock() { } | 209 virtual void didLosePointerLock() { } |
| 225 | 210 |
| 226 // The page background color. Can be used for filling in areas without | 211 // The page background color. Can be used for filling in areas without |
| 227 // content. | 212 // content. |
| 228 virtual WebColor backgroundColor() const { return 0xFFFFFFFF; /* SK_ColorWHI
TE */ } | 213 virtual WebColor backgroundColor() const { return 0xFFFFFFFF; /* SK_ColorWHI
TE */ } |
| 229 | 214 |
| 230 protected: | 215 protected: |
| 231 ~WebWidget() { } | 216 ~WebWidget() { } |
| 232 }; | 217 }; |
| 233 | 218 |
| 234 } // namespace blink | 219 } // namespace blink |
| 235 | 220 |
| 236 #endif // SKY_ENGINE_PUBLIC_WEB_WEBWIDGET_H_ | 221 #endif // SKY_ENGINE_PUBLIC_WEB_WEBWIDGET_H_ |
| OLD | NEW |