chromium/chrome/browser/ui/views/site_data/site_data_row_view.cc

// Copyright 2022 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/site_data/site_data_row_view.h"

#include "chrome/app/vector_icons/vector_icons.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/url_identity.h"
#include "chrome/browser/ui/views/accessibility/non_accessible_image_view.h"
#include "chrome/browser/ui/views/chrome_layout_provider.h"
#include "chrome/browser/ui/views/site_data/page_specific_site_data_dialog.h"
#include "chrome/grit/generated_resources.h"
#include "components/omnibox/browser/favicon_cache.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/metadata/metadata_impl_macros.h"
#include "ui/base/models/dialog_model.h"
#include "ui/base/models/dialog_model_menu_model_adapter.h"
#include "ui/views/controls/button/image_button.h"
#include "ui/views/controls/button/image_button_factory.h"
#include "ui/views/controls/highlight_path_generator.h"
#include "ui/views/controls/label.h"
#include "ui/views/controls/menu/menu_runner.h"
#include "ui/views/focus/focus_manager.h"
#include "ui/views/interaction/element_tracker_views.h"
#include "ui/views/layout/box_layout.h"
#include "ui/views/layout/table_layout.h"
#include "ui/views/view_class_properties.h"
#include "url/origin.h"

// Not referenced directly but needed to use GetElementForView in tests.
DEFINE_CLASS_ELEMENT_IDENTIFIER_VALUE(SiteDataRowView, kMenuButton);
DEFINE_CLASS_ELEMENT_IDENTIFIER_VALUE(SiteDataRowView, kDeleteButton);

DEFINE_CLASS_ELEMENT_IDENTIFIER_VALUE(SiteDataRowView, kAllowMenuItem);
DEFINE_CLASS_ELEMENT_IDENTIFIER_VALUE(SiteDataRowView, kBlockMenuItem);
DEFINE_CLASS_ELEMENT_IDENTIFIER_VALUE(SiteDataRowView, kClearOnExitMenuItem);

DEFINE_CUSTOM_ELEMENT_EVENT_TYPE(kSiteRowMenuItemClicked);

namespace {

constexpr int kIconSize =;

constexpr UrlIdentity::TypeSet kUrlIdentityAllowedTypes =;
constexpr UrlIdentity::FormatOptions kUrlIdentityFormatOptions =;

std::u16string GetSettingStateString(ContentSetting setting,
                                     bool is_fully_partitioned) {}

std::unique_ptr<views::TableLayout> SetupTableLayout() {}

void NotifyMenuItemClicked(views::View* view) {}

}  // namespace

SiteDataRowView::SiteDataRowView(
    Profile* profile,
    const url::Origin& origin,
    ContentSetting setting,
    bool is_fully_partitioned,
    FaviconCache* favicon_cache,
    base::RepeatingCallback<void(const url::Origin&)> delete_callback,
    base::RepeatingCallback<void(const url::Origin&, ContentSetting)>
        create_exception_callback)
    :{}

SiteDataRowView::~SiteDataRowView() = default;

void SiteDataRowView::SetFaviconImage(const gfx::Image& image) {}

void SiteDataRowView::OnMenuIconClicked() {}

void SiteDataRowView::OnMenuClosed() {}

void SiteDataRowView::OnDeleteIconClicked() {}

void SiteDataRowView::OnBlockMenuItemClicked(int event_flags) {}

void SiteDataRowView::OnAllowMenuItemClicked(int event_flags) {}

void SiteDataRowView::OnClearOnExitMenuItemClicked(int event_flags) {}

void SiteDataRowView::SetContentSettingException(ContentSetting setting) {}

BEGIN_METADATA()