electron_constants.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. // Copyright (c) 2015 GitHub, Inc.
  2. // Use of this source code is governed by the MIT license that can be
  3. // found in the LICENSE file.
  4. #ifndef ELECTRON_SHELL_COMMON_ELECTRON_CONSTANTS_H_
  5. #define ELECTRON_SHELL_COMMON_ELECTRON_CONSTANTS_H_
  6. #include <string_view>
  7. #include "base/strings/cstring_view.h"
  8. #include "electron/buildflags/buildflags.h"
  9. namespace electron {
  10. // The app-command in NativeWindow.
  11. inline constexpr std::string_view kBrowserForward = "browser-forward";
  12. inline constexpr std::string_view kBrowserBackward = "browser-backward";
  13. // Keys for Device APIs
  14. inline constexpr std::string_view kDeviceVendorIdKey = "vendorId";
  15. inline constexpr std::string_view kDeviceProductIdKey = "productId";
  16. inline constexpr std::string_view kDeviceSerialNumberKey = "serialNumber";
  17. inline constexpr base::cstring_view kRunAsNode = "ELECTRON_RUN_AS_NODE";
  18. // Per-profile UUID to distinguish global shortcut sessions for
  19. // org.freedesktop.portal.GlobalShortcuts. This is a counterpart to
  20. // extensions::pref_names::kGlobalShortcutsUuid, which may be not defined
  21. // if extensions are disabled.
  22. inline constexpr char kElectronGlobalShortcutsUuid[] =
  23. "electron.global_shortcuts.uuid";
  24. #if BUILDFLAG(ENABLE_PDF_VIEWER)
  25. inline constexpr std::string_view kPDFExtensionPluginName =
  26. "Chromium PDF Viewer";
  27. inline constexpr std::string_view kPDFInternalPluginName =
  28. "Chromium PDF Plugin";
  29. #endif // BUILDFLAG(ENABLE_PDF_VIEWER)
  30. } // namespace electron
  31. #endif // ELECTRON_SHELL_COMMON_ELECTRON_CONSTANTS_H_