CefPackStrings
Header: cef_pack_strings.h
Category: System Utilities
Overview
Tasks, threads, parsers, streams, cookies, URL requests, scheme registration, and constant tables.
MacroGroup — Pack String ID Table (IDS_ constants)
Source File: include/cef_pack_strings.h
Process / Thread Context: Compile-time only (macro definitions).
Purpose: Generated by make_pack_header.py. Defines 15,079 #define IDS_* numeric constants for localizable strings bundled into the CEF/Chromium string pack. Use cef_id_for_pack_string_name() for version-safe lookups, and CefResourceBundle::GetLocalizedString(id) to retrieve the actual localized text.
Notable Members
The file is organized into 16 sections (// From <upstream>_strings.h:). Approximate ranges / counts below.
| Source section | ID range (representative) | Purpose |
|---|---|---|
app_locale_settings.h | IDS_WEB_FONT_FAMILY (50013), IDS_WEB_FONT_SIZE (50014) | Default web font family / size for the locale. |
auto_image_annotation_strings.h | IDS_AX_UNLABELED_IMAGE_ROLE_DESCRIPTION (50020), IDS_AX_IMAGE_* | Accessibility labels for auto-annotated images. |
blink_strings.h | (range starting ~50000s) | Blink-renderer localized strings (form controls, validation, media, accessibility). |
branded_strings.h | (large block, lines 240–916) | Branded Chrome product strings (product names, promo text, error pages, version UI). |
cef_strings.h | IDS_TEXT_FILES (59100), IDS_CONTENT_CONTEXT_NO_SPELLING_SUGGESTIONS (59101) | CEF-specific overrides / additions. |
components_branded_strings.h | IDS_ERRORPAGES_* (34390s), IDS_FLAGS_UI_*, IDS_VERSION_UI_LICENSE, IDS_*_PROMO_NOTIFICATION_TITLE | Strings used by branded components (error pages, flags UI, version UI). |
components_strings.h | IDS_ASH_ARC_*, IDS_ARC_*, IDS_AUTOFILL_* (34420+) | Strings for Ash / ARC / Autofill / Safe Browsing / etc. components. |
extensions_strings.h | (range) | Extension system user-visible strings. |
generated_resources.h | IDS_ACCESS_CODE_CAST_* (1800+), IDS_ACTOR_*, IDS_GLIC_*, etc. | Largest section (~7,982 lines): the bulk of Chrome UI strings — every menu, dialog, tooltip, error, etc. |
locale_settings.h | (small set) | Locale-specific settings strings. |
omnibox_pedal_synonyms.h | (range) | Omnibox pedal synonym mappings. |
permission_element_generated_strings.h | (range) | Permission-element generated strings. |
permission_element_strings.h | (range) | Permission-element UI strings. |
platform_locale_settings.h | (small set) | Platform-specific locale settings. |
services_strings.h | (small set) | Service-layer strings. |
ui_strings.h | (small set) | Top-level UI strings (common controls, dialog buttons, etc.). |
Usage Example
cpp
#include "include/cef_pack_strings.h"
#include "include/cef_id_mappers.h"
#include "include/cef_resource_bundle.h"
CefRefPtr<CefResourceBundle> bundle = CefResourceBundle::GetGlobalBundle();
// Hard-coded (version-specific) — IDS_TEXT_FILES is a CEF string.
CefString text_files = bundle->GetLocalizedString(IDS_TEXT_FILES);
// Version-safe lookups.
CEF_DECLARE_PACK_STRING_ID(IDS_TEXT_FILES);
CefString tf2 = bundle->GetLocalizedString(IDS_TEXT_FILES);
int id = cef_id_for_pack_string_name("IDS_CONTENT_CONTEXT_NO_SPELLING_SUGGESTIONS");
if (id != -1) { CefString s = bundle->GetLocalizedString(id); }