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_controller.h" | 5 #include "chrome/browser/chromeos/ui/focus_ring_controller.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 "ash/wm/window_util.h" | 10 #include "ash/wm/window_util.h" |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 // Update the focus ring layer. | 91 // Update the focus ring layer. |
92 if (!focus_ring_layer_) | 92 if (!focus_ring_layer_) |
93 focus_ring_layer_.reset(new FocusRingLayer(this)); | 93 focus_ring_layer_.reset(new FocusRingLayer(this)); |
94 focus_ring_layer_->Set(root_window, view_bounds); | 94 focus_ring_layer_->Set(root_window, view_bounds); |
95 } | 95 } |
96 | 96 |
97 void FocusRingController::OnDeviceScaleFactorChanged() { | 97 void FocusRingController::OnDeviceScaleFactorChanged() { |
98 UpdateFocusRing(); | 98 UpdateFocusRing(); |
99 } | 99 } |
100 | 100 |
| 101 void FocusRingController::OnAnimationStep(base::TimeTicks timestamp) {} |
| 102 |
101 void FocusRingController::SetWidget(views::Widget* widget) { | 103 void FocusRingController::SetWidget(views::Widget* widget) { |
102 if (widget_) { | 104 if (widget_) { |
103 widget_->RemoveObserver(this); | 105 widget_->RemoveObserver(this); |
104 if (widget_->GetFocusManager()) | 106 if (widget_->GetFocusManager()) |
105 widget_->GetFocusManager()->RemoveFocusChangeListener(this); | 107 widget_->GetFocusManager()->RemoveFocusChangeListener(this); |
106 } | 108 } |
107 | 109 |
108 widget_ = widget; | 110 widget_ = widget; |
109 | 111 |
110 if (widget_) { | 112 if (widget_) { |
(...skipping 26 matching lines...) Expand all Loading... |
137 views::View* focused_now) { | 139 views::View* focused_now) { |
138 } | 140 } |
139 | 141 |
140 void FocusRingController::OnDidChangeFocus(views::View* focused_before, | 142 void FocusRingController::OnDidChangeFocus(views::View* focused_before, |
141 views::View* focused_now) { | 143 views::View* focused_now) { |
142 DCHECK_EQ(focused_now, widget_->GetFocusManager()->GetFocusedView()); | 144 DCHECK_EQ(focused_now, widget_->GetFocusManager()->GetFocusedView()); |
143 UpdateFocusRing(); | 145 UpdateFocusRing(); |
144 } | 146 } |
145 | 147 |
146 } // namespace chromeos | 148 } // namespace chromeos |
OLD | NEW |