#include "chrome/browser/sharing/click_to_call/click_to_call_context_menu_observer.h"
#include "base/functional/bind.h"
#include "base/strings/utf_string_conversions.h"
#include "build/build_config.h"
#include "chrome/app/chrome_command_ids.h"
#include "chrome/browser/renderer_context_menu/render_view_context_menu.h"
#include "chrome/browser/sharing/click_to_call/click_to_call_metrics.h"
#include "chrome/browser/sharing/click_to_call/click_to_call_ui_controller.h"
#include "chrome/grit/generated_resources.h"
#include "components/sharing_message/sharing_constants.h"
#include "components/sync_device_info/device_info.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/models/image_model.h"
#include "ui/color/color_id.h"
#include "ui/gfx/color_palette.h"
#include "ui/gfx/paint_vector_icon.h"
ClickToCallContextMenuObserver::SubMenuDelegate::SubMenuDelegate(
ClickToCallContextMenuObserver* parent)
: … { … }
ClickToCallContextMenuObserver::SubMenuDelegate::~SubMenuDelegate() = default;
bool ClickToCallContextMenuObserver::SubMenuDelegate::IsCommandIdEnabled(
int command_id) const { … }
void ClickToCallContextMenuObserver::SubMenuDelegate::ExecuteCommand(
int command_id,
int event_flags) { … }
ClickToCallContextMenuObserver::ClickToCallContextMenuObserver(
RenderViewContextMenuProxy* proxy)
: … { … }
ClickToCallContextMenuObserver::~ClickToCallContextMenuObserver() = default;
void ClickToCallContextMenuObserver::BuildMenu(
const std::string& phone_number,
const std::string& selection_text,
SharingClickToCallEntryPoint entry_point) { … }
void ClickToCallContextMenuObserver::BuildSubMenu() { … }
bool ClickToCallContextMenuObserver::IsCommandIdSupported(int command_id) { … }
bool ClickToCallContextMenuObserver::IsCommandIdEnabled(int command_id) { … }
void ClickToCallContextMenuObserver::ExecuteCommand(int command_id) { … }
void ClickToCallContextMenuObserver::SendClickToCallMessage(
int chosen_device_index) { … }