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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 class WebPerformance; | 60 class WebPerformance; |
61 class WebRange; | 61 class WebRange; |
62 class WebSecurityOrigin; | 62 class WebSecurityOrigin; |
63 class WebString; | 63 class WebString; |
64 class WebURL; | 64 class WebURL; |
65 class WebURLLoader; | 65 class WebURLLoader; |
66 class WebURLRequest; | 66 class WebURLRequest; |
67 class WebView; | 67 class WebView; |
68 struct WebConsoleMessage; | 68 struct WebConsoleMessage; |
69 struct WebFindOptions; | 69 struct WebFindOptions; |
| 70 struct WebPoint; |
70 struct WebRect; | 71 struct WebRect; |
71 struct WebScriptSource; | 72 struct WebScriptSource; |
72 struct WebSize; | 73 struct WebSize; |
73 template <typename T> class WebVector; | 74 template <typename T> class WebVector; |
74 | 75 |
75 // FIXME(jam): take this out once Chromium has this | 76 // FIXME(jam): take this out once Chromium has this |
76 #define WEBFRAME_PRINTBEGIN_TAKES_NODE | 77 #define WEBFRAME_PRINTBEGIN_TAKES_NODE |
77 | 78 |
78 class WebFrame { | 79 class WebFrame { |
79 public: | 80 public: |
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
363 virtual void replaceSelection(const WebString& text) = 0; | 364 virtual void replaceSelection(const WebString& text) = 0; |
364 | 365 |
365 virtual void insertText(const WebString& text) = 0; | 366 virtual void insertText(const WebString& text) = 0; |
366 | 367 |
367 virtual void setMarkedText(const WebString& text, unsigned location, unsigne
d length) = 0; | 368 virtual void setMarkedText(const WebString& text, unsigned location, unsigne
d length) = 0; |
368 virtual void unmarkText() = 0; | 369 virtual void unmarkText() = 0; |
369 virtual bool hasMarkedText() const = 0; | 370 virtual bool hasMarkedText() const = 0; |
370 | 371 |
371 virtual WebRange markedRange() const = 0; | 372 virtual WebRange markedRange() const = 0; |
372 | 373 |
| 374 // Returns the frame rectangle in window coordinate space of the given text |
| 375 // range. |
373 virtual bool firstRectForCharacterRange(unsigned location, unsigned length,
WebRect&) const = 0; | 376 virtual bool firstRectForCharacterRange(unsigned location, unsigned length,
WebRect&) const = 0; |
374 | 377 |
| 378 // Returns the index of a character in the Frame's text stream at the given |
| 379 // point. The point is in the window coordinate space. Will return |
| 380 // WTF::notFound if the point is invalid. |
| 381 virtual unsigned characterIndexForPoint(const WebPoint& point) const = 0; |
| 382 |
375 // Supports commands like Undo, Redo, Cut, Copy, Paste, SelectAll, | 383 // Supports commands like Undo, Redo, Cut, Copy, Paste, SelectAll, |
376 // Unselect, etc. See EditorCommand.cpp for the full list of supported | 384 // Unselect, etc. See EditorCommand.cpp for the full list of supported |
377 // commands. | 385 // commands. |
378 virtual bool executeCommand(const WebString&) = 0; | 386 virtual bool executeCommand(const WebString&) = 0; |
379 virtual bool executeCommand(const WebString&, const WebString& value) = 0; | 387 virtual bool executeCommand(const WebString&, const WebString& value) = 0; |
380 virtual bool isCommandEnabled(const WebString&) const = 0; | 388 virtual bool isCommandEnabled(const WebString&) const = 0; |
381 | 389 |
382 // Spell-checking support. | 390 // Spell-checking support. |
383 virtual void enableContinuousSpellChecking(bool) = 0; | 391 virtual void enableContinuousSpellChecking(bool) = 0; |
384 virtual bool isContinuousSpellCheckingEnabled() const = 0; | 392 virtual bool isContinuousSpellCheckingEnabled() const = 0; |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
571 // text form. This is used only by layout tests. | 579 // text form. This is used only by layout tests. |
572 virtual WebString layerTreeAsText() const = 0; | 580 virtual WebString layerTreeAsText() const = 0; |
573 | 581 |
574 protected: | 582 protected: |
575 ~WebFrame() { } | 583 ~WebFrame() { } |
576 }; | 584 }; |
577 | 585 |
578 } // namespace WebKit | 586 } // namespace WebKit |
579 | 587 |
580 #endif | 588 #endif |
OLD | NEW |