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/system/tray/tray_background_view.h" | 5 #include "ash/system/tray/tray_background_view.h" |
6 | 6 |
7 #include "ash/launcher/background_animator.h" | 7 #include "ash/launcher/background_animator.h" |
8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
9 #include "ash/shell_window_ids.h" | 9 #include "ash/shell_window_ids.h" |
10 #include "ash/system/status_area_widget.h" | 10 #include "ash/system/status_area_widget.h" |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 | 153 |
154 void TrayBackgroundView::OnMouseExited(const views::MouseEvent& event) { | 154 void TrayBackgroundView::OnMouseExited(const views::MouseEvent& event) { |
155 hover_background_animator_.SetPaintsBackground(false, | 155 hover_background_animator_.SetPaintsBackground(false, |
156 internal::BackgroundAnimator::CHANGE_ANIMATE); | 156 internal::BackgroundAnimator::CHANGE_ANIMATE); |
157 } | 157 } |
158 | 158 |
159 void TrayBackgroundView::ChildPreferredSizeChanged(views::View* child) { | 159 void TrayBackgroundView::ChildPreferredSizeChanged(views::View* child) { |
160 PreferredSizeChanged(); | 160 PreferredSizeChanged(); |
161 } | 161 } |
162 | 162 |
163 bool TrayBackgroundView::PerformAction(const views::Event& event) { | 163 bool TrayBackgroundView::PerformAction(const ui::Event& event) { |
164 return false; | 164 return false; |
165 } | 165 } |
166 | 166 |
167 void TrayBackgroundView::UpdateBackground(int alpha) { | 167 void TrayBackgroundView::UpdateBackground(int alpha) { |
168 if (background_) { | 168 if (background_) { |
169 background_->set_alpha(hide_background_animator_.alpha() + | 169 background_->set_alpha(hide_background_animator_.alpha() + |
170 hover_background_animator_.alpha()); | 170 hover_background_animator_.alpha()); |
171 } | 171 } |
172 SchedulePaint(); | 172 SchedulePaint(); |
173 } | 173 } |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 } else { | 210 } else { |
211 set_border(views::Border::CreateEmptyBorder( | 211 set_border(views::Border::CreateEmptyBorder( |
212 0, kPaddingFromInnerEdgeOfLauncherVerticalAlignment, | 212 0, kPaddingFromInnerEdgeOfLauncherVerticalAlignment, |
213 on_edge ? kPaddingFromBottomOfScreenVerticalAlignment : 0, | 213 on_edge ? kPaddingFromBottomOfScreenVerticalAlignment : 0, |
214 kPaddingFromOuterEdgeOfLauncherVerticalAlignment)); | 214 kPaddingFromOuterEdgeOfLauncherVerticalAlignment)); |
215 } | 215 } |
216 } | 216 } |
217 | 217 |
218 } // namespace internal | 218 } // namespace internal |
219 } // namespace ash | 219 } // namespace ash |
OLD | NEW |