OLD | NEW |
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 "ash/launcher/launcher_button.h" | 5 #include "ash/launcher/launcher_button.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "ash/launcher/launcher_button_host.h" | 9 #include "ash/launcher/launcher_button_host.h" |
10 #include "grit/ui_resources.h" | 10 #include "grit/ui_resources.h" |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 return icon_view_->bounds(); | 149 return icon_view_->bounds(); |
150 } | 150 } |
151 | 151 |
152 bool LauncherButton::OnMousePressed(const views::MouseEvent& event) { | 152 bool LauncherButton::OnMousePressed(const views::MouseEvent& event) { |
153 CustomButton::OnMousePressed(event); | 153 CustomButton::OnMousePressed(event); |
154 host_->MousePressedOnButton(this, event); | 154 host_->MousePressedOnButton(this, event); |
155 return true; | 155 return true; |
156 } | 156 } |
157 | 157 |
158 void LauncherButton::OnMouseReleased(const views::MouseEvent& event) { | 158 void LauncherButton::OnMouseReleased(const views::MouseEvent& event) { |
| 159 CustomButton::OnMouseReleased(event); |
159 host_->MouseReleasedOnButton(this, false); | 160 host_->MouseReleasedOnButton(this, false); |
160 CustomButton::OnMouseReleased(event); | |
161 } | 161 } |
162 | 162 |
163 void LauncherButton::OnMouseCaptureLost() { | 163 void LauncherButton::OnMouseCaptureLost() { |
164 ClearState(STATE_HOVERED); | 164 ClearState(STATE_HOVERED); |
165 host_->MouseReleasedOnButton(this, true); | 165 host_->MouseReleasedOnButton(this, true); |
166 CustomButton::OnMouseCaptureLost(); | 166 CustomButton::OnMouseCaptureLost(); |
167 } | 167 } |
168 | 168 |
169 bool LauncherButton::OnMouseDragged(const views::MouseEvent& event) { | 169 bool LauncherButton::OnMouseDragged(const views::MouseEvent& event) { |
170 CustomButton::OnMouseDragged(event); | 170 CustomButton::OnMouseDragged(event); |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 bar_id = IDR_AURA_LAUNCHER_UNDERLINE_RUNNING; | 238 bar_id = IDR_AURA_LAUNCHER_UNDERLINE_RUNNING; |
239 | 239 |
240 bar_->SetImage(rb.GetImageNamed(bar_id).ToSkBitmap()); | 240 bar_->SetImage(rb.GetImageNamed(bar_id).ToSkBitmap()); |
241 } | 241 } |
242 | 242 |
243 Layout(); | 243 Layout(); |
244 SchedulePaint(); | 244 SchedulePaint(); |
245 } | 245 } |
246 } // namespace internal | 246 } // namespace internal |
247 } // namespace ash | 247 } // namespace ash |
OLD | NEW |