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

Unified Diff: ui/base/ime/linux/text_edit_command_auralinux.h

Issue 2029733003: 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: === Created 4 years, 6 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
« no previous file with comments | « ui/base/ime/dummy_text_input_client.cc ('k') | ui/base/ime/linux/text_edit_command_auralinux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/ime/linux/text_edit_command_auralinux.h
diff --git a/ui/base/ime/linux/text_edit_command_auralinux.h b/ui/base/ime/linux/text_edit_command_auralinux.h
new file mode 100644
index 0000000000000000000000000000000000000000..92ff115afe3b74aa0d8550254933a16cfa6c2e88
--- /dev/null
+++ b/ui/base/ime/linux/text_edit_command_auralinux.h
@@ -0,0 +1,38 @@
+// Copyright 2014 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_BASE_IME_LINUX_TEXT_EDIT_COMMAND_AURALINUX_H_
+#define UI_BASE_IME_LINUX_TEXT_EDIT_COMMAND_AURALINUX_H_
+
+#include <string>
+
+#include "ui/base/ime/ui_base_ime_export.h"
+
+namespace ui {
+
+enum class TextEditCommand;
+
+// Represents a command that performs a specific operation on text.
+// Copy and assignment are explicitly allowed; these objects live in vectors.
+class UI_BASE_IME_EXPORT TextEditCommandAuraLinux {
+ public:
+ TextEditCommandAuraLinux(TextEditCommand command, const std::string& argument)
+ : command_(command), argument_(argument) {}
+
+ TextEditCommand command() const { return command_; }
+ const std::string& argument() const { return argument_; }
+
+ // We communicate these commands back to blink with a string representation.
+ std::string GetCommandString() const;
+
+ private:
+ TextEditCommand command_;
+
+ // The text for TextEditCommand::INSERT_TEXT; otherwise empty and unused.
+ std::string argument_;
+};
+
+} // namespace ui
+
+#endif // UI_BASE_IME_LINUX_TEXT_EDIT_COMMAND_AURALINUX_H_
« no previous file with comments | « ui/base/ime/dummy_text_input_client.cc ('k') | ui/base/ime/linux/text_edit_command_auralinux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698