2016-11-17 18:52:42 -05:00
|
|
|
// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights
|
|
|
|
// reserved. Use of this source code is governed by a BSD-style license that
|
|
|
|
// can be found in the LICENSE file.
|
|
|
|
|
|
|
|
#include <cstring>
|
|
|
|
|
2016-11-18 12:31:21 -05:00
|
|
|
#include "tests/ceftests/resource.h"
|
2016-11-17 18:52:42 -05:00
|
|
|
|
|
|
|
namespace client {
|
|
|
|
|
|
|
|
int GetResourceId(const char* resource_name) {
|
|
|
|
// Map of resource labels to BINARY id values.
|
|
|
|
static struct _resource_map {
|
2017-12-07 16:44:24 -05:00
|
|
|
const char* name;
|
2016-11-17 18:52:42 -05:00
|
|
|
int id;
|
|
|
|
} resource_map[] = {
|
2017-05-17 11:29:28 +02:00
|
|
|
{"osr_test.html", IDS_OSRTEST_HTML},
|
|
|
|
{"pdf.html", IDS_PDF_HTML},
|
|
|
|
{"pdf.pdf", IDS_PDF_PDF},
|
|
|
|
{"window_icon.1x.png", IDS_WINDOW_ICON_1X_PNG},
|
|
|
|
{"window_icon.2x.png", IDS_WINDOW_ICON_2X_PNG},
|
2016-11-17 18:52:42 -05:00
|
|
|
};
|
|
|
|
|
2024-01-20 12:00:09 -05:00
|
|
|
for (auto& i : resource_map) {
|
|
|
|
if (!strcmp(i.name, resource_name)) {
|
|
|
|
return i.id;
|
2023-01-02 17:59:03 -05:00
|
|
|
}
|
2016-11-17 18:52:42 -05:00
|
|
|
}
|
2017-05-17 11:29:28 +02:00
|
|
|
|
2016-11-17 18:52:42 -05:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace client
|