webview_linux.cpp 938 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. // This file is part of Desktop App Toolkit,
  2. // a set of libraries for developing nice desktop applications.
  3. //
  4. // For license and copyright information please follow this link:
  5. // https://github.com/desktop-app/legal/blob/master/LEGAL
  6. //
  7. #include "webview/platform/linux/webview_linux.h"
  8. #include "base/random.h"
  9. #include "webview/platform/linux/webview_linux_webkitgtk.h"
  10. namespace Webview {
  11. Available Availability() {
  12. return WebKitGTK::Availability();
  13. }
  14. bool SupportsEmbedAfterCreate() {
  15. return true;
  16. }
  17. bool SeparateStorageIdSupported() {
  18. return true;
  19. }
  20. std::unique_ptr<Interface> CreateInstance(Config config) {
  21. return WebKitGTK::CreateInstance(std::move(config));
  22. }
  23. std::string GenerateStorageToken() {
  24. constexpr auto kSize = 16;
  25. auto result = std::string(kSize, ' ');
  26. base::RandomFill(result.data(), result.size());
  27. return result;
  28. }
  29. void ClearStorageDataByToken(const std::string &token) {
  30. }
  31. } // namespace Webview