Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(67)

Unified Diff: ui/app_list/views/app_list_view.cc

Issue 138273006: Invokes SchedulePaint when animation ended to repaint the background. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/app_list/views/app_list_view.cc
diff --git a/ui/app_list/views/app_list_view.cc b/ui/app_list/views/app_list_view.cc
index aeb8e36378d4bc7dcf2f4e1e2c3596bc7779aa81..7f68a3f5616bdb83067735970623fab2ac2fe958 100644
--- a/ui/app_list/views/app_list_view.cc
+++ b/ui/app_list/views/app_list_view.cc
@@ -87,7 +87,9 @@ bool SupportsShadow() {
// An animation observer to hide the view at the end of the animation.
class HideViewAnimationObserver : public ui::ImplicitAnimationObserver {
public:
- HideViewAnimationObserver() : target_(NULL) {
+ HideViewAnimationObserver()
+ : frame_(NULL),
+ target_(NULL) {
}
virtual ~HideViewAnimationObserver() {
@@ -101,15 +103,21 @@ class HideViewAnimationObserver : public ui::ImplicitAnimationObserver {
target_ = target;
}
+ void set_frame(views::BubbleFrameView* frame) { frame_ = frame; }
+
private:
// Overridden from ui::ImplicitAnimationObserver:
virtual void OnImplicitAnimationsCompleted() OVERRIDE {
if (target_) {
target_->SetVisible(false);
target_ = NULL;
+
+ // Should update the background by invoking SchedulePaint().
+ frame_->SchedulePaint();
}
}
+ views::BubbleFrameView* frame_;
views::View* target_;
DISALLOW_COPY_AND_ASSIGN(HideViewAnimationObserver);
@@ -439,6 +447,7 @@ void AppListView::OnSpeechRecognitionStateChanged(
speech_view_->Reset();
#if defined(USE_AURA)
+ animation_observer_->set_frame(GetBubbleFrameView());
gfx::Transform speech_transform;
speech_transform.Translate(
0, SkFloatToMScalar(kSpeechUIAppearingPosition));
@@ -477,10 +486,10 @@ void AppListView::OnSpeechRecognitionStateChanged(
#else
speech_view_->SetVisible(recognizing);
app_list_main_view_->SetVisible(!recognizing);
-#endif
// Needs to schedule paint of AppListView itself, to repaint the background.
- SchedulePaint();
+ GetBubbleFrameView()->SchedulePaint();
+#endif
}
} // namespace app_list
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698