| OLD | NEW |
| 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 #include "ui/events/linux/text_edit_command_auralinux.h" | 5 #include "ui/events/linux/text_edit_command_auralinux.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 | 8 |
| 9 namespace ui { | 9 namespace ui { |
| 10 | 10 |
| 11 std::string TextEditCommandAuraLinux::GetCommandString() const { | 11 std::string TextEditCommandAuraLinux::GetCommandString() const { |
| 12 std::string base_name; | 12 std::string base_name; |
| 13 switch (command_id_) { | 13 switch (command_id_) { |
| 14 case COPY: | 14 case COPY: |
| 15 base_name = "Copy"; | 15 base_name = "Copy"; |
| 16 break; | 16 break; |
| 17 case CUT: | 17 case CUT: |
| 18 base_name = "Cut"; | 18 base_name = "Cut"; |
| 19 break; | 19 break; |
| 20 case DELETE_BACKWARD: | 20 case DELETE_BACKWARD: |
| 21 base_name = "DeleteBackward"; | 21 base_name = "DeleteBackward"; |
| 22 break; | 22 break; |
| 23 case DELETE_FORWARD: | 23 case DELETE_FORWARD: |
| 24 base_name = "DeleteForward"; | 24 base_name = "DeleteForward"; |
| 25 break; | 25 break; |
| 26 case DELETE_TO_BEGINING_OF_LINE: | 26 case DELETE_TO_BEGINNING_OF_LINE: |
| 27 base_name = "DeleteToBeginningOfLine"; | 27 base_name = "DeleteToBeginningOfLine"; |
| 28 break; | 28 break; |
| 29 case DELETE_TO_BEGINING_OF_PARAGRAPH: | 29 case DELETE_TO_BEGINNING_OF_PARAGRAPH: |
| 30 base_name = "DeleteToBeginningOfParagraph"; | 30 base_name = "DeleteToBeginningOfParagraph"; |
| 31 break; | 31 break; |
| 32 case DELETE_TO_END_OF_LINE: | 32 case DELETE_TO_END_OF_LINE: |
| 33 base_name = "DeleteToEndOfLine"; | 33 base_name = "DeleteToEndOfLine"; |
| 34 break; | 34 break; |
| 35 case DELETE_TO_END_OF_PARAGRAPH: | 35 case DELETE_TO_END_OF_PARAGRAPH: |
| 36 base_name = "DeleteToEndOfParagraph"; | 36 base_name = "DeleteToEndOfParagraph"; |
| 37 break; | 37 break; |
| 38 case DELETE_WORD_BACKWARD: | 38 case DELETE_WORD_BACKWARD: |
| 39 base_name = "DeleteWordBackward"; | 39 base_name = "DeleteWordBackward"; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 58 break; | 58 break; |
| 59 case MOVE_PAGE_DOWN: | 59 case MOVE_PAGE_DOWN: |
| 60 base_name = "MovePageDown"; | 60 base_name = "MovePageDown"; |
| 61 break; | 61 break; |
| 62 case MOVE_PAGE_UP: | 62 case MOVE_PAGE_UP: |
| 63 base_name = "MovePageUp"; | 63 base_name = "MovePageUp"; |
| 64 break; | 64 break; |
| 65 case MOVE_RIGHT: | 65 case MOVE_RIGHT: |
| 66 base_name = "MoveRight"; | 66 base_name = "MoveRight"; |
| 67 break; | 67 break; |
| 68 case MOVE_TO_BEGINING_OF_DOCUMENT: | 68 case MOVE_TO_BEGINNING_OF_DOCUMENT: |
| 69 base_name = "MoveToBeginningOfDocument"; | 69 base_name = "MoveToBeginningOfDocument"; |
| 70 break; | 70 break; |
| 71 case MOVE_TO_BEGINING_OF_LINE: | 71 case MOVE_TO_BEGINNING_OF_LINE: |
| 72 base_name = "MoveToBeginningOfLine"; | 72 base_name = "MoveToBeginningOfLine"; |
| 73 break; | 73 break; |
| 74 case MOVE_TO_BEGINING_OF_PARAGRAPH: | 74 case MOVE_TO_BEGINNING_OF_PARAGRAPH: |
| 75 base_name = "MoveToBeginningOfParagraph"; | 75 base_name = "MoveToBeginningOfParagraph"; |
| 76 break; | 76 break; |
| 77 case MOVE_TO_END_OF_DOCUMENT: | 77 case MOVE_TO_END_OF_DOCUMENT: |
| 78 base_name = "MoveToEndOfDocument"; | 78 base_name = "MoveToEndOfDocument"; |
| 79 break; | 79 break; |
| 80 case MOVE_TO_END_OF_LINE: | 80 case MOVE_TO_END_OF_LINE: |
| 81 base_name = "MoveToEndOfLine"; | 81 base_name = "MoveToEndOfLine"; |
| 82 break; | 82 break; |
| 83 case MOVE_TO_END_OF_PARAGRAPH: | 83 case MOVE_TO_END_OF_PARAGRAPH: |
| 84 base_name = "MoveToEndOfParagraph"; | 84 base_name = "MoveToEndOfParagraph"; |
| (...skipping 30 matching lines...) Expand all Loading... |
| 115 return std::string(); | 115 return std::string(); |
| 116 } | 116 } |
| 117 | 117 |
| 118 if (extend_selection()) | 118 if (extend_selection()) |
| 119 base_name += "AndModifySelection"; | 119 base_name += "AndModifySelection"; |
| 120 | 120 |
| 121 return base_name; | 121 return base_name; |
| 122 } | 122 } |
| 123 | 123 |
| 124 } // namespace ui | 124 } // namespace ui |
| OLD | NEW |