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

Side by Side Diff: chrome/browser/chromeos/input_method/candidate_window.cc

Issue 10827198: Change View::HitTest to View::HitTestRect (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixed errors reported by trybots Created 8 years, 4 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 unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « ash/launcher/launcher_button.cc ('k') | chrome/browser/ui/views/ash/browser_non_client_frame_view_ash.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698