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

Unified Diff: third_party/WebKit/Source/core/editing/commands/TypingCommand.h

Issue 2574793002: [Editing] Store |CommandSource| in |CompositeEditCommand| (Closed)
Patch Set: Created 4 years 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/editing/commands/TypingCommand.h
diff --git a/third_party/WebKit/Source/core/editing/commands/TypingCommand.h b/third_party/WebKit/Source/core/editing/commands/TypingCommand.h
index a21fa5177dcd6d12499e2e05e337499d259e7812..2dd8ee3158a23432da62f7d87525205718f92a10 100644
--- a/third_party/WebKit/Source/core/editing/commands/TypingCommand.h
+++ b/third_party/WebKit/Source/core/editing/commands/TypingCommand.h
@@ -58,26 +58,30 @@ class CORE_EXPORT TypingCommand final : public CompositeEditCommand {
};
typedef unsigned Options;
- static void deleteSelection(Document&, Options = 0);
+ static void deleteSelection(Document&, CommandSource, Options = 0);
static void deleteKeyPressed(Document&,
+ CommandSource,
Options,
TextGranularity = CharacterGranularity);
static void forwardDeleteKeyPressed(Document&,
+ CommandSource,
EditingState*,
Options = 0,
TextGranularity = CharacterGranularity);
static void insertText(Document&,
+ CommandSource,
const String&,
Options,
TextCompositionType = TextCompositionNone);
static void insertText(Document&,
+ CommandSource,
const String&,
const VisibleSelection&,
Options,
TextCompositionType = TextCompositionNone);
- static bool insertLineBreak(Document&);
- static bool insertParagraphSeparator(Document&);
- static bool insertParagraphSeparatorInQuotedContent(Document&);
+ static bool insertLineBreak(Document&, CommandSource);
+ static bool insertParagraphSeparator(Document&, CommandSource);
+ static bool insertParagraphSeparatorInQuotedContent(Document&, CommandSource);
static void closeTyping(LocalFrame*);
void insertText(const String& text, bool selectInsertedText, EditingState*);
@@ -103,24 +107,27 @@ class CORE_EXPORT TypingCommand final : public CompositeEditCommand {
private:
static TypingCommand* create(
Document& document,
+ CommandSource source,
ETypingCommand command,
const String& text = "",
Options options = 0,
TextGranularity granularity = CharacterGranularity) {
- return new TypingCommand(document, command, text, options, granularity,
- TextCompositionNone);
+ return new TypingCommand(document, source, command, text, options,
+ granularity, TextCompositionNone);
}
static TypingCommand* create(Document& document,
+ CommandSource source,
ETypingCommand command,
const String& text,
Options options,
TextCompositionType compositionType) {
- return new TypingCommand(document, command, text, options,
+ return new TypingCommand(document, source, command, text, options,
CharacterGranularity, compositionType);
}
TypingCommand(Document&,
+ CommandSource,
ETypingCommand,
const String& text,
Options,

Powered by Google App Engine
This is Rietveld 408576698