#include "chrome/browser/ui/views/extensions/media_galleries_dialog_views.h"
#include <stddef.h>
#include "base/functional/bind.h"
#include "base/strings/utf_string_conversions.h"
#include "build/build_config.h"
#include "chrome/browser/ui/views/chrome_layout_provider.h"
#include "chrome/browser/ui/views/extensions/media_gallery_checkbox_view.h"
#include "chrome/grit/generated_resources.h"
#include "chrome/grit/locale_settings.h"
#include "components/constrained_window/constrained_window_views.h"
#include "components/web_modal/web_contents_modal_dialog_manager.h"
#include "content/public/browser/web_contents.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/metadata/metadata_header_macros.h"
#include "ui/base/metadata/metadata_impl_macros.h"
#include "ui/base/mojom/dialog_button.mojom.h"
#include "ui/base/mojom/ui_base_types.mojom-shared.h"
#include "ui/gfx/geometry/insets.h"
#include "ui/native_theme/native_theme.h"
#include "ui/views/border.h"
#include "ui/views/controls/button/checkbox.h"
#include "ui/views/controls/button/image_button.h"
#include "ui/views/controls/button/md_text_button.h"
#include "ui/views/controls/label.h"
#include "ui/views/controls/menu/menu_runner.h"
#include "ui/views/controls/scroll_view.h"
#include "ui/views/controls/separator.h"
#include "ui/views/layout/box_layout.h"
#include "ui/views/view.h"
namespace {
const int kScrollAreaHeight = …;
class ScrollableView : public views::View { … };
void ScrollableView::Layout(PassKey) { … }
BEGIN_METADATA(…)
}
MediaGalleriesDialogViews::MediaGalleriesDialogViews(
MediaGalleriesDialogController* controller)
: … { … }
MediaGalleriesDialogViews::~MediaGalleriesDialogViews() { … }
void MediaGalleriesDialogViews::AcceptDialogForTesting() { … }
void MediaGalleriesDialogViews::InitChildViews() { … }
void MediaGalleriesDialogViews::UpdateGalleries() { … }
bool MediaGalleriesDialogViews::AddOrUpdateGallery(
const MediaGalleriesDialogController::Entry& gallery,
views::View* container,
int trailing_vertical_space) { … }
views::Widget* MediaGalleriesDialogViews::GetWidget() { … }
const views::Widget* MediaGalleriesDialogViews::GetWidget() const { … }
views::View* MediaGalleriesDialogViews::GetContentsView() { … }
bool MediaGalleriesDialogViews::IsDialogButtonEnabled(
ui::mojom::DialogButton button) const { … }
void MediaGalleriesDialogViews::ShowContextMenuForViewImpl(
views::View* source,
const gfx::Point& point,
ui::MenuSourceType source_type) { … }
void MediaGalleriesDialogViews::ShowContextMenu(const gfx::Point& point,
ui::MenuSourceType source_type,
MediaGalleryPrefId id) { … }
bool MediaGalleriesDialogViews::ControllerHasWebContents() const { … }
void MediaGalleriesDialogViews::ButtonPressed(base::RepeatingClosure closure) { … }
void MediaGalleriesDialogViews::OnMenuClosed() { … }
MediaGalleriesDialog* MediaGalleriesDialog::Create(
MediaGalleriesDialogController* controller) { … }