#include <string>
#include <vector>
#include "chrome/app/chrome_command_ids.h"
#include "chrome/browser/renderer_context_menu/render_view_context_menu_test_util.h"
#include "content/public/browser/web_contents.h"
#include "ui/base/models/menu_model.h"
#if BUILDFLAG(IS_CHROMEOS_ASH)
#include "chrome/browser/chromeos/policy/dlp/dlp_rules_manager.h"
#endif
MenuModel;
TestRenderViewContextMenu::TestRenderViewContextMenu(
content::RenderFrameHost& render_frame_host,
content::ContextMenuParams params)
: … { … }
TestRenderViewContextMenu::~TestRenderViewContextMenu() { … }
std::unique_ptr<TestRenderViewContextMenu> TestRenderViewContextMenu::Create(
content::WebContents* web_contents,
const GURL& frame_url,
const GURL& link_url,
bool is_subframe) { … }
std::unique_ptr<TestRenderViewContextMenu> TestRenderViewContextMenu::Create(
content::RenderFrameHost* render_frame_host,
const GURL& frame_url,
const GURL& link_url,
bool is_subframe) { … }
bool TestRenderViewContextMenu::IsItemPresent(int command_id) const { … }
bool TestRenderViewContextMenu::IsItemChecked(int command_id) const { … }
bool TestRenderViewContextMenu::IsItemEnabled(int command_id) const { … }
bool TestRenderViewContextMenu::IsItemInRangePresent(
int command_id_first,
int command_id_last) const { … }
bool TestRenderViewContextMenu::GetMenuModelAndItemIndex(
int command_id,
raw_ptr<MenuModel>* found_model,
size_t* found_index) { … }
int TestRenderViewContextMenu::GetCommandIDByProfilePath(
const base::FilePath& path) const { … }
void TestRenderViewContextMenu::SetBrowser(Browser* browser) { … }
Browser* TestRenderViewContextMenu::GetBrowser() const { … }
void TestRenderViewContextMenu::Show() { … }
#if BUILDFLAG(IS_CHROMEOS)
const policy::DlpRulesManager* TestRenderViewContextMenu::GetDlpRulesManager()
const {
return dlp_rules_manager_;
}
void TestRenderViewContextMenu::set_dlp_rules_manager(
policy::DlpRulesManager* dlp_rules_manager) {
dlp_rules_manager_ = dlp_rules_manager;
}
#endif
#if BUILDFLAG(ENABLE_COMPOSE)
ChromeComposeClient* TestRenderViewContextMenu::GetChromeComposeClient() const { … }
void TestRenderViewContextMenu::SetChromeComposeClient(
ChromeComposeClient* compose_client) { … }
#endif