Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008 Apple 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 15 matching lines...) Expand all Loading... | |
| 26 #ifndef InputMethodController_h | 26 #ifndef InputMethodController_h |
| 27 #define InputMethodController_h | 27 #define InputMethodController_h |
| 28 | 28 |
| 29 #include "core/CoreExport.h" | 29 #include "core/CoreExport.h" |
| 30 #include "core/dom/Range.h" | 30 #include "core/dom/Range.h" |
| 31 #include "core/editing/CompositionUnderline.h" | 31 #include "core/editing/CompositionUnderline.h" |
| 32 #include "core/editing/EphemeralRange.h" | 32 #include "core/editing/EphemeralRange.h" |
| 33 #include "core/editing/FrameSelection.h" | 33 #include "core/editing/FrameSelection.h" |
| 34 #include "core/editing/PlainTextRange.h" | 34 #include "core/editing/PlainTextRange.h" |
| 35 #include "platform/heap/Handle.h" | 35 #include "platform/heap/Handle.h" |
| 36 #include "public/platform/WebTextInputInfo.h" | |
| 37 #include "public/platform/WebTextInputType.h" | |
| 36 #include "wtf/Vector.h" | 38 #include "wtf/Vector.h" |
| 37 | 39 |
| 38 namespace blink { | 40 namespace blink { |
| 39 | 41 |
| 40 class Editor; | 42 class Editor; |
| 41 class LocalFrame; | 43 class LocalFrame; |
| 42 class Range; | 44 class Range; |
| 43 class Text; | 45 class Text; |
| 44 | 46 |
| 45 class CORE_EXPORT InputMethodController final | 47 class CORE_EXPORT InputMethodController final |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 87 | 89 |
| 88 PlainTextRange getSelectionOffsets() const; | 90 PlainTextRange getSelectionOffsets() const; |
| 89 // Returns true if setting selection to specified offsets, otherwise false. | 91 // Returns true if setting selection to specified offsets, otherwise false. |
| 90 bool setEditableSelectionOffsets( | 92 bool setEditableSelectionOffsets( |
| 91 const PlainTextRange&, | 93 const PlainTextRange&, |
| 92 FrameSelection::SetSelectionOptions = FrameSelection::CloseTyping); | 94 FrameSelection::SetSelectionOptions = FrameSelection::CloseTyping); |
| 93 void extendSelectionAndDelete(int before, int after); | 95 void extendSelectionAndDelete(int before, int after); |
| 94 PlainTextRange createRangeForSelection(int start, | 96 PlainTextRange createRangeForSelection(int start, |
| 95 int end, | 97 int end, |
| 96 size_t textLength) const; | 98 size_t textLength) const; |
| 99 WebTextInputInfo textInputInfo() const; | |
| 100 WebTextInputType textInputType() const; | |
| 97 | 101 |
| 98 private: | 102 private: |
| 99 Member<LocalFrame> m_frame; | 103 Member<LocalFrame> m_frame; |
| 100 Member<Range> m_compositionRange; | 104 Member<Range> m_compositionRange; |
| 101 bool m_isDirty; | 105 bool m_isDirty; |
| 102 bool m_hasComposition; | 106 bool m_hasComposition; |
| 103 | 107 |
| 104 explicit InputMethodController(LocalFrame&); | 108 explicit InputMethodController(LocalFrame&); |
| 105 | 109 |
| 106 Editor& editor() const; | 110 Editor& editor() const; |
| (...skipping 21 matching lines...) Expand all Loading... | |
| 128 // Returns true if moved caret successfully. | 132 // Returns true if moved caret successfully. |
| 129 bool moveCaret(int newCaretPosition); | 133 bool moveCaret(int newCaretPosition); |
| 130 | 134 |
| 131 PlainTextRange createSelectionRangeForSetComposition(int selectionStart, | 135 PlainTextRange createSelectionRangeForSetComposition(int selectionStart, |
| 132 int selectionEnd, | 136 int selectionEnd, |
| 133 size_t textLength) const; | 137 size_t textLength) const; |
| 134 void setCompositionWithIncrementalText(const String&, | 138 void setCompositionWithIncrementalText(const String&, |
| 135 const Vector<CompositionUnderline>&, | 139 const Vector<CompositionUnderline>&, |
| 136 int selectionStart, | 140 int selectionStart, |
| 137 int selectionEnd); | 141 int selectionEnd); |
| 142 int textInputFlags() const; | |
| 143 // TODO(dtapuska): Change this from a WebString to a WebTextInputMode. | |
| 144 WebString inputModeOfFocusedElement() const; | |
|
esprehn
2016/10/14 16:49:35
No WebString inside core, just use String.
dtapuska
2016/10/14 17:21:28
Done.
| |
| 138 }; | 145 }; |
| 139 | 146 |
| 140 } // namespace blink | 147 } // namespace blink |
| 141 | 148 |
| 142 #endif // InputMethodController_h | 149 #endif // InputMethodController_h |
| OLD | NEW |