chromium/chrome/browser/ui/views/extensions/extensions_menu_view.cc

// Copyright 2019 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/extensions/extensions_menu_view.h"

#include "base/containers/contains.h"
#include "base/feature_list.h"
#include "base/i18n/case_conversion.h"
#include "base/memory/ptr_util.h"
#include "base/not_fatal_until.h"
#include "base/ranges/algorithm.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/chrome_pages.h"
#include "chrome/browser/ui/extensions/extension_action_view_controller.h"
#include "chrome/browser/ui/extensions/extensions_container.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/browser/ui/toolbar/toolbar_action_view_controller.h"
#include "chrome/browser/ui/views/bubble_menu_item_factory.h"
#include "chrome/browser/ui/views/chrome_layout_provider.h"
#include "chrome/browser/ui/views/chrome_typography.h"
#include "chrome/browser/ui/views/controls/hover_button.h"
#include "chrome/browser/ui/views/extensions/extensions_menu_item_view.h"
#include "chrome/grit/generated_resources.h"
#include "components/vector_icons/vector_icons.h"
#include "extensions/common/extension_features.h"
#include "third_party/skia/include/core/SkPath.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/metadata/metadata_impl_macros.h"
#include "ui/base/mojom/dialog_button.mojom.h"
#include "ui/color/color_id.h"
#include "ui/gfx/geometry/insets.h"
#include "ui/views/accessibility/view_accessibility.h"
#include "ui/views/border.h"
#include "ui/views/controls/label.h"
#include "ui/views/controls/scroll_view.h"
#include "ui/views/controls/separator.h"
#include "ui/views/layout/box_layout.h"
#include "ui/views/layout/flex_layout.h"
#include "ui/views/style/typography.h"
#include "ui/views/view_class_properties.h"
#include "ui/views/view_utils.h"

namespace {
// If true, allows more than one instance of the ExtensionsMenuView, which may
// not be the active instance in g_extensions_dialog.
bool g_allow_testing_dialogs =;

ExtensionsMenuView* g_extensions_dialog =;

constexpr int EXTENSIONS_SETTINGS_ID =;

bool CompareExtensionMenuItemViews(const ExtensionMenuItemView* a,
                                   const ExtensionMenuItemView* b) {}

// A helper method to convert to an ExtensionMenuItemView. This cannot
// be used to *determine* if a view is an ExtensionMenuItemView (it
// should only be used when the view is known to be one). It is only used as an
// extra measure to prevent bad static casts.
ExtensionMenuItemView* GetAsMenuItemView(views::View* view) {}

}  // namespace

ExtensionsMenuView::ExtensionsMenuView(
    views::View* anchor_view,
    Browser* browser,
    ExtensionsContainer* extensions_container)
    :{}

ExtensionsMenuView::~ExtensionsMenuView() {}

void ExtensionsMenuView::Populate() {}

std::unique_ptr<views::View>
ExtensionsMenuView::CreateExtensionButtonsContainer() {}

ExtensionsMenuView::Section* ExtensionsMenuView::GetSectionForSiteInteraction(
    extensions::SitePermissionsHelper::SiteInteraction site_interaction) {}

void ExtensionsMenuView::SortMenuItemsByName() {}

void ExtensionsMenuView::CreateAndInsertNewItem(
    const ToolbarActionsModel::ActionId& id) {}

void ExtensionsMenuView::InsertMenuItem(ExtensionMenuItemView* menu_item) {}

void ExtensionsMenuView::UpdateSectionVisibility() {}

void ExtensionsMenuView::Update() {}

void ExtensionsMenuView::SanityCheck() {}

std::u16string ExtensionsMenuView::GetAccessibleWindowTitle() const {}

void ExtensionsMenuView::TabChangedAt(content::WebContents* contents,
                                      int index,
                                      TabChangeType change_type) {}

void ExtensionsMenuView::OnTabStripModelChanged(
    TabStripModel* tab_strip_model,
    const TabStripModelChange& change,
    const TabStripSelectionChange& selection) {}

void ExtensionsMenuView::OnToolbarActionAdded(
    const ToolbarActionsModel::ActionId& item) {}

void ExtensionsMenuView::OnToolbarActionRemoved(
    const ToolbarActionsModel::ActionId& action_id) {}

void ExtensionsMenuView::OnToolbarActionUpdated(
    const ToolbarActionsModel::ActionId& action_id) {}

void ExtensionsMenuView::OnToolbarModelInitialized() {}

void ExtensionsMenuView::OnToolbarPinnedActionsChanged() {}

// static
base::AutoReset<bool> ExtensionsMenuView::AllowInstancesForTesting() {}

// static
views::Widget* ExtensionsMenuView::ShowBubble(
    views::View* anchor_view,
    Browser* browser,
    ExtensionsContainer* extensions_container) {}

// static
bool ExtensionsMenuView::IsShowing() {}

// static
void ExtensionsMenuView::Hide() {}

// static
ExtensionsMenuView* ExtensionsMenuView::GetExtensionsMenuViewForTesting() {}

// static
std::vector<ExtensionMenuItemView*>
ExtensionsMenuView::GetSortedItemsForSectionForTesting(
    extensions::SitePermissionsHelper::SiteInteraction site_interaction) {}

BEGIN_METADATA()