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

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

Issue 11363033: Extends IBusText to handle mozc's extended field. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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 | « no previous file | chromeos/dbus/ibus/ibus_text.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/dbus/ibus/ibus_text.h
diff --git a/chromeos/dbus/ibus/ibus_text.h b/chromeos/dbus/ibus/ibus_text.h
index c05baebcb8542669d56e6a479275489faa11b743..8061ca8bedb6cfc493717a705943514b53c03888 100644
--- a/chromeos/dbus/ibus/ibus_text.h
+++ b/chromeos/dbus/ibus/ibus_text.h
@@ -87,12 +87,15 @@ bool CHROMEOS_EXPORT PopIBusText(dbus::MessageReader* reader,
// Returns true on success.
bool CHROMEOS_EXPORT PopStringFromIBusText(dbus::MessageReader* reader,
std::string* text);
-// Appends a IBusText to |writer|.
+// Appends a IBusText to |writer|. Annotation and description field is not
+// filled with AppendIBusText.
+// TODO(nona): Support annotation/description appending if necessary.
void CHROMEOS_EXPORT AppendIBusText(const IBusText& ibus_text,
dbus::MessageWriter* writer);
// Appends a string to |writer| as IBusText without any attributes. Use
// AppendIBusText instead in the case of using any attribute entries.
+// TODO(nona): Support annotation/description appending if necessary.
void CHROMEOS_EXPORT AppendStringAsIBusText(const std::string& text,
dbus::MessageWriter* writer);
@@ -115,7 +118,6 @@ void CHROMEOS_EXPORT AppendStringAsIBusText(const std::string& text,
//
// 3. Forward decoration
// Not supported in Chrome.
-// TODO(nona): Support attachment for mozc infolist feature(crosbug.com/30653).
class CHROMEOS_EXPORT IBusText {
public:
enum IBusTextUnderlineType {
@@ -139,17 +141,38 @@ class CHROMEOS_EXPORT IBusText {
IBusText();
virtual ~IBusText();
- std::string text() const;
- void set_text(const std::string& text);
+ std::string text() const { return text_; }
satorux1 2012/11/05 04:29:16 const std::string& text()
Seigo Nonaka 2012/11/05 05:27:42 Done.
+ void set_text(const std::string& text) { text_ = text; }
- const std::vector<UnderlineAttribute>& underline_attributes() const;
- std::vector<UnderlineAttribute>* mutable_underline_attributes();
+ std::string annotation() const { return annotation_; }
satorux1 2012/11/05 04:29:16 ditto. please fix other places too.
Seigo Nonaka 2012/11/05 05:27:42 Done.
+ void set_annotation(const std::string& annotation) {
+ annotation_ = annotation;
+ }
- const std::vector<SelectionAttribute>& selection_attributes() const;
- std::vector<SelectionAttribute>* mutable_selection_attributes();
+ std::string description() const { return description_; }
+ void set_description(const std::string& description) {
+ description_ = description;
+ }
+
+ const std::vector<UnderlineAttribute>& underline_attributes() const {
+ return underline_attributes_;
+ }
+
+ std::vector<UnderlineAttribute>* mutable_underline_attributes() {
+ return &underline_attributes_;
+ }
+
+ const std::vector<SelectionAttribute>& selection_attributes() const {
+ return selection_attributes_;
+ }
+ std::vector<SelectionAttribute>* mutable_selection_attributes() {
+ return &selection_attributes_;
+ }
private:
std::string text_;
+ std::string annotation_;
+ std::string description_;
std::vector<UnderlineAttribute> underline_attributes_;
std::vector<SelectionAttribute> selection_attributes_;
« no previous file with comments | « no previous file | chromeos/dbus/ibus/ibus_text.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698