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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 | 101 |
102 /////////////////////////////////////////////////////////////////////////////// | 102 /////////////////////////////////////////////////////////////////////////////// |
103 // StickyKeysOverlayView | 103 // StickyKeysOverlayView |
104 class StickyKeysOverlayView : public views::WidgetDelegateView { | 104 class StickyKeysOverlayView : public views::WidgetDelegateView { |
105 public: | 105 public: |
106 StickyKeysOverlayView(); | 106 StickyKeysOverlayView(); |
107 | 107 |
108 virtual ~StickyKeysOverlayView(); | 108 virtual ~StickyKeysOverlayView(); |
109 | 109 |
110 // views::WidgetDelegateView overrides: | 110 // views::WidgetDelegateView overrides: |
111 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; | 111 virtual void OnPaint(gfx::Canvas* canvas) override; |
112 | 112 |
113 void SetKeyState(ui::EventFlags modifier, StickyKeyState state); | 113 void SetKeyState(ui::EventFlags modifier, StickyKeyState state); |
114 | 114 |
115 StickyKeyState GetKeyState(ui::EventFlags modifier); | 115 StickyKeyState GetKeyState(ui::EventFlags modifier); |
116 | 116 |
117 void SetModifierVisible(ui::EventFlags modifier, bool visible); | 117 void SetModifierVisible(ui::EventFlags modifier, bool visible); |
118 bool GetModifierVisible(ui::EventFlags modifier); | 118 bool GetModifierVisible(ui::EventFlags modifier); |
119 | 119 |
120 private: | 120 private: |
121 void AddKeyLabel(ui::EventFlags modifier, const std::string& key_label); | 121 void AddKeyLabel(ui::EventFlags modifier, const std::string& key_label); |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 ui::LayerAnimator* animator = overlay_widget_->GetLayer()->GetAnimator(); | 296 ui::LayerAnimator* animator = overlay_widget_->GetLayer()->GetAnimator(); |
297 if (animator) | 297 if (animator) |
298 animator->RemoveObserver(this); | 298 animator->RemoveObserver(this); |
299 } | 299 } |
300 | 300 |
301 void StickyKeysOverlay::OnLayerAnimationScheduled( | 301 void StickyKeysOverlay::OnLayerAnimationScheduled( |
302 ui::LayerAnimationSequence* sequence) { | 302 ui::LayerAnimationSequence* sequence) { |
303 } | 303 } |
304 | 304 |
305 } // namespace ash | 305 } // namespace ash |
OLD | NEW |