chromium/chrome/browser/extensions/context_menu_matcher.cc

// Copyright 2012 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/extensions/context_menu_matcher.h"

#include <string>

#include "base/memory/ptr_util.h"
#include "base/strings/utf_string_conversions.h"
#include "build/chromeos_buildflags.h"
#include "chrome/app/chrome_command_ids.h"
#include "chrome/common/extensions/api/context_menus.h"
#include "components/guest_view/common/guest_view_constants.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/context_menu_params.h"
#include "extensions/browser/extension_registry.h"
#include "extensions/browser/extension_util.h"
#include "ui/base/models/image_model.h"
#include "ui/gfx/favicon_size.h"
#include "ui/gfx/image/image.h"

namespace extensions {

namespace {

// The range of command IDs reserved for extension's custom menus.
// TODO(oshima): These values will be injected by embedders.
int extensions_context_custom_first =;
int extensions_context_custom_last =;

}  // namespace

// static
const size_t ContextMenuMatcher::kMaxExtensionItemTitleLength =;

// static
int ContextMenuMatcher::ConvertToExtensionsCustomCommandId(int id) {}

// static
bool ContextMenuMatcher::IsExtensionsCustomCommandId(int id) {}

ContextMenuMatcher::ContextMenuMatcher(
    content::BrowserContext* browser_context,
    ui::SimpleMenuModel::Delegate* delegate,
    ui::SimpleMenuModel* menu_model,
    base::RepeatingCallback<bool(const MenuItem*)> filter)
    :{}

ContextMenuMatcher::~ContextMenuMatcher() = default;

void ContextMenuMatcher::AppendExtensionItems(
    const MenuItem::ExtensionKey& extension_key,
    const std::u16string& selection_text,
    int* index,
    bool is_action_menu,
    const std::u16string& group_title) {}

bool ContextMenuMatcher::HasVisibleItems(ui::MenuModel* menu_model) const {}

void ContextMenuMatcher::Clear() {}

std::u16string ContextMenuMatcher::GetTopLevelContextMenuTitle(
    const MenuItem::ExtensionKey& extension_key,
    const std::u16string& selection_text) {}

bool ContextMenuMatcher::IsCommandIdChecked(int command_id) const {}

bool ContextMenuMatcher::IsCommandIdVisible(int command_id) const {}

bool ContextMenuMatcher::IsCommandIdEnabled(int command_id) const {}

void ContextMenuMatcher::ExecuteCommand(
    int command_id,
    content::WebContents* web_contents,
    content::RenderFrameHost* render_frame_host,
    const content::ContextMenuParams& params) {}

bool ContextMenuMatcher::GetRelevantExtensionTopLevelItems(
    const MenuItem::ExtensionKey& extension_key,
    const Extension*& extension,
    bool& can_cross_incognito,
    MenuItem::List* items) {}

MenuItem::List ContextMenuMatcher::GetRelevantExtensionItems(
    const MenuItem::OwnedList& items,
    bool can_cross_incognito) {}

void ContextMenuMatcher::RecursivelyAppendExtensionItems(
    const MenuItem::List& items,
    bool can_cross_incognito,
    const std::u16string& selection_text,
    ui::SimpleMenuModel* menu_model,
    int* index,
    bool is_action_menu_top_level) {}

MenuItem* ContextMenuMatcher::GetExtensionMenuItem(int id) const {}

void ContextMenuMatcher::SetExtensionIcon(
    const MenuItem::ExtensionKey& extension_key) {}

}  // namespace extensions