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

Unified Diff: chrome/browser/chromeos/input_method/candidate_window.cc

Issue 6685069: Disambiguate OnMouseCaptureLost from OnMouseReleased, etc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address most TODOs and sync. Created 9 years, 9 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 side-by-side diff with in-line comments
Download patch
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 aacee58a0bef9876fd148ab63655b80c44291e76..0b14ffc02ae9a3fa695864a0474a3b2d38f77085 100644
--- a/chrome/browser/chromeos/input_method/candidate_window.cc
+++ b/chrome/browser/chromeos/input_method/candidate_window.cc
@@ -527,17 +527,13 @@ class CandidateView : public views::View {
// Returns the relative position of the candidate label.
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:
sadrul 2011/03/19 09:15:30 views::View Why are these moved from private to p
msw 2011/03/26 00:09:50 Done.
+ 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;
+ private:
// 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();
+ parent_candidate_window_->OnMouseReleased();
+}
+
+void CandidateView::OnMouseCaptureLost() {
parent_candidate_window_->OnMouseReleased();
}

Powered by Google App Engine
This is Rietveld 408576698