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

Unified Diff: chrome/browser/chromeos/input_method/candidate_window.cc

Issue 7108022: Libcros version-up for preedit text monitoring on ChromeOS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update DEPS file for using http://gerrit.chromium.org/gerrit/2288 Created 9 years, 6 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 | « no previous file | tools/cros.DEPS/DEPS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/input_method/candidate_window.cc
diff --git a/chrome/browser/chromeos/input_method/candidate_window.cc b/chrome/browser/chromeos/input_method/candidate_window.cc
index 20b4ce17ff11f24342314ee675e0687152959728..77a77ce05c279cd79ff69860f5dde582e51992ce 100644
--- a/chrome/browser/chromeos/input_method/candidate_window.cc
+++ b/chrome/browser/chromeos/input_method/candidate_window.cc
@@ -585,6 +585,16 @@ class CandidateWindowController::Impl : public CandidateWindowView::Observer {
static void OnUpdateLookupTable(void* input_method_library,
const InputMethodLookupTable& lookup_table);
+ // The function is called when |UpdatePreeditText| signal is received
+ // in libcros. |input_method_library| is a void pointer to this object.
+ static void OnUpdatePreeditText(void* input_method_library,
+ const std::string& utf8_text,
+ unsigned int cursor, bool visible);
+
+ // The function is called when |HidePreeditText| signal is received
+ // in libcros. |input_method_library| is a void pointer to this object.
+ static void OnHidePreeditText(void* input_method_library);
+
// This function is called by libcros when ibus connects or disconnects.
// |input_method_library| is a void pointer to this object.
static void OnConnectionChange(void* input_method_library, bool connected);
@@ -1247,6 +1257,10 @@ bool CandidateWindowController::Impl::Init() {
MonitorInputMethodConnection(
ui_status_connection_,
&CandidateWindowController::Impl::OnConnectionChange);
+ MonitorInputMethodPreeditText(
+ ui_status_connection_,
+ &CandidateWindowController::Impl::OnHidePreeditText,
+ &CandidateWindowController::Impl::OnUpdatePreeditText);
// Create the candidate window view.
CreateView();
@@ -1296,6 +1310,10 @@ void CandidateWindowController::Impl::OnHideLookupTable(
controller->candidate_window_->HideLookupTable();
}
+void CandidateWindowController::Impl::OnHidePreeditText(
+ void* input_method_library) {
+}
+
void CandidateWindowController::Impl::OnSetCursorLocation(
void* input_method_library,
int x,
@@ -1356,6 +1374,11 @@ void CandidateWindowController::Impl::OnUpdateLookupTable(
controller->frame_->Show();
}
+void CandidateWindowController::Impl::OnUpdatePreeditText(
+ void* input_method_library,
+ const std::string& utf8_text, unsigned int cursor, bool visible) {
+}
+
void CandidateWindowController::Impl::OnCandidateCommitted(int index,
int button,
int flags) {
« no previous file with comments | « no previous file | tools/cros.DEPS/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698