application_info.h 977 B

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