#include "chrome/browser/ui/views/download/bubble/download_bubble_started_animation_views.h"
#include "chrome/app/vector_icons/vector_icons.h"
#include "chrome/browser/ui/views/download/download_started_animation_views.h"
#include "ui/base/metadata/metadata_header_macros.h"
#include "ui/base/metadata/metadata_impl_macros.h"
#include "ui/base/models/image_model.h"
#include "ui/gfx/geometry/size.h"
#include "ui/gfx/image/image_skia.h"
#include "ui/gfx/image/image_skia_operations.h"
#include "ui/gfx/paint_vector_icon.h"
namespace {
constexpr base::TimeDelta kAnimationDuration = …;
constexpr double kAnimationPhaseSwitchProgress = …;
constexpr int kIconSize = …;
constexpr int kIconBackgroundRadius = …;
ui::ImageModel GetDownloadIconImageModel(SkColor image_foreground_color,
SkColor image_background_color) { … }
double GetPhaseOneProgress(double current_value) { … }
double GetPhaseTwoProgress(double current_value) { … }
int GetYForPhaseOne(double phase_one_progress,
const gfx::Rect& web_contents_bounds,
const gfx::Rect& toolbar_icon_bounds,
const gfx::Size& image_size) { … }
int GetYForPhaseTwo(double phase_two_progress,
const gfx::Rect& web_contents_bounds,
const gfx::Rect& toolbar_icon_bounds,
const gfx::Size& image_size) { … }
float GetOpacityForPhaseOne(double phase_one_progress) { … }
float GetOpacityForPhaseTwo(double phase_two_progress) { … }
}
DownloadBubbleStartedAnimationViews::DownloadBubbleStartedAnimationViews(
content::WebContents* web_contents,
const gfx::Rect& toolbar_icon_bounds,
SkColor image_foreground_color,
SkColor image_background_color)
: … { … }
DownloadBubbleStartedAnimationViews::~DownloadBubbleStartedAnimationViews() =
default;
int DownloadBubbleStartedAnimationViews::GetX() const { … }
int DownloadBubbleStartedAnimationViews::GetY() const { … }
float DownloadBubbleStartedAnimationViews::GetOpacity() const { … }
bool DownloadBubbleStartedAnimationViews::WebContentsTooSmall(
const gfx::Size& image_size) const { … }
BEGIN_METADATA(…)