blob: d55dd6e3cc364daff6039dd70613dfa69077fedc [file] [log] [blame]
Allen Bauer969e74cf82023-09-07 20:49:471// Copyright 2023 The Chromium Authors
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "chrome/browser/ui/actions/chrome_actions.h"
6
Joseph Park2d0781a12023-10-12 23:09:467#include <string>
8
9#include "base/containers/flat_map.h"
10#include "chrome/browser/ui/actions/chrome_action_id.h"
11#include "ui/actions/actions.h"
12
13void InitializeChromeActions(actions::ActionManager* manager) {}
14
Alison Gale3f4203f72024-04-26 19:27:4215// TODO(crbug.com/40285337): Adding temporarily to unblock the side panel team.
Joseph Park2d0781a12023-10-12 23:09:4616// Should be removed/replaced when general solution to add action id mappings is
17// implemented.
18void InitializeActionIdStringMapping() {
19#define MAP_ACTION_IDS_TO_STRINGS
20#include "ui/actions/action_id_macros.inc"
21
Joseph Park50dfb8b2023-10-16 23:04:1222 actions::ActionIdMap::AddActionIdToStringMappings(
Andrew Paseltiner40b54912025-04-22 15:36:4823 base::flat_map<actions::ActionId, std::string>(
Joseph Park2d0781a12023-10-12 23:09:4624 std::vector<std::pair<actions::ActionId, std::string>>{
25 SIDE_PANEL_ACTION_IDS}));
26
Joseph Parkf7931762024-02-22 20:52:4227 actions::ActionIdMap::AddActionIdToStringMappings(
Andrew Paseltiner40b54912025-04-22 15:36:4828 base::flat_map<actions::ActionId, std::string>(
Joseph Parkf7931762024-02-22 20:52:4229 std::vector<std::pair<actions::ActionId, std::string>>{
30 TOOLBAR_PINNABLE_ACTION_IDS}));
31
Joseph Park2d0781a12023-10-12 23:09:4632#include "ui/actions/action_id_macros.inc"
33#undef MAP_ACTION_IDS_TO_STRINGS
34
35#define MAP_STRING_TO_ACTION_IDS
36#include "ui/actions/action_id_macros.inc"
37
Joseph Park50dfb8b2023-10-16 23:04:1238 actions::ActionIdMap::AddStringToActionIdMappings(
Andrew Paseltiner40b54912025-04-22 15:36:4839 base::flat_map<std::string, actions::ActionId>(
Joseph Park2d0781a12023-10-12 23:09:4640 std::vector<std::pair<std::string, actions::ActionId>>{
41 SIDE_PANEL_ACTION_IDS}));
42
Joseph Parkf7931762024-02-22 20:52:4243 actions::ActionIdMap::AddStringToActionIdMappings(
Andrew Paseltiner40b54912025-04-22 15:36:4844 base::flat_map<std::string, actions::ActionId>(
Joseph Parkf7931762024-02-22 20:52:4245 std::vector<std::pair<std::string, actions::ActionId>>{
46 TOOLBAR_PINNABLE_ACTION_IDS}));
47
Joseph Park2d0781a12023-10-12 23:09:4648#include "ui/actions/action_id_macros.inc"
49#undef MAP_STRING_TO_ACTION_IDS
50}