Roll src/third_party/skia 199ba8e:bb928a0
[chromium-blink-merge.git] / tools / ipc_fuzzer / message_lib / message_names.cc
blobb80b3881c000770c7e69a4757a79d256a29f70d6
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "tools/ipc_fuzzer/message_lib/message_names.h"
6 #include "tools/ipc_fuzzer/message_lib/all_messages.h"
8 #include "ipc/ipc_message_null_macros.h"
9 #undef IPC_MESSAGE_DECL
10 #define IPC_MESSAGE_DECL(kind, type, name, in, out, ilist, olist) \
11 names.Add(static_cast<uint32>(name::ID), #name);
13 void PopulateIpcMessageNames(ipc_fuzzer::MessageNames& names) {
14 #include "tools/ipc_fuzzer/message_lib/all_messages.h"
17 namespace ipc_fuzzer {
19 // static
20 MessageNames* MessageNames::all_names_ = NULL;
22 MessageNames::MessageNames() {
25 MessageNames::~MessageNames() {
28 // static
29 MessageNames* MessageNames::GetInstance() {
30 if (!all_names_) {
31 all_names_ = new MessageNames();
32 PopulateIpcMessageNames(*all_names_);
34 return all_names_;
37 } // namespace ipc_fuzzer