// Copyright 2024 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef UI_ACTIONS_ACTION_UTILS_H_ #define UI_ACTIONS_ACTION_UTILS_H_ #include "ui/base/metadata/metadata_utils.h" namespace actions { template bool IsActionItemClass( actions::ActionItem* action_item) { return ui::metadata::IsClass(action_item); } template std::unique_ptr ToActionItemClass( std::unique_ptr action_item) { CHECK(IsActionItemClass(action_item.get())); return std::unique_ptr(static_cast(action_item.release())); } } // namespace actions #endif // UI_ACTIONS_ACTION_UTILS_H_