chromium/chrome/browser/ui/views/download/bubble/download_bubble_started_animation_views.cc

// Copyright 2023 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#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 {

// The animation is piecewise linear, composed of 2 phases, phase one is 300 ms
// and phase two is 200 ms.
constexpr base::TimeDelta kAnimationDuration =;
constexpr double kAnimationPhaseSwitchProgress =;
constexpr int kIconSize =;
constexpr int kIconBackgroundRadius =;

ui::ImageModel GetDownloadIconImageModel(SkColor image_foreground_color,
                                         SkColor image_background_color) {}

// Rescales the current progress value of the animation such that the progress
// goes from 0.0 to 1.0 within phase one.
double GetPhaseOneProgress(double current_value) {}

// Rescales the current progress value of the animation such that the progress
// goes from 0.0 to 1.0 within phase two.
double GetPhaseTwoProgress(double current_value) {}

// Breaks down the y-axis movement for each phase for simplicity.
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) {}

// Breaks down the opacity changes for each phase for simplicity.
float GetOpacityForPhaseOne(double phase_one_progress) {}

float GetOpacityForPhaseTwo(double phase_two_progress) {}

}  // namespace

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()