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

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 comments, fix tests, cleanup, etc. 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
« no previous file with comments | « chrome/browser/chromeos/frame/panel_controller.cc ('k') | chrome/browser/chromeos/panels/panel_scroller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
}
« no previous file with comments | « chrome/browser/chromeos/frame/panel_controller.cc ('k') | chrome/browser/chromeos/panels/panel_scroller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698