| Index: chromeos/ime/candidate_window.cc
|
| diff --git a/chromeos/dbus/ibus/ibus_lookup_table.cc b/chromeos/ime/candidate_window.cc
|
| similarity index 51%
|
| rename from chromeos/dbus/ibus/ibus_lookup_table.cc
|
| rename to chromeos/ime/candidate_window.cc
|
| index 0d54b158bbbeedfef87055890c27f5ab5d2ee6ce..cd94f09de461f685c00341d8d8c80437c8f2f68c 100644
|
| --- a/chromeos/dbus/ibus/ibus_lookup_table.cc
|
| +++ b/chromeos/ime/candidate_window.cc
|
| @@ -2,40 +2,39 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "chromeos/dbus/ibus/ibus_lookup_table.h"
|
| +#include "chromeos/ime/candidate_window.h"
|
|
|
| #include <string>
|
| #include "base/logging.h"
|
| #include "base/values.h"
|
|
|
| namespace chromeos {
|
| +namespace input_method {
|
|
|
| namespace {
|
| -// The default entry number of a page in IBusLookupTable.
|
| +// The default entry number of a page in CandidateWindow.
|
| const int kDefaultPageSize = 9;
|
| } // namespace
|
|
|
| -///////////////////////////////////////////////////////////////////////////////
|
| -// IBusLookupTable
|
| -IBusLookupTable::IBusLookupTable()
|
| +CandidateWindow::CandidateWindow()
|
| : property_(new CandidateWindowProperty) {
|
| }
|
|
|
| -IBusLookupTable::~IBusLookupTable() {
|
| +CandidateWindow::~CandidateWindow() {
|
| }
|
|
|
| -bool IBusLookupTable::IsEqual(const IBusLookupTable& table) const {
|
| - if (page_size() != table.page_size() ||
|
| - cursor_position() != table.cursor_position() ||
|
| - is_cursor_visible() != table.is_cursor_visible() ||
|
| - orientation() != table.orientation() ||
|
| - show_window_at_composition() != table.show_window_at_composition() ||
|
| - candidates_.size() != table.candidates_.size())
|
| +bool CandidateWindow::IsEqual(const CandidateWindow& cw) const {
|
| + if (page_size() != cw.page_size() ||
|
| + cursor_position() != cw.cursor_position() ||
|
| + is_cursor_visible() != cw.is_cursor_visible() ||
|
| + orientation() != cw.orientation() ||
|
| + show_window_at_composition() != cw.show_window_at_composition() ||
|
| + candidates_.size() != cw.candidates_.size())
|
| return false;
|
|
|
| for (size_t i = 0; i < candidates_.size(); ++i) {
|
| const Entry& left = candidates_[i];
|
| - const Entry& right = table.candidates_[i];
|
| + const Entry& right = cw.candidates_[i];
|
| if (left.value != right.value ||
|
| left.label != right.label ||
|
| left.annotation != right.annotation ||
|
| @@ -46,16 +45,16 @@ bool IBusLookupTable::IsEqual(const IBusLookupTable& table) const {
|
| return true;
|
| }
|
|
|
| -void IBusLookupTable::CopyFrom(const IBusLookupTable& table) {
|
| - SetProperty(table.GetProperty());
|
| +void CandidateWindow::CopyFrom(const CandidateWindow& cw) {
|
| + SetProperty(cw.GetProperty());
|
| candidates_.clear();
|
| - candidates_ = table.candidates_;
|
| + candidates_ = cw.candidates_;
|
| }
|
|
|
|
|
| // When the default values are changed, please modify
|
| // InputMethodEngine::CandidateWindowProperty too.
|
| -IBusLookupTable::CandidateWindowProperty::CandidateWindowProperty()
|
| +CandidateWindow::CandidateWindowProperty::CandidateWindowProperty()
|
| : page_size(kDefaultPageSize),
|
| cursor_position(0),
|
| is_cursor_visible(true),
|
| @@ -63,13 +62,14 @@ IBusLookupTable::CandidateWindowProperty::CandidateWindowProperty()
|
| show_window_at_composition(false) {
|
| }
|
|
|
| -IBusLookupTable::CandidateWindowProperty::~CandidateWindowProperty() {
|
| +CandidateWindow::CandidateWindowProperty::~CandidateWindowProperty() {
|
| }
|
|
|
| -IBusLookupTable::Entry::Entry() {
|
| +CandidateWindow::Entry::Entry() {
|
| }
|
|
|
| -IBusLookupTable::Entry::~Entry() {
|
| +CandidateWindow::Entry::~Entry() {
|
| }
|
|
|
| +} // namespace input_method
|
| } // namespace chromeos
|
|
|