chromium/ui/views/test/menu_test_utils.cc

// Copyright 2016 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "ui/views/test/menu_test_utils.h"

#include "base/run_loop.h"
#include "build/build_config.h"
#include "ui/base/dragdrop/drag_drop_types.h"
#include "ui/base/dragdrop/mojom/drag_drop_types.mojom.h"
#include "ui/views/controls/menu/menu_controller.h"

#if BUILDFLAG(IS_MAC)
#include "ui/views/controls/menu/menu_closure_animation_mac.h"
#endif

namespace views::test {

// TestMenuDelegate -----------------------------------------------------------

TestMenuDelegate::TestMenuDelegate() = default;

TestMenuDelegate::~TestMenuDelegate() = default;

bool TestMenuDelegate::ShowContextMenu(MenuItemView* source,
                                       int id,
                                       const gfx::Point& p,
                                       ui::MenuSourceType source_type) {}

void TestMenuDelegate::ExecuteCommand(int id) {}

void TestMenuDelegate::OnMenuClosed(MenuItemView* menu) {}

views::View::DropCallback TestMenuDelegate::GetDropCallback(
    MenuItemView* menu,
    DropPosition position,
    const ui::DropTargetEvent& event) {}

int TestMenuDelegate::GetDragOperations(MenuItemView* sender) {}

void TestMenuDelegate::WriteDragData(MenuItemView* sender,
                                     OSExchangeData* data) {}

void TestMenuDelegate::WillHideMenu(MenuItemView* menu) {}

bool TestMenuDelegate::ShouldExecuteCommandWithoutClosingMenu(
    int id,
    const ui::Event& e) {}

void TestMenuDelegate::PerformDrop(
    const ui::DropTargetEvent& event,
    ui::mojom::DragOperation& output_drag_op,
    std::unique_ptr<ui::LayerTreeOwner> drag_image_layer_owner) {}

// MenuControllerTestApi ------------------------------------------------------

MenuControllerTestApi::MenuControllerTestApi()
    :{}

MenuControllerTestApi::~MenuControllerTestApi() = default;

void MenuControllerTestApi::ClearState() {}

void MenuControllerTestApi::SetShowing(bool showing) {}

void DisableMenuClosureAnimations() {}

void WaitForMenuClosureAnimation() {}

// ReleaseRefTestViewsDelegate ------------------------------------------------

ReleaseRefTestViewsDelegate::ReleaseRefTestViewsDelegate() = default;

ReleaseRefTestViewsDelegate::~ReleaseRefTestViewsDelegate() = default;

void ReleaseRefTestViewsDelegate::ReleaseRef() {}

}  // namespace views::test