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

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

Issue 2012823003: Move IME related functions from WebFrame to WebLocalFrame (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sync Created 4 years, 6 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef WebLocalFrame_h 5 #ifndef WebLocalFrame_h
6 #define WebLocalFrame_h 6 #define WebLocalFrame_h
7 7
8 #include "WebFrame.h" 8 #include "WebFrame.h"
9 #include "WebFrameLoadType.h" 9 #include "WebFrameLoadType.h"
10 10
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 165
166 // Run the task when the context of the current page is not suspended 166 // Run the task when the context of the current page is not suspended
167 // otherwise run it on context resumed. 167 // otherwise run it on context resumed.
168 // Method takes ownership of the passed task. 168 // Method takes ownership of the passed task.
169 virtual void requestRunTask(WebSuspendableTask*) const = 0; 169 virtual void requestRunTask(WebSuspendableTask*) const = 0;
170 170
171 // Associates an isolated world with human-readable name which is useful for 171 // Associates an isolated world with human-readable name which is useful for
172 // extension debugging. 172 // extension debugging.
173 virtual void setIsolatedWorldHumanReadableName(int worldID, const WebString& ) = 0; 173 virtual void setIsolatedWorldHumanReadableName(int worldID, const WebString& ) = 0;
174 174
175 // Editing -------------------------------------------------------------
175 176
176 // Selection -------------------------------------------------------------- 177 virtual void insertText(const WebString& text) = 0;
178
179 virtual void setMarkedText(const WebString& text, unsigned location, unsigne d length) = 0;
180 virtual void unmarkText() = 0;
181 virtual bool hasMarkedText() const = 0;
182
183 virtual WebRange markedRange() const = 0;
184
185 // Returns the text range rectangle in the viepwort coordinate space.
186 virtual bool firstRectForCharacterRange(unsigned location, unsigned length, WebRect&) const = 0;
187
188 // Returns the index of a character in the Frame's text stream at the given
189 // point. The point is in the viewport coordinate space. Will return
190 // WTF::notFound if the point is invalid.
191 virtual size_t characterIndexForPoint(const WebPoint&) const = 0;
192
193 // Supports commands like Undo, Redo, Cut, Copy, Paste, SelectAll,
194 // Unselect, etc. See EditorCommand.cpp for the full list of supported
195 // commands.
196 virtual bool executeCommand(const WebString&) = 0;
197 virtual bool executeCommand(const WebString&, const WebString& value) = 0;
198 virtual bool isCommandEnabled(const WebString&) const = 0;
199
200 // Selection -----------------------------------------------------------
201
202 virtual bool hasSelection() const = 0;
203
204 virtual WebRange selectionRange() const = 0;
205
206 virtual WebString selectionAsText() const = 0;
207 virtual WebString selectionAsMarkup() const = 0;
208
209 // Expands the selection to a word around the caret and returns
210 // true. Does nothing and returns false if there is no caret or
211 // there is ranged selection.
212 virtual bool selectWordAroundCaret() = 0;
213
214 // DEPRECATED: Use moveRangeSelection.
215 virtual void selectRange(const WebPoint& base, const WebPoint& extent) = 0;
216
217 virtual void selectRange(const WebRange&) = 0;
218
219 // Move the current selection to the provided viewport point/points. If the
220 // current selection is editable, the new selection will be restricted to
221 // the root editable element.
222 // |TextGranularity| represents character wrapping granularity. If
223 // WordGranularity is set, WebFrame extends selection to wrap word.
224 virtual void moveRangeSelection(const WebPoint& base, const WebPoint& extent , WebFrame::TextGranularity = CharacterGranularity) = 0;
225 virtual void moveCaretSelection(const WebPoint&) = 0;
226
227 virtual bool setEditableSelectionOffsets(int start, int end) = 0;
228 virtual bool setCompositionFromExistingText(int compositionStart, int compos itionEnd, const WebVector<WebCompositionUnderline>& underlines) = 0;
229 virtual void extendSelectionAndDelete(int before, int after) = 0;
230
231 virtual void setCaretVisible(bool) = 0;
177 232
178 // Moves the selection extent point. This function does not allow the 233 // Moves the selection extent point. This function does not allow the
179 // selection to collapse. If the new extent is set to the same position as 234 // selection to collapse. If the new extent is set to the same position as
180 // the current base, this function will do nothing. 235 // the current base, this function will do nothing.
181 virtual void moveRangeSelectionExtent(const WebPoint&) = 0; 236 virtual void moveRangeSelectionExtent(const WebPoint&) = 0;
182 // Replaces the selection with the input string. 237 // Replaces the selection with the input string.
183 virtual void replaceSelection(const WebString&) = 0; 238 virtual void replaceSelection(const WebString&) = 0;
184 239
185 // Spell-checking support ------------------------------------------------- 240 // Spell-checking support -------------------------------------------------
186 virtual void replaceMisspelledRange(const WebString&) = 0; 241 virtual void replaceMisspelledRange(const WebString&) = 0;
242 virtual void enableContinuousSpellChecking(bool) = 0;
243 virtual bool isContinuousSpellCheckingEnabled() const = 0;
244 virtual void requestTextChecking(const WebElement&) = 0;
245 virtual void removeSpellingMarkers() = 0;
187 246
188 // Content Settings ------------------------------------------------------- 247 // Content Settings -------------------------------------------------------
189 248
190 virtual void setContentSettingsClient(WebContentSettingsClient*) = 0; 249 virtual void setContentSettingsClient(WebContentSettingsClient*) = 0;
191 250
192 // App banner ------------------------------------------------------------- 251 // App banner -------------------------------------------------------------
193 252
194 // Request to show an application install banner for the given |platforms|. 253 // Request to show an application install banner for the given |platforms|.
195 // The implementation can request the embedder to cancel the call by setting 254 // The implementation can request the embedder to cancel the call by setting
196 // |cancel| to true. 255 // |cancel| to true.
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 // to call these on a WebLocalFrame. 401 // to call these on a WebLocalFrame.
343 bool isWebLocalFrame() const override = 0; 402 bool isWebLocalFrame() const override = 0;
344 WebLocalFrame* toWebLocalFrame() override = 0; 403 WebLocalFrame* toWebLocalFrame() override = 0;
345 bool isWebRemoteFrame() const override = 0; 404 bool isWebRemoteFrame() const override = 0;
346 WebRemoteFrame* toWebRemoteFrame() override = 0; 405 WebRemoteFrame* toWebRemoteFrame() override = 0;
347 }; 406 };
348 407
349 } // namespace blink 408 } // namespace blink
350 409
351 #endif // WebLocalFrame_h 410 #endif // WebLocalFrame_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698