OLD | NEW |
---|---|
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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/common/system/tray/hover_highlight_view.h" | 5 #include "ash/common/system/tray/hover_highlight_view.h" |
6 | 6 |
7 #include "ash/common/system/tray/fixed_sized_image_view.h" | 7 #include "ash/common/system/tray/fixed_sized_image_view.h" |
8 #include "ash/common/system/tray/tray_constants.h" | 8 #include "ash/common/system/tray/tray_constants.h" |
9 #include "ash/common/system/tray/view_click_listener.h" | 9 #include "ash/common/system/tray/view_click_listener.h" |
10 #include "ui/accessibility/ax_view_state.h" | 10 #include "ui/accessibility/ax_view_state.h" |
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
272 } | 272 } |
273 | 273 |
274 void HoverHighlightView::OnEnabledChanged() { | 274 void HoverHighlightView::OnEnabledChanged() { |
275 if (!enabled()) | 275 if (!enabled()) |
276 SetHoverHighlight(false); | 276 SetHoverHighlight(false); |
277 for (int i = 0; i < child_count(); ++i) | 277 for (int i = 0; i < child_count(); ++i) |
278 child_at(i)->SetEnabled(enabled()); | 278 child_at(i)->SetEnabled(enabled()); |
279 } | 279 } |
280 | 280 |
281 void HoverHighlightView::OnPaintBackground(gfx::Canvas* canvas) { | 281 void HoverHighlightView::OnPaintBackground(gfx::Canvas* canvas) { |
282 canvas->DrawColor(hover_ ? highlight_color_ : default_color_); | 282 ActionableView::OnPaintBackground(canvas); |
varkha
2016/10/26 22:14:25
Note: scaffolding - the change will be removed in
| |
283 // canvas->DrawColor(hover_ ? highlight_color_ : default_color_); | |
283 } | 284 } |
284 | 285 |
285 void HoverHighlightView::OnFocus() { | 286 void HoverHighlightView::OnFocus() { |
286 ScrollRectToVisible(gfx::Rect(gfx::Point(), size())); | 287 ScrollRectToVisible(gfx::Rect(gfx::Point(), size())); |
287 ActionableView::OnFocus(); | 288 ActionableView::OnFocus(); |
288 } | 289 } |
289 | 290 |
290 } // namespace ash | 291 } // namespace ash |
OLD | NEW |