blob: 4be0043a63b637b1f1585d6de52fc2f0b45b127a [file]
// Copyright 2013 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_APP_LIST_VIEWS_PROGRESS_BAR_VIEW_H_
#define UI_APP_LIST_VIEWS_PROGRESS_BAR_VIEW_H_
#include <memory>
#include "base/macros.h"
#include "ui/views/controls/progress_bar.h"
namespace views {
class Painter;
}
namespace app_list {
// ProgressBarView implements an image-based progress bar for app launcher.
class ProgressBarView : public views::ProgressBar {
public:
ProgressBarView();
~ProgressBarView() override;
// views::View overrides:
gfx::Size GetPreferredSize() const override;
void OnPaint(gfx::Canvas* canvas) override;
private:
std::unique_ptr<views::Painter> background_painter_;
std::unique_ptr<views::Painter> bar_painter_;
DISALLOW_COPY_AND_ASSIGN(ProgressBarView);
};
} // namespace app_list
#endif // UI_APP_LIST_VIEWS_PROGRESS_BAR_VIEW_H_