OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 695 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
706 set_border(NULL); | 706 set_border(NULL); |
707 SchedulePaint(); // See comments at Select(). | 707 SchedulePaint(); // See comments at Select(). |
708 } | 708 } |
709 | 709 |
710 void CandidateView::SetRowEnabled(bool enabled) { | 710 void CandidateView::SetRowEnabled(bool enabled) { |
711 shortcut_label_->SetColor( | 711 shortcut_label_->SetColor( |
712 enabled ? kShortcutColor : kDisabledShortcutColor); | 712 enabled ? kShortcutColor : kDisabledShortcutColor); |
713 } | 713 } |
714 | 714 |
715 gfx::Point CandidateView::GetCandidateLabelPosition() const { | 715 gfx::Point CandidateView::GetCandidateLabelPosition() const { |
716 return candidate_label_->GetPosition(); | 716 return candidate_label_->GetMirroredPosition(); |
717 } | 717 } |
718 | 718 |
719 bool CandidateView::OnMousePressed(const views::MouseEvent& event) { | 719 bool CandidateView::OnMousePressed(const views::MouseEvent& event) { |
720 parent_candidate_window_->OnMousePressed(); | 720 parent_candidate_window_->OnMousePressed(); |
721 // Select the candidate. We'll commit the candidate when the mouse | 721 // Select the candidate. We'll commit the candidate when the mouse |
722 // button is released. | 722 // button is released. |
723 parent_candidate_window_->SelectCandidateAt(index_in_page_); | 723 parent_candidate_window_->SelectCandidateAt(index_in_page_); |
724 // Request MouseDraggged and MouseReleased events. | 724 // Request MouseDraggged and MouseReleased events. |
725 return true; | 725 return true; |
726 } | 726 } |
(...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1418 | 1418 |
1419 CandidateWindowController::~CandidateWindowController() { | 1419 CandidateWindowController::~CandidateWindowController() { |
1420 delete impl_; | 1420 delete impl_; |
1421 } | 1421 } |
1422 | 1422 |
1423 bool CandidateWindowController::Init() { | 1423 bool CandidateWindowController::Init() { |
1424 return impl_->Init(); | 1424 return impl_->Init(); |
1425 } | 1425 } |
1426 | 1426 |
1427 } // namespace chromeos | 1427 } // namespace chromeos |
OLD | NEW |