blob: 6d1d2a83ee7c8c3957b61b9437aa28fe716ca706 [file] [log] [blame]
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// vector_icons.cc.template is used to generate vector_icons.cc. Edit the former
// rather than the latter.
#include "ui/gfx/vector_icons/vector_icons.h"
#include "base/logging.h"
#include "ui/gfx/vector_icon_types.h"
#define ICON_TEMPLATE(icon_name, ...) \
case VectorIconId::icon_name: {\
static PathElement path[] = {__VA_ARGS__};\
return path;\
}
namespace gfx {
#if defined(OS_WIN)
#pragma warning(push)
// Disable "function size suppresses optimizations" warning.
#pragma warning(disable: 4883)
#endif // defined(OS_WIN)
const PathElement* GetPathForVectorIcon(VectorIconId id) {
switch (id) {
TEMPLATE_PLACEHOLDER
case VectorIconId::VECTOR_ICON_NONE:
NOTREACHED();
return nullptr;
}
NOTREACHED();
return nullptr;
}
const PathElement* GetPathForVectorIconAt1xScale(VectorIconId id) {
switch (id) {
TEMPLATE_PLACEHOLDER_1X
default:
return GetPathForVectorIcon(id);
}
}
#if defined(OS_WIN)
#pragma warning(pop)
#endif // defined(OS_WIN)
} // namespace gfx