#include "chrome/browser/ui/views/tab_sharing/tab_capture_contents_border_helper.h"
#include "base/containers/contains.h"
#include "base/feature_list.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "chrome/browser/browser_features.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_finder.h"
#include "chrome/browser/ui/color/chrome_color_id.h"
#include "chrome/browser/ui/views/frame/browser_view.h"
#include "content/public/browser/browser_thread.h"
#include "ui/gfx/color_palette.h"
#if BUILDFLAG(IS_WIN)
#include "ui/views/widget/native_widget_aura.h"
#endif
namespace {
constexpr int kMinContentsBorderWidth = …;
constexpr int kMinContentsBorderHeight = …;
class BorderView : public views::View { … };
void InitContentsBorderWidget(content::WebContents* web_contents) { … }
}
TabCaptureContentsBorderHelper::TabCaptureContentsBorderHelper(
content::WebContents* web_contents)
: … { … }
TabCaptureContentsBorderHelper::~TabCaptureContentsBorderHelper() = default;
void TabCaptureContentsBorderHelper::OnCapturerAdded(
CaptureSessionId capture_session_id) { … }
void TabCaptureContentsBorderHelper::OnCapturerRemoved(
CaptureSessionId capture_session_id) { … }
void TabCaptureContentsBorderHelper::VisibilityUpdated() { … }
void TabCaptureContentsBorderHelper::OnRegionCaptureRectChanged(
CaptureSessionId capture_session_id,
const std::optional<gfx::Rect>& region_capture_rect) { … }
void TabCaptureContentsBorderHelper::Update() { … }
void TabCaptureContentsBorderHelper::UpdateBlueBorderLocation() { … }
std::optional<gfx::Rect> TabCaptureContentsBorderHelper::GetBlueBorderLocation()
const { … }
WEB_CONTENTS_USER_DATA_KEY_IMPL(TabCaptureContentsBorderHelper);