| 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/shell.h" | 7 #include "ash/shell.h" |
| 8 #include "ash/shell_window_ids.h" | 8 #include "ash/shell_window_ids.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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 SetLayoutManager(new views::BoxLayout(views::BoxLayout::kVertical, | 154 SetLayoutManager(new views::BoxLayout(views::BoxLayout::kVertical, |
| 155 horizontal_spacing, | 155 horizontal_spacing, |
| 156 vertical_spacing, | 156 vertical_spacing, |
| 157 child_spacing)); | 157 child_spacing)); |
| 158 AddKeyLabel(ui::EF_CONTROL_DOWN, | 158 AddKeyLabel(ui::EF_CONTROL_DOWN, |
| 159 l10n_util::GetStringUTF8(IDS_ASH_CONTROL_KEY)); | 159 l10n_util::GetStringUTF8(IDS_ASH_CONTROL_KEY)); |
| 160 AddKeyLabel(ui::EF_ALT_DOWN, | 160 AddKeyLabel(ui::EF_ALT_DOWN, |
| 161 l10n_util::GetStringUTF8(IDS_ASH_ALT_KEY)); | 161 l10n_util::GetStringUTF8(IDS_ASH_ALT_KEY)); |
| 162 AddKeyLabel(ui::EF_SHIFT_DOWN, | 162 AddKeyLabel(ui::EF_SHIFT_DOWN, |
| 163 l10n_util::GetStringUTF8(IDS_ASH_SHIFT_KEY)); | 163 l10n_util::GetStringUTF8(IDS_ASH_SHIFT_KEY)); |
| 164 AddKeyLabel(ui::EF_ALTGR_DOWN, |
| 165 l10n_util::GetStringUTF8(IDS_ASH_ALTGR_KEY)); |
| 164 } | 166 } |
| 165 | 167 |
| 166 StickyKeysOverlayView::~StickyKeysOverlayView() {} | 168 StickyKeysOverlayView::~StickyKeysOverlayView() {} |
| 167 | 169 |
| 168 void StickyKeysOverlayView::OnPaint(gfx::Canvas* canvas) { | 170 void StickyKeysOverlayView::OnPaint(gfx::Canvas* canvas) { |
| 169 SkPaint paint; | 171 SkPaint paint; |
| 170 paint.setStyle(SkPaint::kFill_Style); | 172 paint.setStyle(SkPaint::kFill_Style); |
| 171 paint.setColor(SkColorSetARGB(0xB3, 0x55, 0x55, 0x55)); | 173 paint.setColor(SkColorSetARGB(0xB3, 0x55, 0x55, 0x55)); |
| 172 canvas->DrawRoundRect(GetLocalBounds(), 2, paint); | 174 canvas->DrawRoundRect(GetLocalBounds(), 2, paint); |
| 173 views::WidgetDelegateView::OnPaint(canvas); | 175 views::WidgetDelegateView::OnPaint(canvas); |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 ui::LayerAnimator* animator = overlay_widget_->GetLayer()->GetAnimator(); | 286 ui::LayerAnimator* animator = overlay_widget_->GetLayer()->GetAnimator(); |
| 285 if (animator) | 287 if (animator) |
| 286 animator->RemoveObserver(this); | 288 animator->RemoveObserver(this); |
| 287 } | 289 } |
| 288 | 290 |
| 289 void StickyKeysOverlay::OnLayerAnimationScheduled( | 291 void StickyKeysOverlay::OnLayerAnimationScheduled( |
| 290 ui::LayerAnimationSequence* sequence) { | 292 ui::LayerAnimationSequence* sequence) { |
| 291 } | 293 } |
| 292 | 294 |
| 293 } // namespace ash | 295 } // namespace ash |
| OLD | NEW |