application_info.h 952 B

123456789101112131415161718192021222324252627282930313233343536
  1. // Copyright (c) 2013 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 SHELL_COMMON_APPLICATION_INFO_H_
  5. #define SHELL_COMMON_APPLICATION_INFO_H_
  6. #if defined(OS_WIN)
  7. #include "shell/browser/win/scoped_hstring.h"
  8. #endif
  9. #include <string>
  10. namespace electron {
  11. void OverrideApplicationName(const std::string& name);
  12. std::string GetOverriddenApplicationName();
  13. void OverrideApplicationVersion(const std::string& version);
  14. std::string GetOverriddenApplicationVersion();
  15. std::string GetApplicationName();
  16. std::string GetApplicationVersion();
  17. // Returns the user agent of Electron.
  18. std::string GetApplicationUserAgent();
  19. #if defined(OS_WIN)
  20. PCWSTR GetRawAppUserModelID();
  21. bool GetAppUserModelID(ScopedHString* app_id);
  22. void SetAppUserModelID(const std::wstring& name);
  23. bool IsRunningInDesktopBridge();
  24. #endif
  25. } // namespace electron
  26. #endif // SHELL_COMMON_APPLICATION_INFO_H_