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

Unified Diff: athena/home/minimized_home.cc

Issue 404613004: Introduces mouse event handler to the minimized home. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: athena/home/minimized_home.cc
diff --git a/athena/home/minimized_home.cc b/athena/home/minimized_home.cc
index 48018f35409f53fd3edf59d90478569108b99390..b3805d3643ac43296a6faea7061667e470c37c3d 100644
--- a/athena/home/minimized_home.cc
+++ b/athena/home/minimized_home.cc
@@ -39,6 +39,23 @@ class MinimizedHomeView : public views::View {
return gfx::Size(kDragHandleWidth, kDragHandleHeight);
}
+ virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE {
+ if (event.IsLeftMouseButton() && event.GetClickCount() > 1) {
+ delegate_->OnDragUpCompleted();
+ SetColor(kDragHandleColorNormal);
+ return true;
+ }
+ return false;
+ }
+
+ virtual void OnMouseEntered(const ui::MouseEvent& event) OVERRIDE {
+ SetColor(kDragHandleColorHot);
+ }
+
+ virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE {
+ SetColor(kDragHandleColorNormal);
+ }
+
virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE {
SkColor change_color = SK_ColorTRANSPARENT;
if (event->type() == ui::ET_GESTURE_BEGIN &&
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698