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

Side by Side Diff: chrome/browser/chromeos/input_method/ibus_ui_controller.cc

Issue 11783085: Extends IBusLookupTable to handle IsEqual/CopyFrom. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix comment Created 7 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/chromeos/input_method/input_method_engine_ibus.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 // TODO(nona): Remvoe IBusUiController 4 // TODO(nona): Remvoe IBusUiController
5 5
6 #include "chrome/browser/chromeos/input_method/ibus_ui_controller.h" 6 #include "chrome/browser/chromeos/input_method/ibus_ui_controller.h"
7 7
8 #include <sstream> 8 #include <sstream>
9 9
10 #include "ash/shell.h" 10 #include "ash/shell.h"
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 FOR_EACH_OBSERVER(Observer, observers_, OnHidePreeditText()); 197 FOR_EACH_OBSERVER(Observer, observers_, OnHidePreeditText());
198 } 198 }
199 199
200 void IBusUiController::UpdateLookupTable(const ibus::IBusLookupTable& table, 200 void IBusUiController::UpdateLookupTable(const ibus::IBusLookupTable& table,
201 bool visible) { 201 bool visible) {
202 // TODO(nona): Use ibus::IBusLookupTable instead. 202 // TODO(nona): Use ibus::IBusLookupTable instead.
203 InputMethodLookupTable lookup_table; 203 InputMethodLookupTable lookup_table;
204 lookup_table.visible = visible; 204 lookup_table.visible = visible;
205 205
206 // Copy the orientation information. 206 // Copy the orientation information.
207 if (table.orientation() == 207 if (table.orientation() == ibus::IBusLookupTable::VERTICAL) {
208 ibus::IBusLookupTable::IBUS_LOOKUP_TABLE_ORIENTATION_VERTICAL) {
209 lookup_table.orientation = InputMethodLookupTable::kVertical; 208 lookup_table.orientation = InputMethodLookupTable::kVertical;
210 } else { 209 } else {
211 lookup_table.orientation = InputMethodLookupTable::kHorizontal; 210 lookup_table.orientation = InputMethodLookupTable::kHorizontal;
212 } 211 }
213 212
214 lookup_table.show_at_composition_head = table.show_window_at_composition(); 213 lookup_table.show_at_composition_head = table.show_window_at_composition();
215 214
216 // Copy candidates and annotations to |lookup_table|. 215 // Copy candidates and annotations to |lookup_table|.
217 for (size_t i = 0; i < table.candidates().size(); ++i) { 216 for (size_t i = 0; i < table.candidates().size(); ++i) {
218 const ibus::IBusLookupTable::Entry& entry = table.candidates()[i]; 217 const ibus::IBusLookupTable::Entry& entry = table.candidates()[i];
(...skipping 14 matching lines...) Expand all
233 DVLOG(1) << "Invalid page size: " << lookup_table.page_size; 232 DVLOG(1) << "Invalid page size: " << lookup_table.page_size;
234 lookup_table.page_size = 1; 233 lookup_table.page_size = 1;
235 } 234 }
236 235
237 FOR_EACH_OBSERVER(Observer, observers_, 236 FOR_EACH_OBSERVER(Observer, observers_,
238 OnUpdateLookupTable(lookup_table)); 237 OnUpdateLookupTable(lookup_table));
239 } 238 }
240 239
241 } // namespace input_method 240 } // namespace input_method
242 } // namespace chromeos 241 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/input_method/input_method_engine_ibus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698