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. |
215 virtual bool scrollFocusedNodeIntoRect(const WebRect&) { return false; } | 215 // Returns false if there is currently no currently focused element. |
| 216 virtual bool scrollFocusedEditableElementIntoRect(const WebRect&) { return f
alse; } |
216 | 217 |
217 // Smooth scroll the root layer to |targetX|, |targetY| in |durationMs|. | 218 // Smooth scroll the root layer to |targetX|, |targetY| in |durationMs|. |
218 virtual void smoothScroll(int targetX, int targetY, long durationMs) { } | 219 virtual void smoothScroll(int targetX, int targetY, long durationMs) { } |
219 | 220 |
220 // Advance the focus of the WebView forward to the next element or to the | 221 // 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). | 222 // previous element in the tab sequence (if reverse is true). |
222 virtual void advanceFocus(bool reverse) { } | 223 virtual void advanceFocus(bool reverse) { } |
223 | 224 |
224 // Advance the focus from the frame |from| to the next in sequence | 225 // Advance the focus from the frame |from| to the next in sequence |
225 // (determined by WebFocusType) focusable element in frame |to|. Used when | 226 // (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. | 534 // completed. |
534 WebWidget* widget() { return this; } | 535 WebWidget* widget() { return this; } |
535 | 536 |
536 protected: | 537 protected: |
537 ~WebView() {} | 538 ~WebView() {} |
538 }; | 539 }; |
539 | 540 |
540 } // namespace blink | 541 } // namespace blink |
541 | 542 |
542 #endif | 543 #endif |
OLD | NEW |