OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/sticky_keys/sticky_keys_overlay.h" | 5 #include "ash/sticky_keys/sticky_keys_overlay.h" |
6 | 6 |
7 #include "ash/public/cpp/shell_window_ids.h" | 7 #include "ash/public/cpp/shell_window_ids.h" |
8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
9 #include "ash/sticky_keys/sticky_keys_controller.h" | 9 #include "ash/sticky_keys/sticky_keys_controller.h" |
10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 AddKeyLabel(ui::EF_SHIFT_DOWN, l10n_util::GetStringUTF8(IDS_ASH_SHIFT_KEY)); | 150 AddKeyLabel(ui::EF_SHIFT_DOWN, l10n_util::GetStringUTF8(IDS_ASH_SHIFT_KEY)); |
151 AddKeyLabel(ui::EF_COMMAND_DOWN, | 151 AddKeyLabel(ui::EF_COMMAND_DOWN, |
152 l10n_util::GetStringUTF8(IDS_ASH_SEARCH_KEY)); | 152 l10n_util::GetStringUTF8(IDS_ASH_SEARCH_KEY)); |
153 AddKeyLabel(ui::EF_ALTGR_DOWN, l10n_util::GetStringUTF8(IDS_ASH_ALTGR_KEY)); | 153 AddKeyLabel(ui::EF_ALTGR_DOWN, l10n_util::GetStringUTF8(IDS_ASH_ALTGR_KEY)); |
154 AddKeyLabel(ui::EF_MOD3_DOWN, l10n_util::GetStringUTF8(IDS_ASH_MOD3_KEY)); | 154 AddKeyLabel(ui::EF_MOD3_DOWN, l10n_util::GetStringUTF8(IDS_ASH_MOD3_KEY)); |
155 } | 155 } |
156 | 156 |
157 StickyKeysOverlayView::~StickyKeysOverlayView() {} | 157 StickyKeysOverlayView::~StickyKeysOverlayView() {} |
158 | 158 |
159 void StickyKeysOverlayView::OnPaint(gfx::Canvas* canvas) { | 159 void StickyKeysOverlayView::OnPaint(gfx::Canvas* canvas) { |
160 SkPaint paint; | 160 cc::PaintFlags paint; |
161 paint.setStyle(SkPaint::kFill_Style); | 161 paint.setStyle(cc::PaintFlags::kFill_Style); |
162 paint.setColor(SkColorSetARGB(0xB3, 0x55, 0x55, 0x55)); | 162 paint.setColor(SkColorSetARGB(0xB3, 0x55, 0x55, 0x55)); |
163 canvas->DrawRoundRect(GetLocalBounds(), 2, paint); | 163 canvas->DrawRoundRect(GetLocalBounds(), 2, paint); |
164 views::View::OnPaint(canvas); | 164 views::View::OnPaint(canvas); |
165 } | 165 } |
166 | 166 |
167 void StickyKeysOverlayView::SetKeyState(ui::EventFlags modifier, | 167 void StickyKeysOverlayView::SetKeyState(ui::EventFlags modifier, |
168 StickyKeyState state) { | 168 StickyKeyState state) { |
169 ModifierLabelMap::iterator it = modifier_label_map_.find(modifier); | 169 ModifierLabelMap::iterator it = modifier_label_map_.find(modifier); |
170 DCHECK(it != modifier_label_map_.end()); | 170 DCHECK(it != modifier_label_map_.end()); |
171 if (it != modifier_label_map_.end()) { | 171 if (it != modifier_label_map_.end()) { |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 ui::LayerAnimationSequence* sequence) { | 306 ui::LayerAnimationSequence* sequence) { |
307 ui::LayerAnimator* animator = overlay_widget_->GetLayer()->GetAnimator(); | 307 ui::LayerAnimator* animator = overlay_widget_->GetLayer()->GetAnimator(); |
308 if (animator) | 308 if (animator) |
309 animator->RemoveObserver(this); | 309 animator->RemoveObserver(this); |
310 } | 310 } |
311 | 311 |
312 void StickyKeysOverlay::OnLayerAnimationScheduled( | 312 void StickyKeysOverlay::OnLayerAnimationScheduled( |
313 ui::LayerAnimationSequence* sequence) {} | 313 ui::LayerAnimationSequence* sequence) {} |
314 | 314 |
315 } // namespace ash | 315 } // namespace ash |
OLD | NEW |