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

Side by Side Diff: ui/app_list/views/progress_bar_view.h

Issue 2329633003: Implement progress bar spec (determinate and indeterminate). (Closed)
Patch Set: better example code Created 4 years, 3 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
OLDNEW
(Empty)
1 // Copyright 2013 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_APP_LIST_VIEWS_PROGRESS_BAR_VIEW_H_
6 #define UI_APP_LIST_VIEWS_PROGRESS_BAR_VIEW_H_
7
8 #include <memory>
9
10 #include "base/macros.h"
11 #include "ui/views/controls/progress_bar.h"
12
13 namespace views {
14 class Painter;
15 }
16
17 namespace app_list {
18
19 // ProgressBarView implements an image-based progress bar for app launcher.
20 class ProgressBarView : public views::ProgressBar {
21 public:
22 ProgressBarView();
23 ~ProgressBarView() override;
24
25 // views::View overrides:
26 gfx::Size GetPreferredSize() const override;
27 void OnPaint(gfx::Canvas* canvas) override;
28
29 private:
30 std::unique_ptr<views::Painter> background_painter_;
31 std::unique_ptr<views::Painter> bar_painter_;
32
33 DISALLOW_COPY_AND_ASSIGN(ProgressBarView);
34 };
35
36 } // namespace app_list
37
38 #endif // UI_APP_LIST_VIEWS_PROGRESS_BAR_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698