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

Unified Diff: Source/core/editing/TypingCommand.h

Issue 23822003: Have EditCommand classes deal with Document references, not pointers (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/editing/TextInsertionBaseCommand.cpp ('k') | Source/core/editing/TypingCommand.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/TypingCommand.h
diff --git a/Source/core/editing/TypingCommand.h b/Source/core/editing/TypingCommand.h
index 70136e22c6539ea52982ff163d3c919e653c1448..90a86b906c70d2dd639d6032e3c88a7aa19c6113 100644
--- a/Source/core/editing/TypingCommand.h
+++ b/Source/core/editing/TypingCommand.h
@@ -57,14 +57,14 @@ public:
};
typedef unsigned Options;
- static void deleteSelection(Document*, Options = 0);
- static void deleteKeyPressed(Document*, Options = 0, TextGranularity = CharacterGranularity);
- static void forwardDeleteKeyPressed(Document*, Options = 0, TextGranularity = CharacterGranularity);
- static void insertText(Document*, const String&, Options, TextCompositionType = TextCompositionNone);
- static void insertText(Document*, const String&, const VisibleSelection&, Options, TextCompositionType = TextCompositionNone);
- static void insertLineBreak(Document*, Options);
- static void insertParagraphSeparator(Document*, Options);
- static void insertParagraphSeparatorInQuotedContent(Document*);
+ static void deleteSelection(Document&, Options = 0);
+ static void deleteKeyPressed(Document&, Options = 0, TextGranularity = CharacterGranularity);
+ static void forwardDeleteKeyPressed(Document&, Options = 0, TextGranularity = CharacterGranularity);
+ static void insertText(Document&, const String&, Options, TextCompositionType = TextCompositionNone);
+ static void insertText(Document&, const String&, const VisibleSelection&, Options, TextCompositionType = TextCompositionNone);
+ static void insertLineBreak(Document&, Options);
+ static void insertParagraphSeparator(Document&, Options);
+ static void insertParagraphSeparatorInQuotedContent(Document&);
static void closeTyping(Frame*);
void insertText(const String &text, bool selectInsertedText);
@@ -78,17 +78,17 @@ public:
void setCompositionType(TextCompositionType type) { m_compositionType = type; }
private:
- static PassRefPtr<TypingCommand> create(Document* document, ETypingCommand command, const String& text = "", Options options = 0, TextGranularity granularity = CharacterGranularity)
+ static PassRefPtr<TypingCommand> create(Document& document, ETypingCommand command, const String& text = "", Options options = 0, TextGranularity granularity = CharacterGranularity)
{
return adoptRef(new TypingCommand(document, command, text, options, granularity, TextCompositionNone));
}
- static PassRefPtr<TypingCommand> create(Document* document, ETypingCommand command, const String& text, Options options, TextCompositionType compositionType)
+ static PassRefPtr<TypingCommand> create(Document& document, ETypingCommand command, const String& text, Options options, TextCompositionType compositionType)
{
return adoptRef(new TypingCommand(document, command, text, options, CharacterGranularity, compositionType));
}
- TypingCommand(Document*, ETypingCommand, const String& text, Options, TextGranularity, TextCompositionType);
+ TypingCommand(Document&, ETypingCommand, const String& text, Options, TextGranularity, TextCompositionType);
bool smartDelete() const { return m_smartDelete; }
void setSmartDelete(bool smartDelete) { m_smartDelete = smartDelete; }
« no previous file with comments | « Source/core/editing/TextInsertionBaseCommand.cpp ('k') | Source/core/editing/TypingCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698