OLD | NEW |
---|---|
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 #ifndef ASH_SHELF_VOICE_INTERACTION_OVERLAY_H_ | 5 #ifndef ASH_SHELF_VOICE_INTERACTION_OVERLAY_H_ |
6 #define ASH_SHELF_VOICE_INTERACTION_OVERLAY_H_ | 6 #define ASH_SHELF_VOICE_INTERACTION_OVERLAY_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "ui/compositor/layer_animation_observer.h" | 12 #include "ui/compositor/layer_animation_observer.h" |
13 #include "ui/views/animation/ink_drop_painted_layer_delegates.h" | 13 #include "ui/views/animation/ink_drop_painted_layer_delegates.h" |
14 #include "ui/views/view.h" | 14 #include "ui/views/view.h" |
15 | 15 |
16 namespace ui { | |
17 class CallbackLayerAnimationObserver; | |
18 } // namespace ui | |
19 | |
16 namespace ash { | 20 namespace ash { |
17 | 21 |
18 class AppListButton; | 22 class AppListButton; |
23 class VoiceInteractionIconBackground; | |
19 | 24 |
20 class ASH_EXPORT VoiceInteractionOverlay : public views::View { | 25 class ASH_EXPORT VoiceInteractionOverlay : public views::View { |
21 public: | 26 public: |
22 explicit VoiceInteractionOverlay(AppListButton* host_view); | 27 explicit VoiceInteractionOverlay(AppListButton* host_view); |
23 ~VoiceInteractionOverlay() override; | 28 ~VoiceInteractionOverlay() override; |
24 | 29 |
25 void StartAnimation(); | 30 void StartAnimation(bool show_icon); |
26 void EndAnimation(); | 31 void EndAnimation(); |
27 void BurstAnimation(); | 32 void BurstAnimation(); |
33 void HideAnimation(); | |
34 bool IsBursting() { return is_bursting_; } | |
oshima
2017/07/06 19:23:55
is_bustring() const
| |
28 | 35 |
29 private: | 36 private: |
37 bool AnimationEndedCallback( | |
38 const ui::CallbackLayerAnimationObserver& observer); | |
39 | |
30 std::unique_ptr<ui::Layer> ripple_layer_; | 40 std::unique_ptr<ui::Layer> ripple_layer_; |
31 std::unique_ptr<ui::Layer> icon_layer_; | 41 std::unique_ptr<ui::Layer> icon_layer_; |
32 std::unique_ptr<ui::Layer> background_layer_; | 42 std::unique_ptr<VoiceInteractionIconBackground> background_layer_; |
33 | 43 |
34 AppListButton* host_view_; | 44 AppListButton* host_view_; |
35 | 45 |
36 // Indiates the current animation is in the bursting phase, which means no | 46 // Indiates the current animation is in the bursting phase, which means no |
37 // turning back. | 47 // turning back. |
38 bool is_bursting_; | 48 bool is_bursting_; |
39 | 49 |
50 bool show_icon_; | |
51 | |
52 bool should_hide_animation_; | |
53 | |
40 views::CircleLayerDelegate circle_layer_delegate_; | 54 views::CircleLayerDelegate circle_layer_delegate_; |
41 | 55 |
42 DISALLOW_COPY_AND_ASSIGN(VoiceInteractionOverlay); | 56 DISALLOW_COPY_AND_ASSIGN(VoiceInteractionOverlay); |
43 }; | 57 }; |
44 | 58 |
45 } // namespace ash | 59 } // namespace ash |
46 #endif // ASH_SHELF_VOICE_INTERACTION_OVERLAY_H_ | 60 #endif // ASH_SHELF_VOICE_INTERACTION_OVERLAY_H_ |
OLD | NEW |