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
3 // found in the LICENSE file.
5 #include "ui/events/linux/text_edit_command_auralinux.h"
7 #include "base/logging.h"
11 std::string TextEditCommandAuraLinux::GetCommandString() const {
12 std::string base_name;
13 switch (command_id_) {
21 base_name = "DeleteBackward";
24 base_name = "DeleteForward";
26 case DELETE_TO_BEGINING_OF_LINE:
27 base_name = "DeleteToBeginningOfLine";
29 case DELETE_TO_BEGINING_OF_PARAGRAPH:
30 base_name = "DeleteToBeginningOfParagraph";
32 case DELETE_TO_END_OF_LINE:
33 base_name = "DeleteToEndOfLine";
35 case DELETE_TO_END_OF_PARAGRAPH:
36 base_name = "DeleteToEndOfParagraph";
38 case DELETE_WORD_BACKWARD:
39 base_name = "DeleteWordBackward";
41 case DELETE_WORD_FORWARD:
42 base_name = "DeleteWordForward";
45 base_name = "InsertText";
48 base_name = "MoveBackward";
51 base_name = "MoveDown";
54 base_name = "MoveForward";
57 base_name = "MoveLeft";
60 base_name = "MovePageDown";
63 base_name = "MovePageUp";
66 base_name = "MoveRight";
68 case MOVE_TO_BEGINING_OF_DOCUMENT:
69 base_name = "MoveToBeginningOfDocument";
71 case MOVE_TO_BEGINING_OF_LINE:
72 base_name = "MoveToBeginningOfLine";
74 case MOVE_TO_BEGINING_OF_PARAGRAPH:
75 base_name = "MoveToBeginningOfParagraph";
77 case MOVE_TO_END_OF_DOCUMENT:
78 base_name = "MoveToEndOfDocument";
80 case MOVE_TO_END_OF_LINE:
81 base_name = "MoveToEndOfLine";
83 case MOVE_TO_END_OF_PARAGRAPH:
84 base_name = "MoveToEndOfParagraph";
89 case MOVE_WORD_BACKWARD:
90 base_name = "MoveWordBackward";
92 case MOVE_WORD_FORWARD:
93 base_name = "MoveWordForward";
96 base_name = "MoveWordLeft";
99 base_name = "MoveWordRight";
105 base_name = "SelectAll";
108 base_name = "SetMark";
111 base_name = "Unselect";
113 case INVALID_COMMAND:
115 return std::string();
118 if (extend_selection())
119 base_name += "AndModifySelection";