Index: ui/message_center/views/notification_progress_bar.h |
diff --git a/ui/message_center/views/notification_progress_bar.h b/ui/message_center/views/notification_progress_bar.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..e4c2dc5dc59189c9b2bdb0c345f234b5e4668561 |
--- /dev/null |
+++ b/ui/message_center/views/notification_progress_bar.h |
@@ -0,0 +1,41 @@ |
+// Copyright 2015 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef UI_MESSAGE_CENTER_VIEWS_NOTIFICATION_PROGRESS_BAR_H_ |
+#define UI_MESSAGE_CENTER_VIEWS_NOTIFICATION_PROGRESS_BAR_H_ |
+ |
+#include "base/macros.h" |
+#include "ui/gfx/animation/animation_delegate.h" |
+#include "ui/gfx/animation/slide_animation.h" |
+#include "ui/gfx/geometry/size.h" |
+#include "ui/message_center/message_center_export.h" |
+#include "ui/views/controls/progress_bar.h" |
+ |
+namespace message_center { |
+ |
+class MESSAGE_CENTER_EXPORT NotificationProgressBar |
+ : public views::ProgressBar, public gfx::AnimationDelegate { |
+ public: |
+ NotificationProgressBar(); |
+ ~NotificationProgressBar() override; |
+ |
+ void SetIndeterminate(bool is_indeteminate); |
+ |
+ private: |
+ // Overriden from views::ProgressBar (originally from views::View) |
+ gfx::Size GetPreferredSize() const override; |
+ void OnPaint(gfx::Canvas* canvas) override; |
+ |
+ // Overriden from gfx::AnimationDelegate |
+ void AnimationProgressed(const gfx::Animation* animation) override; |
+ void AnimationEnded(const gfx::Animation* animation) override; |
+ |
+ scoped_ptr<gfx::LinearAnimation> indeterminate_bar_animation_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(NotificationProgressBar); |
+}; |
+ |
+} // namespace message_center |
+ |
+#endif // UI_MESSAGE_CENTER_VIEWS_NOTIFICATION_PROGRESS_BAR_H_ |