#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "chrome/browser/ui/views/download/download_shelf_context_menu_view.h"
#include "base/check.h"
#include "base/functional/bind.h"
#include "base/i18n/rtl.h"
#include "base/metrics/histogram_functions.h"
#include "chrome/browser/download/bubble/download_bubble_ui_controller.h"
#include "chrome/browser/download/download_item_model.h"
#include "chrome/browser/download/download_stats.h"
#include "chrome/browser/ui/views/download/download_item_view.h"
#include "components/download/public/common/download_item.h"
#include "content/public/browser/page_navigator.h"
#include "ui/gfx/geometry/point.h"
#include "ui/views/controls/menu/menu_runner.h"
DownloadShelfContextMenuView::DownloadShelfContextMenuView(
DownloadItemView* download_item_view)
: … { … }
DownloadShelfContextMenuView::DownloadShelfContextMenuView(
base::WeakPtr<DownloadUIModel> download_ui_model)
: … { … }
DownloadShelfContextMenuView::DownloadShelfContextMenuView(
base::WeakPtr<DownloadUIModel> download_ui_model,
base::WeakPtr<DownloadBubbleUIController> bubble_controller)
: … { … }
DownloadShelfContextMenuView::~DownloadShelfContextMenuView() = default;
void DownloadShelfContextMenuView::Run(
views::Widget* parent_widget,
const gfx::Rect& rect,
ui::MenuSourceType source_type,
base::RepeatingClosure on_menu_closed_callback) { … }
void DownloadShelfContextMenuView::SetOnMenuWillShowCallback(
base::OnceClosure on_menu_will_show_callback) { … }
void DownloadShelfContextMenuView::OnMenuClosed(
base::RepeatingClosure on_menu_closed_callback) { … }
void DownloadShelfContextMenuView::OnMenuWillShow(ui::SimpleMenuModel* source) { … }
void DownloadShelfContextMenuView::ExecuteCommand(int command_id,
int event_flags) { … }