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

Side by Side Diff: ui/message_center/views/notification_progress_bar.h

Issue 1447933002: Implement an indeterminate progress-bar (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef UI_MESSAGE_CENTER_VIEWS_NOTIFICATION_PROGRESS_BAR_H_
6 #define UI_MESSAGE_CENTER_VIEWS_NOTIFICATION_PROGRESS_BAR_H_
7
8 #include "base/macros.h"
9 #include "ui/gfx/animation/animation_delegate.h"
10 #include "ui/gfx/animation/slide_animation.h"
11 #include "ui/gfx/geometry/size.h"
12 #include "ui/message_center/message_center_export.h"
13 #include "ui/views/controls/progress_bar.h"
14
15 namespace message_center {
16
17 class MESSAGE_CENTER_EXPORT NotificationProgressBar
18 : public views::ProgressBar, public gfx::AnimationDelegate {
19 public:
20 NotificationProgressBar();
21 ~NotificationProgressBar() override;
22
23 void SetIndeterminate(bool is_indeteminate);
24
25 private:
26 // Overriden from views::ProgressBar (originally from views::View)
27 gfx::Size GetPreferredSize() const override;
28 void OnPaint(gfx::Canvas* canvas) override;
29
30 // Overriden from gfx::AnimationDelegate
31 void AnimationProgressed(const gfx::Animation* animation) override;
32 void AnimationEnded(const gfx::Animation* animation) override;
33
34 scoped_ptr<gfx::LinearAnimation> indeterminate_bar_animation_;
35
36 DISALLOW_COPY_AND_ASSIGN(NotificationProgressBar);
37 };
38
39 } // namespace message_center
40
41 #endif // UI_MESSAGE_CENTER_VIEWS_NOTIFICATION_PROGRESS_BAR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698