OLD | NEW |
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 | 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 1167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1178 // Update the cursor indexes in the model. | 1178 // Update the cursor indexes in the model. |
1179 lookup_table_.cursor_absolute_index = cursor_absolute_index; | 1179 lookup_table_.cursor_absolute_index = cursor_absolute_index; |
1180 } | 1180 } |
1181 | 1181 |
1182 void CandidateWindowView::OnCandidatePressed( | 1182 void CandidateWindowView::OnCandidatePressed( |
1183 const gfx::Point& location) { | 1183 const gfx::Point& location) { |
1184 for (size_t i = 0; i < candidate_views_.size(); ++i) { | 1184 for (size_t i = 0; i < candidate_views_.size(); ++i) { |
1185 gfx::Point converted_location = location; | 1185 gfx::Point converted_location = location; |
1186 views::View::ConvertPointToView(this, candidate_views_[i], | 1186 views::View::ConvertPointToView(this, candidate_views_[i], |
1187 &converted_location); | 1187 &converted_location); |
1188 if (candidate_views_[i]->HitTest(converted_location)) { | 1188 if (candidate_views_[i]->HitTestPoint(converted_location)) { |
1189 SelectCandidateAt(i); | 1189 SelectCandidateAt(i); |
1190 break; | 1190 break; |
1191 } | 1191 } |
1192 } | 1192 } |
1193 } | 1193 } |
1194 | 1194 |
1195 void CandidateWindowView::CommitCandidate() { | 1195 void CandidateWindowView::CommitCandidate() { |
1196 // For now, we don't distinguish left and right clicks. | 1196 // For now, we don't distinguish left and right clicks. |
1197 const int button = 1; // Left button. | 1197 const int button = 1; // Left button. |
1198 const int key_modifilers = 0; | 1198 const int key_modifilers = 0; |
(...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1770 } | 1770 } |
1771 | 1771 |
1772 // static | 1772 // static |
1773 CandidateWindowController* | 1773 CandidateWindowController* |
1774 CandidateWindowController::CreateCandidateWindowController() { | 1774 CandidateWindowController::CreateCandidateWindowController() { |
1775 return new CandidateWindowControllerImpl; | 1775 return new CandidateWindowControllerImpl; |
1776 } | 1776 } |
1777 | 1777 |
1778 } // namespace input_method | 1778 } // namespace input_method |
1779 } // namespace chromeos | 1779 } // namespace chromeos |
OLD | NEW |