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

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

Issue 2012823003: Move IME related functions from WebFrame to WebLocalFrame (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add CHECK in TextInputController::HasMarkedText() Created 4 years, 5 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 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 // FIXME: stopLoading does not yet cancel an associated loader!! 395 // FIXME: stopLoading does not yet cancel an associated loader!!
396 virtual WebURLLoader* createAssociatedURLLoader(const WebURLLoaderOptions& = WebURLLoaderOptions()) = 0; 396 virtual WebURLLoader* createAssociatedURLLoader(const WebURLLoaderOptions& = WebURLLoaderOptions()) = 0;
397 397
398 // Returns the number of registered unload listeners. 398 // Returns the number of registered unload listeners.
399 virtual unsigned unloadListenerCount() const = 0; 399 virtual unsigned unloadListenerCount() const = 0;
400 400
401 // Will return true if between didStartLoading and didStopLoading notificati ons. 401 // Will return true if between didStartLoading and didStopLoading notificati ons.
402 virtual bool isLoading() const; 402 virtual bool isLoading() const;
403 403
404 404
405 // Editing -------------------------------------------------------------
406
407 virtual void insertText(const WebString& text) = 0;
408
409 virtual void setMarkedText(const WebString& text, unsigned location, unsigne d length) = 0;
410 virtual void unmarkText() = 0;
411 virtual bool hasMarkedText() const = 0;
412
413 virtual WebRange markedRange() const = 0;
414
415 // Returns the text range rectangle in the viepwort coordinate space.
416 virtual bool firstRectForCharacterRange(unsigned location, unsigned length, WebRect&) const = 0;
417
418 // Returns the index of a character in the Frame's text stream at the given
419 // point. The point is in the viewport coordinate space. Will return
420 // WTF::notFound if the point is invalid.
421 virtual size_t characterIndexForPoint(const WebPoint&) const = 0;
422
423 // Supports commands like Undo, Redo, Cut, Copy, Paste, SelectAll,
424 // Unselect, etc. See EditorCommand.cpp for the full list of supported
425 // commands.
426 virtual bool executeCommand(const WebString&) = 0;
427 virtual bool executeCommand(const WebString&, const WebString& value) = 0;
428 virtual bool isCommandEnabled(const WebString&) const = 0;
429
430 // Spell-checking support.
431 virtual void enableContinuousSpellChecking(bool) = 0;
432 virtual bool isContinuousSpellCheckingEnabled() const = 0;
433 virtual void requestTextChecking(const WebElement&) = 0;
434 virtual void removeSpellingMarkers() = 0;
435
436 // Selection -----------------------------------------------------------
437
438 virtual bool hasSelection() const = 0;
439
440 virtual WebRange selectionRange() const = 0;
441
442 virtual WebString selectionAsText() const = 0;
443 virtual WebString selectionAsMarkup() const = 0;
444
445 // Expands the selection to a word around the caret and returns
446 // true. Does nothing and returns false if there is no caret or
447 // there is ranged selection.
448 virtual bool selectWordAroundCaret() = 0;
449
450 // DEPRECATED: Use moveRangeSelection.
451 virtual void selectRange(const WebPoint& base, const WebPoint& extent) = 0;
452
453 virtual void selectRange(const WebRange&) = 0;
454
455 // Move the current selection to the provided viewport point/points. If the
456 // current selection is editable, the new selection will be restricted to
457 // the root editable element.
458 // |TextGranularity| represents character wrapping granularity. If
459 // WordGranularity is set, WebFrame extends selection to wrap word.
460 virtual void moveRangeSelection(const WebPoint& base, const WebPoint& extent , WebFrame::TextGranularity = CharacterGranularity) = 0;
461 virtual void moveCaretSelection(const WebPoint&) = 0;
462
463 virtual bool setEditableSelectionOffsets(int start, int end) = 0;
464 virtual bool setCompositionFromExistingText(int compositionStart, int compos itionEnd, const WebVector<WebCompositionUnderline>& underlines) = 0;
465 virtual void extendSelectionAndDelete(int before, int after) = 0;
466
467 virtual void setCaretVisible(bool) = 0;
468
469 // Printing ------------------------------------------------------------ 405 // Printing ------------------------------------------------------------
470 406
471 // Reformats the WebFrame for printing. WebPrintParams specifies the printab le 407 // Reformats the WebFrame for printing. WebPrintParams specifies the printab le
472 // content size, paper size, printable area size, printer DPI and print 408 // content size, paper size, printable area size, printer DPI and print
473 // scaling option. If constrainToNode node is specified, then only the given node 409 // scaling option. If constrainToNode node is specified, then only the given node
474 // is printed (for now only plugins are supported), instead of the entire fr ame. 410 // is printed (for now only plugins are supported), instead of the entire fr ame.
475 // Returns the number of pages that can be printed at the given 411 // Returns the number of pages that can be printed at the given
476 // page size. 412 // page size.
477 virtual int printBegin(const WebPrintParams&, const WebNode& constrainToNode = WebNode()) = 0; 413 virtual int printBegin(const WebPrintParams&, const WebNode& constrainToNode = WebNode()) = 0;
478 414
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
579 WebFrame* m_firstChild; 515 WebFrame* m_firstChild;
580 WebFrame* m_lastChild; 516 WebFrame* m_lastChild;
581 517
582 WebFrame* m_opener; 518 WebFrame* m_opener;
583 WebPrivateOwnPtr<OpenedFrameTracker> m_openedFrameTracker; 519 WebPrivateOwnPtr<OpenedFrameTracker> m_openedFrameTracker;
584 }; 520 };
585 521
586 } // namespace blink 522 } // namespace blink
587 523
588 #endif 524 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/tests/WebViewTest.cpp ('k') | third_party/WebKit/public/web/WebLocalFrame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698