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 14ad5be0b192420816eade0f2d918cc8d801594a..519b582be8beea39a819e9adf270cbdec6899dc8 100644 |
--- a/chrome/browser/chromeos/input_method/candidate_window.cc |
+++ b/chrome/browser/chromeos/input_method/candidate_window.cc |
@@ -528,15 +528,11 @@ class CandidateView : public views::View { |
gfx::Point GetCandidateLabelPosition() const; |
private: |
- // View::OnMousePressed() implementation. |
- virtual bool OnMousePressed(const views::MouseEvent& event); |
- |
- // View::OnMouseDragged() implementation. |
- virtual bool OnMouseDragged(const views::MouseEvent& event); |
- |
- // View::OnMouseReleased() implementation. |
- virtual void OnMouseReleased(const views::MouseEvent& event, |
- bool canceled); |
+ // Overridden from View: |
+ virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE; |
+ virtual bool OnMouseDragged(const views::MouseEvent& event) OVERRIDE; |
+ virtual void OnMouseReleased(const views::MouseEvent& event) OVERRIDE; |
+ virtual void OnMouseCaptureLost() OVERRIDE; |
// Zero-origin index in the current page. |
int index_in_page_; |
@@ -735,12 +731,13 @@ bool CandidateView::OnMouseDragged(const views::MouseEvent& event) { |
return true; |
} |
-void CandidateView::OnMouseReleased(const views::MouseEvent& event, |
- bool canceled) { |
- // Commit the current candidate unless it's canceled. |
- if (!canceled) { |
- parent_candidate_window_->CommitCandidate(); |
- } |
+void CandidateView::OnMouseReleased(const views::MouseEvent& event) { |
+ // Commit the current candidate. |
+ parent_candidate_window_->CommitCandidate(); |
+ OnMouseCaptureLost(); |
+} |
+ |
+void CandidateView::OnMouseCaptureLost() { |
parent_candidate_window_->OnMouseReleased(); |
} |