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 "ui/base/accessibility/accessible_view_state.h" | 10 #include "ui/base/accessibility/accessible_view_state.h" |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 base::TimeDelta::FromMilliseconds(kHopDownMS)); | 133 base::TimeDelta::FromMilliseconds(kHopDownMS)); |
134 state_ &= ~state; | 134 state_ &= ~state; |
135 UpdateState(); | 135 UpdateState(); |
136 } else { | 136 } else { |
137 state_ &= ~state; | 137 state_ &= ~state; |
138 UpdateState(); | 138 UpdateState(); |
139 } | 139 } |
140 } | 140 } |
141 } | 141 } |
142 | 142 |
| 143 gfx::Rect LauncherButton::GetIconBounds() const { |
| 144 return icon_view_->bounds(); |
| 145 } |
| 146 |
143 bool LauncherButton::OnMousePressed(const views::MouseEvent& event) { | 147 bool LauncherButton::OnMousePressed(const views::MouseEvent& event) { |
144 CustomButton::OnMousePressed(event); | 148 CustomButton::OnMousePressed(event); |
145 host_->MousePressedOnButton(this, event); | 149 host_->MousePressedOnButton(this, event); |
146 return true; | 150 return true; |
147 } | 151 } |
148 | 152 |
149 void LauncherButton::OnMouseReleased(const views::MouseEvent& event) { | 153 void LauncherButton::OnMouseReleased(const views::MouseEvent& event) { |
150 host_->MouseReleasedOnButton(this, false); | 154 host_->MouseReleasedOnButton(this, false); |
151 CustomButton::OnMouseReleased(event); | 155 CustomButton::OnMouseReleased(event); |
152 } | 156 } |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 bar_->set_background(views::Background::CreateSolidBackground( | 227 bar_->set_background(views::Background::CreateSolidBackground( |
224 kInactiveBarColor)); | 228 kInactiveBarColor)); |
225 } | 229 } |
226 } | 230 } |
227 | 231 |
228 Layout(); | 232 Layout(); |
229 SchedulePaint(); | 233 SchedulePaint(); |
230 } | 234 } |
231 } // namespace internal | 235 } // namespace internal |
232 } // namespace ash | 236 } // namespace ash |
OLD | NEW |