chromium/chrome/browser/media/webrtc/current_tab_desktop_media_list.cc

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

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/40285824): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "chrome/browser/media/webrtc/current_tab_desktop_media_list.h"

#include "base/functional/bind.h"
#include "base/hash/hash.h"
#include "base/task/bind_post_task.h"
#include "base/task/single_thread_task_runner.h"
#include "base/task/thread_pool.h"
#include "build/build_config.h"
#include "chrome/browser/media/webrtc/desktop_media_picker_utils.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/web_contents.h"
#include "media/base/video_util.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "third_party/skia/include/core/SkImage.h"

namespace {

constexpr base::TimeDelta kUpdatePeriodMs =;

void HandleCapturedBitmap(
    base::OnceCallback<void(uint32_t, const std::optional<gfx::ImageSkia>&)>
        reply,
    std::optional<uint32_t> last_hash,
    gfx::Size thumbnail_size,
    const SkBitmap& bitmap) {}

}  // namespace

CurrentTabDesktopMediaList ::CurrentTabDesktopMediaList(
    content::WebContents* web_contents)
    :{}

CurrentTabDesktopMediaList::CurrentTabDesktopMediaList(
    content::WebContents* web_contents,
    base::TimeDelta period,
    DesktopMediaListObserver* observer)
    :{}

CurrentTabDesktopMediaList::~CurrentTabDesktopMediaList() = default;

void CurrentTabDesktopMediaList::Refresh(bool update_thumbnails) {}

void CurrentTabDesktopMediaList::OnCaptureHandled(
    uint32_t hash,
    const std::optional<gfx::ImageSkia>& image) {}

void CurrentTabDesktopMediaList::ResetLastHashForTesting() {}