Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(29)

Side by Side Diff: third_party/WebKit/public/web/WebWidget.h

Issue 2388103002: reflow comments in public/web (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 98
99 // Similar to paint() but ignores compositing decisions, squashing all 99 // Similar to paint() but ignores compositing decisions, squashing all
100 // contents of the WebWidget into the output given to the WebCanvas. 100 // contents of the WebWidget into the output given to the WebCanvas.
101 virtual void paintIgnoringCompositing(WebCanvas*, const WebRect&) {} 101 virtual void paintIgnoringCompositing(WebCanvas*, const WebRect&) {}
102 102
103 // Run layout and paint of all pending document changes asynchronously. 103 // Run layout and paint of all pending document changes asynchronously.
104 // The caller is resposible for keeping the WebLayoutAndPaintAsyncCallback 104 // The caller is resposible for keeping the WebLayoutAndPaintAsyncCallback
105 // object alive until it is called. 105 // object alive until it is called.
106 virtual void layoutAndPaintAsync(WebLayoutAndPaintAsyncCallback*) {} 106 virtual void layoutAndPaintAsync(WebLayoutAndPaintAsyncCallback*) {}
107 107
108 // The caller is responsible for keeping the WebCompositeAndReadbackAsyncCallb ack 108 // The caller is responsible for keeping the
109 // object alive until it is called. This should only be called when 109 // WebCompositeAndReadbackAsyncCallback object alive until it is called. This
110 // isAcceleratedCompositingActive() is true. 110 // should only be called when isAcceleratedCompositingActive() is true.
111 virtual void compositeAndReadbackAsync( 111 virtual void compositeAndReadbackAsync(
112 WebCompositeAndReadbackAsyncCallback*) {} 112 WebCompositeAndReadbackAsyncCallback*) {}
113 113
114 // Called to inform the WebWidget of a change in theme. 114 // Called to inform the WebWidget of a change in theme.
115 // Implementors that cache rendered copies of widgets need to re-render 115 // Implementors that cache rendered copies of widgets need to re-render
116 // on receiving this message 116 // on receiving this message
117 virtual void themeChanged() {} 117 virtual void themeChanged() {}
118 118
119 // Called to inform the WebWidget of an input event. 119 // Called to inform the WebWidget of an input event.
120 virtual WebInputEventResult handleInputEvent(const WebInputEvent&) { 120 virtual WebInputEventResult handleInputEvent(const WebInputEvent&) {
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 184
185 // Returns the type of current text input of this WebWidget. 185 // Returns the type of current text input of this WebWidget.
186 virtual WebTextInputType textInputType() { return WebTextInputTypeNone; } 186 virtual WebTextInputType textInputType() { return WebTextInputTypeNone; }
187 187
188 // Returns the anchor and focus bounds of the current selection. 188 // Returns the anchor and focus bounds of the current selection.
189 // If the selection range is empty, it returns the caret bounds. 189 // If the selection range is empty, it returns the caret bounds.
190 virtual bool selectionBounds(WebRect& anchor, WebRect& focus) const { 190 virtual bool selectionBounds(WebRect& anchor, WebRect& focus) const {
191 return false; 191 return false;
192 } 192 }
193 193
194 // Returns the text direction at the start and end bounds of the current selec tion. 194 // Returns the text direction at the start and end bounds of the current
195 // If the selection range is empty, it returns false. 195 // selection. If the selection range is empty, it returns false.
196 virtual bool selectionTextDirection(WebTextDirection& start, 196 virtual bool selectionTextDirection(WebTextDirection& start,
197 WebTextDirection& end) const { 197 WebTextDirection& end) const {
198 return false; 198 return false;
199 } 199 }
200 200
201 // Returns true if the selection range is nonempty and its anchor is first 201 // Returns true if the selection range is nonempty and its anchor is first
202 // (i.e its anchor is its start). 202 // (i.e its anchor is its start).
203 virtual bool isSelectionAnchorFirst() const { return false; } 203 virtual bool isSelectionAnchorFirst() const { return false; }
204 204
205 // Fetch the current selection range of this WebWidget. 205 // Fetch the current selection range of this WebWidget.
206 virtual WebRange caretOrSelectionRange() { return WebRange(); } 206 virtual WebRange caretOrSelectionRange() { return WebRange(); }
207 207
208 // Changes the text direction of the selected input node. 208 // Changes the text direction of the selected input node.
209 virtual void setTextDirection(WebTextDirection) {} 209 virtual void setTextDirection(WebTextDirection) {}
210 210
211 // Returns true if the WebWidget uses GPU accelerated compositing 211 // Returns true if the WebWidget uses GPU accelerated compositing
212 // to render its contents. 212 // to render its contents.
213 virtual bool isAcceleratedCompositingActive() const { return false; } 213 virtual bool isAcceleratedCompositingActive() const { return false; }
214 214
215 // Returns true if the WebWidget created is of type WebView. 215 // Returns true if the WebWidget created is of type WebView.
216 virtual bool isWebView() const { return false; } 216 virtual bool isWebView() const { return false; }
217 217
218 // Returns true if the WebWidget created is of type WebFrameWidget. 218 // Returns true if the WebWidget created is of type WebFrameWidget.
219 virtual bool isWebFrameWidget() const { return false; } 219 virtual bool isWebFrameWidget() const { return false; }
220 220
221 // Returns true if the WebWidget created is of type WebPagePopup. 221 // Returns true if the WebWidget created is of type WebPagePopup.
222 virtual bool isPagePopup() const { return false; } 222 virtual bool isPagePopup() const { return false; }
223 223
224 // The WebLayerTreeView initialized on this WebWidgetClient will be going away and 224 // The WebLayerTreeView initialized on this WebWidgetClient will be going away
225 // is no longer safe to access. 225 // and is no longer safe to access.
226 virtual void willCloseLayerTreeView() {} 226 virtual void willCloseLayerTreeView() {}
227 227
228 // Calling WebWidgetClient::requestPointerLock() will result in one 228 // Calling WebWidgetClient::requestPointerLock() will result in one
229 // return call to didAcquirePointerLock() or didNotAcquirePointerLock(). 229 // return call to didAcquirePointerLock() or didNotAcquirePointerLock().
230 virtual void didAcquirePointerLock() {} 230 virtual void didAcquirePointerLock() {}
231 virtual void didNotAcquirePointerLock() {} 231 virtual void didNotAcquirePointerLock() {}
232 232
233 // Pointer lock was held, but has been lost. This may be due to a 233 // Pointer lock was held, but has been lost. This may be due to a
234 // request via WebWidgetClient::requestPointerUnlock(), or for other 234 // request via WebWidgetClient::requestPointerUnlock(), or for other
235 // reasons such as the user exiting lock, window focus changing, etc. 235 // reasons such as the user exiting lock, window focus changing, etc.
(...skipping 21 matching lines...) Expand all
257 WebTopControlsState current, 257 WebTopControlsState current,
258 bool animate) {} 258 bool animate) {}
259 259
260 // Populate |bounds| with the composition character bounds for the ongoing 260 // Populate |bounds| with the composition character bounds for the ongoing
261 // composition. Returns false if there is no focused input or any ongoing 261 // composition. Returns false if there is no focused input or any ongoing
262 // composition. 262 // composition.
263 virtual bool getCompositionCharacterBounds(WebVector<WebRect>& bounds) { 263 virtual bool getCompositionCharacterBounds(WebVector<WebRect>& bounds) {
264 return false; 264 return false;
265 } 265 }
266 266
267 // Applies the range on the focused frame so that the text will later be repla ced. 267 // Applies the range on the focused frame so that the text will later be
268 // replaced.
268 virtual void applyReplacementRange(const WebRange&) {} 269 virtual void applyReplacementRange(const WebRange&) {}
269 270
270 protected: 271 protected:
271 ~WebWidget() {} 272 ~WebWidget() {}
272 }; 273 };
273 274
274 } // namespace blink 275 } // namespace blink
275 276
276 #endif 277 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/public/web/WebViewClient.h ('k') | third_party/WebKit/public/web/WebWidgetClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698