Commit 235e14d4 authored by Zhuoyu Qian's avatar Zhuoyu Qian Committed by Commit Bot

Change Editor:CreateCommand to be const type.

This CL change Editor::CreateCommand to be const type for
improving code health.
Signed-off-by: default avatarZhuoyu Qian <zhuoyu.qian@samsung.com>
Change-Id: I1e17c38f346d07f06cae0e736da0d550eacf3f74
Reviewed-on: https://chromium-review.googlesource.com/965723Reviewed-by: default avatarYoshifumi Inoue <yosin@chromium.org>
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#543998}
parent d96d89c6
......@@ -137,10 +137,9 @@ class CORE_EXPORT Editor final : public GarbageCollectedFinalized<Editor> {
EditorCommandSource source_;
Member<LocalFrame> frame_;
};
Command CreateCommand(
const String&
command_name); // Command source is CommandFromMenuOrKeyBinding.
Command CreateCommand(const String& command_name, EditorCommandSource);
Command CreateCommand(const String& command_name)
const; // Command source is CommandFromMenuOrKeyBinding.
Command CreateCommand(const String& command_name, EditorCommandSource) const;
// |Editor::executeCommand| is implementation of |WebFrame::executeCommand|
// rather than |Document::execCommand|.
......
......@@ -3466,13 +3466,13 @@ static const EditorInternalCommand* InternalCommand(
return &kEditorCommands[command_index];
}
Editor::Command Editor::CreateCommand(const String& command_name) {
Editor::Command Editor::CreateCommand(const String& command_name) const {
return Command(InternalCommand(command_name),
EditorCommandSource::kMenuOrKeyBinding, frame_);
}
Editor::Command Editor::CreateCommand(const String& command_name,
EditorCommandSource source) {
EditorCommandSource source) const {
return Command(InternalCommand(command_name), source, frame_);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment