Chromium Code Reviews| 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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 194 // Focus --------------------------------------------------------------- | 194 // Focus --------------------------------------------------------------- |
| 195 | 195 |
| 196 virtual WebLocalFrame* focusedFrame() = 0; | 196 virtual WebLocalFrame* focusedFrame() = 0; |
| 197 virtual void setFocusedFrame(WebFrame*) = 0; | 197 virtual void setFocusedFrame(WebFrame*) = 0; |
| 198 | 198 |
| 199 // Sets the provided frame as focused and fires blur/focus events on any | 199 // Sets the provided frame as focused and fires blur/focus events on any |
| 200 // currently focused elements in old/new focused documents. Note that this | 200 // currently focused elements in old/new focused documents. Note that this |
| 201 // is different from setFocusedFrame, which does not fire events on focused | 201 // is different from setFocusedFrame, which does not fire events on focused |
| 202 // elements. | 202 // elements. |
| 203 virtual void focusDocumentView(WebFrame*) = 0; | 203 virtual void focusDocumentView(WebFrame*) = 0; |
| 204 virtual void unfocusDocumentView(WebFrame*) = 0; | |
|
dcheng
2016/07/27 05:13:19
Please add a comment and describe what the argumen
| |
| 204 | 205 |
| 205 // Focus the first (last if reverse is true) focusable node. | 206 // Focus the first (last if reverse is true) focusable node. |
| 206 virtual void setInitialFocus(bool reverse) = 0; | 207 virtual void setInitialFocus(bool reverse) = 0; |
| 207 | 208 |
| 208 // Clears the focused element (and selection if a text field is focused) | 209 // 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 | 210 // to ensure that a text field on the page is not eating keystrokes we |
| 210 // send it. | 211 // send it. |
| 211 virtual void clearFocusedElement() = 0; | 212 virtual void clearFocusedElement() = 0; |
| 212 | 213 |
| 213 // If it is editable, scrolls the element currently in focus into |rect|, | 214 // If it is editable, scrolls the element currently in focus into |rect|, |
| (...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 527 // completed. | 528 // completed. |
| 528 WebWidget* widget() { return this; } | 529 WebWidget* widget() { return this; } |
| 529 | 530 |
| 530 protected: | 531 protected: |
| 531 ~WebView() {} | 532 ~WebView() {} |
| 532 }; | 533 }; |
| 533 | 534 |
| 534 } // namespace blink | 535 } // namespace blink |
| 535 | 536 |
| 536 #endif | 537 #endif |
| OLD | NEW |