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

Unified Diff: chromeos/dbus/ibus/ibus_text.cc

Issue 10332228: Extends IBusText I/O function. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Apply comments. Created 8 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
« no previous file with comments | « chromeos/dbus/ibus/ibus_text.h ('k') | chromeos/dbus/ibus/ibus_text_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/dbus/ibus/ibus_text.cc
diff --git a/chromeos/dbus/ibus/ibus_text.cc b/chromeos/dbus/ibus/ibus_text.cc
index b2eae1590657cf6d8d98749d0e1e0f87e82f6788..8f0044d2dbef7a6e0cd143ead86f9e4497689e7a 100644
--- a/chromeos/dbus/ibus/ibus_text.cc
+++ b/chromeos/dbus/ibus/ibus_text.cc
@@ -93,6 +93,13 @@ void AppendIBusText(const IBusText& ibus_text, dbus::MessageWriter* writer) {
ibus_text_writer.CloseAll();
}
+void CHROMEOS_EXPORT AppendStringAsIBusText(const std::string& text,
+ dbus::MessageWriter* writer) {
+ IBusText ibus_text;
+ ibus_text.set_text(text);
+ AppendIBusText(ibus_text, writer);
+}
+
bool PopIBusText(dbus::MessageReader* reader, IBusText* ibus_text) {
IBusObjectReader ibus_text_reader("IBusText", reader);
if (!ibus_text_reader.Init())
@@ -153,6 +160,15 @@ bool PopIBusText(dbus::MessageReader* reader, IBusText* ibus_text) {
return true;
}
+bool CHROMEOS_EXPORT PopStringFromIBusText(dbus::MessageReader* reader,
+ std::string* text) {
+ IBusText ibus_text;
+ if(!PopIBusText(reader, &ibus_text))
+ return false;
+ *text = ibus_text.text();
+ return true;
+}
+
///////////////////////////////////////////////////////////////////////////////
// IBusText
IBusText::IBusText()
« no previous file with comments | « chromeos/dbus/ibus/ibus_text.h ('k') | chromeos/dbus/ibus/ibus_text_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698