OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "chrome/browser/chromeos/ui/focus_ring_layer.h" | 5 #include "chrome/browser/chromeos/ui/focus_ring_layer.h" |
6 | 6 |
7 #include "ash/system/tray/actionable_view.h" | 7 #include "ash/system/tray/actionable_view.h" |
8 #include "ash/system/tray/tray_background_view.h" | 8 #include "ash/system/tray/tray_background_view.h" |
9 #include "ash/system/tray/tray_popup_header_button.h" | 9 #include "ash/system/tray/tray_popup_header_button.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 int r = kShadowRadius; | 117 int r = kShadowRadius; |
118 for (int i = 0; i < r; i++) { | 118 for (int i = 0; i < r; i++) { |
119 // Fade out alpha quadratically. | 119 // Fade out alpha quadratically. |
120 paint.setAlpha((kShadowAlpha * (r - i) * (r - i)) / (r * r)); | 120 paint.setAlpha((kShadowAlpha * (r - i) * (r - i)) / (r * r)); |
121 gfx::Rect outsetRect = bounds; | 121 gfx::Rect outsetRect = bounds; |
122 outsetRect.Inset(-i, -i, -i, -i); | 122 outsetRect.Inset(-i, -i, -i, -i); |
123 canvas->DrawRect(outsetRect, paint); | 123 canvas->DrawRect(outsetRect, paint); |
124 } | 124 } |
125 } | 125 } |
126 | 126 |
| 127 void FocusRingLayer::OnDelegatedFrameDamage( |
| 128 const gfx::Rect& damage_rect_in_dip) { |
| 129 } |
| 130 |
127 void FocusRingLayer::OnDeviceScaleFactorChanged(float device_scale_factor) { | 131 void FocusRingLayer::OnDeviceScaleFactorChanged(float device_scale_factor) { |
128 Update(); | 132 Update(); |
129 } | 133 } |
130 | 134 |
131 base::Closure FocusRingLayer::PrepareForLayerBoundsChange() { | 135 base::Closure FocusRingLayer::PrepareForLayerBoundsChange() { |
132 return base::Bind(&base::DoNothing); | 136 return base::Bind(&base::DoNothing); |
133 } | 137 } |
134 | 138 |
135 } // namespace chromeos | 139 } // namespace chromeos |
OLD | NEW |