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

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

Issue 10832282: Replace views::MouseEvent with ui::MouseEvent (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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 | Annotate | Revision Log
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 705 matching lines...) Expand 10 before | Expand all | Expand 10 after
716 } 716 }
717 717
718 void CandidateView::SetRowEnabled(bool enabled) { 718 void CandidateView::SetRowEnabled(bool enabled) {
719 shortcut_label_->SetEnabled(enabled); 719 shortcut_label_->SetEnabled(enabled);
720 } 720 }
721 721
722 gfx::Point CandidateView::GetCandidateLabelPosition() const { 722 gfx::Point CandidateView::GetCandidateLabelPosition() const {
723 return candidate_label_->GetMirroredPosition(); 723 return candidate_label_->GetMirroredPosition();
724 } 724 }
725 725
726 bool CandidateView::OnMousePressed(const views::MouseEvent& event) { 726 bool CandidateView::OnMousePressed(const ui::MouseEvent& event) {
727 // TODO(kinaba): investigate a way to delay the commit until OnMouseReleased. 727 // TODO(kinaba): investigate a way to delay the commit until OnMouseReleased.
728 // Mouse-down selection is a temporally workaround for crosbug.com/11423. 728 // Mouse-down selection is a temporally workaround for crosbug.com/11423.
729 // 729 //
730 // Typical Windows/Mac input methods select candidates at the point of mouse- 730 // Typical Windows/Mac input methods select candidates at the point of mouse-
731 // up event. This would be implemented in our CandidateWindow like this: 731 // up event. This would be implemented in our CandidateWindow like this:
732 // 1. Return true form CandidateView::OnMousePressed, to indicate that we 732 // 1. Return true form CandidateView::OnMousePressed, to indicate that we
733 // need to capture mouse and to receive drag/mouse-up events. 733 // need to capture mouse and to receive drag/mouse-up events.
734 // 2. In response to the drag events (OnMouseDragged()), we update our 734 // 2. In response to the drag events (OnMouseDragged()), we update our
735 // selection by calling parent_candidate_window_->OOnCandidatePressed(). 735 // selection by calling parent_candidate_window_->OOnCandidatePressed().
736 // 3. In response to the mouse-up event (OnMouseReleased()), we commit the 736 // 3. In response to the mouse-up event (OnMouseReleased()), we commit the
(...skipping 1033 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 | « chrome/browser/chromeos/input_method/candidate_view.h ('k') | chrome/browser/chromeos/options/network_config_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698