OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009, 2010, 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2009, 2010, 2011, 2012 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 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 virtual void focusDocumentView(WebFrame*) = 0; | 203 virtual void focusDocumentView(WebFrame*) = 0; |
204 | 204 |
205 // Focus the first (last if reverse is true) focusable node. | 205 // Focus the first (last if reverse is true) focusable node. |
206 virtual void setInitialFocus(bool reverse) = 0; | 206 virtual void setInitialFocus(bool reverse) = 0; |
207 | 207 |
208 // Clears the focused element (and selection if a text field is focused) | 208 // Clears the focused element (and selection if a text field is focused) |
209 // to ensure that a text field on the page is not eating keystrokes we | 209 // to ensure that a text field on the page is not eating keystrokes we |
210 // send it. | 210 // send it. |
211 virtual void clearFocusedElement() = 0; | 211 virtual void clearFocusedElement() = 0; |
212 | 212 |
213 // Scrolls the node currently in focus into |rect|, where |rect| is in | 213 // If it is editable, scrolls the element currently in focus into |rect|, |
214 // viewport space. Returns true if an animation was started. | 214 // where |rect| is in viewport space. |willAnmiate| is set true if an |
215 virtual bool scrollFocusedNodeIntoRect(const WebRect&) { return false; } | 215 // animation was started. |
| 216 // Returns false if there is currently no currently focused element. |
| 217 virtual bool scrollFocusedEditableElementIntoRect(const WebRect&, bool& will
Animate) { return false; } |
216 | 218 |
217 // Smooth scroll the root layer to |targetX|, |targetY| in |durationMs|. | 219 // Smooth scroll the root layer to |targetX|, |targetY| in |durationMs|. |
218 virtual void smoothScroll(int targetX, int targetY, long durationMs) { } | 220 virtual void smoothScroll(int targetX, int targetY, long durationMs) { } |
219 | 221 |
220 // Advance the focus of the WebView forward to the next element or to the | 222 // Advance the focus of the WebView forward to the next element or to the |
221 // previous element in the tab sequence (if reverse is true). | 223 // previous element in the tab sequence (if reverse is true). |
222 virtual void advanceFocus(bool reverse) { } | 224 virtual void advanceFocus(bool reverse) { } |
223 | 225 |
224 // Advance the focus from the frame |from| to the next in sequence | 226 // Advance the focus from the frame |from| to the next in sequence |
225 // (determined by WebFocusType) focusable element in frame |to|. Used when | 227 // (determined by WebFocusType) focusable element in frame |to|. Used when |
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
533 // completed. | 535 // completed. |
534 WebWidget* widget() { return this; } | 536 WebWidget* widget() { return this; } |
535 | 537 |
536 protected: | 538 protected: |
537 ~WebView() {} | 539 ~WebView() {} |
538 }; | 540 }; |
539 | 541 |
540 } // namespace blink | 542 } // namespace blink |
541 | 543 |
542 #endif | 544 #endif |
OLD | NEW |