| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/browser/chromeos/input_method/candidate_window.h" | 5 #include "chrome/browser/chromeos/input_method/candidate_window.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 1245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1256 DLOG(INFO) << "Ignored set_cursor_location signal to prevent window shake"; | 1256 DLOG(INFO) << "Ignored set_cursor_location signal to prevent window shake"; |
| 1257 return; | 1257 return; |
| 1258 } | 1258 } |
| 1259 | 1259 |
| 1260 // Remember the cursor location. | 1260 // Remember the cursor location. |
| 1261 controller->set_cursor_location(gfx::Rect(x, y, width, height)); | 1261 controller->set_cursor_location(gfx::Rect(x, y, width, height)); |
| 1262 // Move the window per the cursor location. | 1262 // Move the window per the cursor location. |
| 1263 controller->MoveCandidateWindow( | 1263 controller->MoveCandidateWindow( |
| 1264 controller->cursor_location(), | 1264 controller->cursor_location(), |
| 1265 controller->candidate_window_->GetHorizontalOffset()); | 1265 controller->candidate_window_->GetHorizontalOffset()); |
| 1266 // The call is needed to ensure that the candidate window is redrawn | |
| 1267 // properly after the cursor location is changed. | |
| 1268 controller->candidate_window_->ResizeAndSchedulePaint(); | |
| 1269 } | 1266 } |
| 1270 | 1267 |
| 1271 void CandidateWindowController::Impl::OnUpdateAuxiliaryText( | 1268 void CandidateWindowController::Impl::OnUpdateAuxiliaryText( |
| 1272 void* input_method_library, | 1269 void* input_method_library, |
| 1273 const std::string& utf8_text, | 1270 const std::string& utf8_text, |
| 1274 bool visible) { | 1271 bool visible) { |
| 1275 CandidateWindowController::Impl* controller = | 1272 CandidateWindowController::Impl* controller = |
| 1276 static_cast<CandidateWindowController::Impl*>(input_method_library); | 1273 static_cast<CandidateWindowController::Impl*>(input_method_library); |
| 1277 // If it's not visible, hide the auxiliary text and return. | 1274 // If it's not visible, hide the auxiliary text and return. |
| 1278 if (!visible) { | 1275 if (!visible) { |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1333 | 1330 |
| 1334 CandidateWindowController::~CandidateWindowController() { | 1331 CandidateWindowController::~CandidateWindowController() { |
| 1335 delete impl_; | 1332 delete impl_; |
| 1336 } | 1333 } |
| 1337 | 1334 |
| 1338 bool CandidateWindowController::Init() { | 1335 bool CandidateWindowController::Init() { |
| 1339 return impl_->Init(); | 1336 return impl_->Init(); |
| 1340 } | 1337 } |
| 1341 | 1338 |
| 1342 } // namespace chromeos | 1339 } // namespace chromeos |
| OLD | NEW |