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

Unified Diff: ui/events/text_edit_commands.h

Issue 2007503002: Views: Replace resource ids with ui::TextEditCommand enum for text editing commands in Textfield. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added file deleted during rename. Created 4 years, 7 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
Index: ui/events/text_edit_commands.h
diff --git a/ui/events/text_edit_commands.h b/ui/events/text_edit_commands.h
new file mode 100644
index 0000000000000000000000000000000000000000..a1345f7cb3cb501c19ae80223269c9486dbef838
--- /dev/null
+++ b/ui/events/text_edit_commands.h
@@ -0,0 +1,52 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_EVENTS_TEXT_EDITING_COMMANDS_H_
+#define UI_EVENTS_TEXT_EDITING_COMMANDS_H_
+
+#include <ostream>
tapted 2016/05/31 04:18:16 remove
+
+#include "base/logging.h"
tapted 2016/05/31 04:18:16 I think this can go too
+
+namespace ui {
+
+// We try to keep commands agnostic of visual direction.
+// Todo Should this be in event_constants.h?
tapted 2016/05/31 04:18:16 here seems ok
+// Todo change to visual direction agnostic values.
+// Todo change to TextEditCommand.
+enum class TextEditCommand {
+ INVALID_COMMAND,
+ UNDO,
+ REDO,
+ CUT,
+ COPY,
+ PASTE,
+ SELECT_ALL,
+ DELETE_BACKWARD,
+ DELETE_FORWARD,
+ DELETE_TO_END_OF_LINE,
+ DELETE_TO_BEGINNING_OF_LINE,
+ DELETE_WORD_BACKWARD,
+ DELETE_WORD_FORWARD,
+ MOVE_LEFT,
+ MOVE_LEFT_AND_MODIFY_SELECTION,
+ MOVE_RIGHT,
+ MOVE_RIGHT_AND_MODIFY_SELECTION,
+ MOVE_WORD_LEFT,
+ MOVE_WORD_LEFT_AND_MODIFY_SELECTION,
+ MOVE_WORD_RIGHT,
+ MOVE_WORD_RIGHT_AND_MODIFY_SELECTION,
+ MOVE_TO_BEGINNING_OF_LINE,
+ MOVE_TO_BEGINNING_OF_LINE_AND_MODIFY_SELECTION,
+ MOVE_TO_END_OF_LINE,
+ MOVE_TO_END_OF_LINE_AND_MODIFY_SELECTION,
+ MOVE_UP,
+ MOVE_DOWN,
+ MOVE_PAGE_UP,
+ MOVE_PAGE_DOWN,
+};
+
+} // namespace ui
+
+#endif // UI_EVENTS_TEXT_EDITING_COMMANDS_H_

Powered by Google App Engine
This is Rietveld 408576698