#include "chrome/browser/ui/views/bookmarks/bookmark_context_menu.h"
#include <memory>
#include "base/command_line.h"
#include "base/i18n/rtl.h"
#include "base/memory/ptr_util.h"
#include "base/memory/raw_ptr.h"
#include "base/no_destructor.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/app/chrome_command_ids.h"
#include "chrome/common/chrome_switches.h"
#include "components/bookmarks/browser/bookmark_model.h"
#include "ui/views/controls/menu/menu_item_view.h"
#include "ui/views/controls/menu/menu_model_adapter.h"
#include "ui/views/controls/menu/menu_runner.h"
#include "ui/views/widget/widget.h"
BookmarkNode;
namespace {
base::OnceClosure& PreRunCallback() { … }
bool IsRemoveBookmarksCommand(int command_id) { … }
}
BookmarkContextMenu::BookmarkContextMenu(
views::Widget* parent_widget,
Browser* browser,
Profile* profile,
BookmarkLaunchLocation opened_from,
const BookmarkNode* parent,
const std::vector<raw_ptr<const BookmarkNode, VectorExperimental>>&
selection,
bool close_on_remove)
: … { … }
BookmarkContextMenu::~BookmarkContextMenu() { … }
void BookmarkContextMenu::InstallPreRunCallback(base::OnceClosure callback) { … }
void BookmarkContextMenu::RunMenuAt(const gfx::Point& point,
ui::MenuSourceType source_type) { … }
void BookmarkContextMenu::ExecuteCommand(int command_id, int event_flags) { … }
bool BookmarkContextMenu::IsItemChecked(int command_id) const { … }
bool BookmarkContextMenu::IsCommandEnabled(int command_id) const { … }
bool BookmarkContextMenu::IsCommandVisible(int command_id) const { … }
bool BookmarkContextMenu::ShouldCloseAllMenusOnExecute(int id) { … }
void BookmarkContextMenu::OnMenuClosed(views::MenuItemView* menu) { … }
void BookmarkContextMenu::CloseMenu() { … }
void BookmarkContextMenu::WillExecuteCommand(
int command_id,
const std::vector<raw_ptr<const BookmarkNode, VectorExperimental>>&
bookmarks) { … }
void BookmarkContextMenu::DidExecuteCommand(int command_id) { … }