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

Side by Side Diff: ui/wm/public/text_edit_command_x11.cc

Issue 213283004: linux_aura: Port GtkKeybindingsHandler to Aura. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Abort attempts to rewrite unit tests due to linking issues. Created 6 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
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.
4
5 #include "ui/wm/public/text_edit_command_x11.h"
6
7 #include "base/logging.h"
8
9 namespace ui {
10 namespace wm {
11
12 std::string TextEditCommandX11::GetCommandString() const {
13 std::string base_name;
14 switch (command_id_) {
15 case COPY:
16 base_name = "Copy";
17 break;
18 case CUT:
19 base_name = "Cut";
20 break;
21 case DELETE_BACKWARD:
22 base_name = "DeleteBackward";
23 break;
24 case DELETE_FORWARD:
25 base_name = "DeleteForward";
26 break;
27 case DELETE_TO_BEGINING_OF_LINE:
28 base_name = "DeleteToBeginningOfLine";
29 break;
30 case DELETE_TO_BEGINING_OF_PARAGRAPH:
31 base_name = "DeleteToBeginningOfParagraph";
32 break;
33 case DELETE_TO_END_OF_LINE:
34 base_name = "DeleteToEndOfLine";
35 break;
36 case DELETE_TO_END_OF_PARAGRAPH:
37 base_name = "DeleteToEndOfParagraph";
38 break;
39 case DELETE_WORD_BACKWARD:
40 base_name = "DeleteWordBackward";
41 break;
42 case DELETE_WORD_FORWARD:
43 base_name = "DeleteWordForward";
44 break;
45 case INSERT_TEXT:
46 base_name = "InsertText";
47 break;
48 case MOVE_BACKWARD:
49 base_name = "MoveBackward";
50 break;
51 case MOVE_DOWN:
52 base_name = "MoveDown";
53 break;
54 case MOVE_FORWARD:
55 base_name = "MoveForward";
56 break;
57 case MOVE_LEFT:
58 base_name = "MoveLeft";
59 break;
60 case MOVE_PAGE_DOWN:
61 base_name = "MovePageDown";
62 break;
63 case MOVE_PAGE_UP:
64 base_name = "MovePageUp";
65 break;
66 case MOVE_RIGHT:
67 base_name = "MoveRight";
68 break;
69 case MOVE_TO_BEGINING_OF_DOCUMENT:
70 base_name = "MoveToBeginningOfDocument";
71 break;
72 case MOVE_TO_BEGINING_OF_LINE:
73 base_name = "MoveToBeginningOfLine";
74 break;
75 case MOVE_TO_BEGINING_OF_PARAGRAPH:
76 base_name = "MoveToBeginningOfParagraph";
77 break;
78 case MOVE_TO_END_OF_DOCUMENT:
79 base_name = "MoveToEndOfDocument";
80 break;
81 case MOVE_TO_END_OF_LINE:
82 base_name = "MoveToEndOfLine";
83 break;
84 case MOVE_TO_END_OF_PARAGRAPH:
85 base_name = "MoveToEndOfParagraph";
86 break;
87 case MOVE_UP:
88 base_name = "MoveUp";
89 break;
90 case MOVE_WORD_BACKWARD:
91 base_name = "MoveWordBackward";
92 break;
93 case MOVE_WORD_FORWARD:
94 base_name = "MoveWordForward";
95 break;
96 case MOVE_WORD_LEFT:
97 base_name = "MoveWordLeft";
98 break;
99 case MOVE_WORD_RIGHT:
100 base_name = "MoveWordRight";
101 break;
102 case PASTE:
103 base_name = "Paste";
104 break;
105 case SELECT_ALL:
106 base_name = "SelectAll";
107 break;
108 case SET_MARK:
109 base_name = "SetMark";
110 break;
111 case UNSELECT:
112 base_name = "Unselect";
113 break;
114 default:
sky 2014/03/31 20:44:05 Can't you remove this to get a compile error if a
115 NOTREACHED();
116 return std::string();
117 }
118
119 if (extend_selection())
120 base_name += "AndModifySelection";
121
122 return base_name;
123 }
124
125 } // namespace wm
126 } // namespace ui
127
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698