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

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: 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..32285a1fc6fcc63a9be876c2fb8fb1253b3994d0 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(views::View* parent)
+ : parent_(parent),
+ target_(NULL) {
}
virtual ~HideViewAnimationObserver() {
@@ -107,9 +109,13 @@ class HideViewAnimationObserver : public ui::ImplicitAnimationObserver {
if (target_) {
target_->SetVisible(false);
target_ = NULL;
+
+ // Should update the background by invoking SchedulePaint().
+ parent_->SchedulePaint();
xiyuan 2014/01/15 01:22:05 Think we should use app_list_view_->GetBubbleFrame
Jun Mukai 2014/01/15 02:03:44 Done.
}
}
+ views::View* parent_;
views::View* target_;
DISALLOW_COPY_AND_ASSIGN(HideViewAnimationObserver);
@@ -123,7 +129,7 @@ AppListView::AppListView(AppListViewDelegate* delegate)
app_list_main_view_(NULL),
signin_view_(NULL),
speech_view_(NULL),
- animation_observer_(new HideViewAnimationObserver()) {
+ animation_observer_(new HideViewAnimationObserver(this)) {
CHECK(delegate);
delegate_->AddObserver(this);
@@ -477,10 +483,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();
xiyuan 2014/01/15 01:22:05 Let's use GetBubbleFrameView()->SchedulePaint() in
Jun Mukai 2014/01/15 02:03:44 Done.
+#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