chromium/content/browser/download/download_item_utils.cc

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

#include "content/public/browser/download_item_utils.h"

#include "base/memory/raw_ptr.h"
#include "components/download/public/common/download_item.h"
#include "content/public/browser/global_routing_id.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_observer.h"

namespace content {

namespace {

// This is a UserData::Data that will be attached to a DownloadItem as a
// side-channel for passing WebContents and BrowserContext.
class DownloadItemData : public base::SupportsUserData::Data,
                         public WebContentsObserver {};

// static
const char DownloadItemData::kKey[] =;

DownloadItemData::DownloadItemData(BrowserContext* browser_context,
                                   WebContents* web_contents,
                                   GlobalRenderFrameHostId id)
    :{}

// static
void DownloadItemData::Attach(download::DownloadItem* download_item,
                              BrowserContext* browser_context,
                              WebContents* web_contents,
                              GlobalRenderFrameHostId id) {}

// static
DownloadItemData* DownloadItemData::Get(
    const download::DownloadItem* download_item) {}

// static
void DownloadItemData::Detach(download::DownloadItem* download_item) {}

void DownloadItemData::PrimaryPageChanged(Page& page) {}

void DownloadItemData::WebContentsDestroyed() {}

}  // namespace

// static
BrowserContext* DownloadItemUtils::GetBrowserContext(
    const download::DownloadItem* download_item) {}

// static
WebContents* DownloadItemUtils::GetWebContents(
    const download::DownloadItem* download_item) {}

// static
RenderFrameHost* DownloadItemUtils::GetRenderFrameHost(
    const download::DownloadItem* download_item) {}

// static
WebContents* DownloadItemUtils::GetOriginalWebContents(
    const download::DownloadItem* download_item) {}

// static
void DownloadItemUtils::AttachInfo(download::DownloadItem* download_item,
                                   BrowserContext* browser_context,
                                   WebContents* web_contents,
                                   GlobalRenderFrameHostId id) {}

// static
void DownloadItemUtils::AttachInfoForTesting(
    download::DownloadItem* download_item,
    BrowserContext* browser_context,
    WebContents* web_contents) {}

}  // namespace content