| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chromeos/dbus/ibus/ibus_lookup_table.h" | 5 #include "chromeos/dbus/ibus/ibus_lookup_table.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/values.h" | 9 #include "base/values.h" |
| 10 #include "chromeos/dbus/ibus/ibus_object.h" | 10 #include "chromeos/dbus/ibus/ibus_object.h" |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 ibus::IBusText candidate_text; | 130 ibus::IBusText candidate_text; |
| 131 // The attributes in IBusText are not used in Chrome. | 131 // The attributes in IBusText are not used in Chrome. |
| 132 if (!PopIBusText(&text_array_reader, &candidate_text)) { | 132 if (!PopIBusText(&text_array_reader, &candidate_text)) { |
| 133 LOG(ERROR) << "Invalid variant structure[IBusLookupTable]: " | 133 LOG(ERROR) << "Invalid variant structure[IBusLookupTable]: " |
| 134 << "6th argument should be array of IBusText."; | 134 << "6th argument should be array of IBusText."; |
| 135 return false; | 135 return false; |
| 136 } | 136 } |
| 137 IBusLookupTable::Entry entry; | 137 IBusLookupTable::Entry entry; |
| 138 entry.value = candidate_text.text(); | 138 entry.value = candidate_text.text(); |
| 139 entry.annotation = candidate_text.annotation(); | 139 entry.annotation = candidate_text.annotation(); |
| 140 entry.description = candidate_text.description(); | 140 entry.description_title = candidate_text.description_title(); |
| 141 entry.description_body = candidate_text.description_body(); |
| 141 candidates->push_back(entry); | 142 candidates->push_back(entry); |
| 142 } | 143 } |
| 143 | 144 |
| 144 dbus::MessageReader label_array_reader(NULL); | 145 dbus::MessageReader label_array_reader(NULL); |
| 145 if (!ibus_object_reader.PopArray(&label_array_reader)) { | 146 if (!ibus_object_reader.PopArray(&label_array_reader)) { |
| 146 LOG(ERROR) << "Invalid variant structure[IBusLookupTable]: " | 147 LOG(ERROR) << "Invalid variant structure[IBusLookupTable]: " |
| 147 << "7th argument should be array."; | 148 << "7th argument should be array."; |
| 148 return false; | 149 return false; |
| 149 } | 150 } |
| 150 | 151 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 } | 187 } |
| 187 | 188 |
| 188 IBusLookupTable::Entry::Entry() { | 189 IBusLookupTable::Entry::Entry() { |
| 189 } | 190 } |
| 190 | 191 |
| 191 IBusLookupTable::Entry::~Entry() { | 192 IBusLookupTable::Entry::~Entry() { |
| 192 } | 193 } |
| 193 | 194 |
| 194 } // namespace ibus | 195 } // namespace ibus |
| 195 } // namespace chromeos | 196 } // namespace chromeos |
| OLD | NEW |