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

Side by Side Diff: ui/message_center/views/message_list_view.cc

Issue 2826003002: Don't call AnimateClearingOneNotification if clearing all is already started. (Closed)
Patch Set: . Created 3 years, 8 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/location.h" 6 #include "base/location.h"
7 #include "base/single_thread_task_runner.h" 7 #include "base/single_thread_task_runner.h"
8 #include "base/threading/thread_task_runner_handle.h" 8 #include "base/threading/thread_task_runner_handle.h"
9 #include "ui/gfx/animation/slide_animation.h" 9 #include "ui/gfx/animation/slide_animation.h"
10 #include "ui/message_center/message_center_style.h" 10 #include "ui/message_center/message_center_style.h"
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 gfx::Rect child_area = GetContentsBounds(); 305 gfx::Rect child_area = GetContentsBounds();
306 if (child_area.IsEmpty()) 306 if (child_area.IsEmpty())
307 return; 307 return;
308 308
309 if (animator_.IsAnimating()) { 309 if (animator_.IsAnimating()) {
310 has_deferred_task_ = true; 310 has_deferred_task_ = true;
311 return; 311 return;
312 } 312 }
313 313
314 if (!clearing_all_views_.empty()) { 314 if (!clearing_all_views_.empty()) {
315 AnimateClearingOneNotification(); 315 if (!clear_all_started_)
316 AnimateClearingOneNotification();
316 return; 317 return;
317 } 318 }
318 319
319 int new_height = GetHeightForWidth(child_area.width() + GetInsets().width()); 320 int new_height = GetHeightForWidth(child_area.width() + GetInsets().width());
320 SetSize(gfx::Size(child_area.width() + GetInsets().width(), new_height)); 321 SetSize(gfx::Size(child_area.width() + GetInsets().width(), new_height));
321 322
322 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 323 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
323 switches::kEnableMessageCenterAlwaysScrollUpUponNotificationRemoval)) 324 switches::kEnableMessageCenterAlwaysScrollUpUponNotificationRemoval))
324 AnimateNotificationsBelowTarget(); 325 AnimateNotificationsBelowTarget();
325 else 326 else
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
533 base::TimeDelta::FromMilliseconds( 534 base::TimeDelta::FromMilliseconds(
534 kAnimateClearingNextNotificationDelayMS)); 535 kAnimateClearingNextNotificationDelayMS));
535 } 536 }
536 } 537 }
537 538
538 void MessageListView::SetRepositionTargetForTest(const gfx::Rect& target_rect) { 539 void MessageListView::SetRepositionTargetForTest(const gfx::Rect& target_rect) {
539 SetRepositionTarget(target_rect); 540 SetRepositionTarget(target_rect);
540 } 541 }
541 542
542 } // namespace message_center 543 } // namespace message_center
OLDNEW
« 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