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

Unified Diff: chromeos/ime/candidate_window.cc

Issue 24946003: Rename IBusLookupTable to CandidateWindow, and move it to chromeos/ime. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 7 years, 2 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/ime/candidate_window.h ('k') | chromeos/ime/candidate_window_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « chromeos/ime/candidate_window.h ('k') | chromeos/ime/candidate_window_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698