WebProcessCreationParameters.h 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. /*
  2. * Copyright (C) 2010, 2011, 2012 Apple Inc. All rights reserved.
  3. *
  4. * Redistribution and use in source and binary forms, with or without
  5. * modification, are permitted provided that the following conditions
  6. * are met:
  7. * 1. Redistributions of source code must retain the above copyright
  8. * notice, this list of conditions and the following disclaimer.
  9. * 2. Redistributions in binary form must reproduce the above copyright
  10. * notice, this list of conditions and the following disclaimer in the
  11. * documentation and/or other materials provided with the distribution.
  12. *
  13. * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
  14. * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
  15. * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  16. * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
  17. * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  18. * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  19. * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  20. * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  21. * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  22. * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
  23. * THE POSSIBILITY OF SUCH DAMAGE.
  24. */
  25. #ifndef WebProcessCreationParameters_h
  26. #define WebProcessCreationParameters_h
  27. #include "CacheModel.h"
  28. #include "SandboxExtension.h"
  29. #include "TextCheckerState.h"
  30. #include <wtf/RetainPtr.h>
  31. #include <wtf/Vector.h>
  32. #include <wtf/text/StringHash.h>
  33. #include <wtf/text/WTFString.h>
  34. #if PLATFORM(MAC)
  35. #include "MachPort.h"
  36. #endif
  37. #if USE(SOUP)
  38. #include "HTTPCookieAcceptPolicy.h"
  39. #endif
  40. namespace CoreIPC {
  41. class ArgumentDecoder;
  42. class ArgumentEncoder;
  43. }
  44. namespace WebKit {
  45. struct WebProcessCreationParameters {
  46. WebProcessCreationParameters();
  47. void encode(CoreIPC::ArgumentEncoder&) const;
  48. static bool decode(CoreIPC::ArgumentDecoder&, WebProcessCreationParameters&);
  49. String injectedBundlePath;
  50. SandboxExtension::Handle injectedBundlePathExtensionHandle;
  51. String applicationCacheDirectory;
  52. SandboxExtension::Handle applicationCacheDirectoryExtensionHandle;
  53. String databaseDirectory;
  54. SandboxExtension::Handle databaseDirectoryExtensionHandle;
  55. String localStorageDirectory;
  56. SandboxExtension::Handle localStorageDirectoryExtensionHandle;
  57. String diskCacheDirectory;
  58. SandboxExtension::Handle diskCacheDirectoryExtensionHandle;
  59. String cookieStorageDirectory;
  60. SandboxExtension::Handle cookieStorageDirectoryExtensionHandle;
  61. Vector<String> urlSchemesRegistererdAsEmptyDocument;
  62. Vector<String> urlSchemesRegisteredAsSecure;
  63. Vector<String> urlSchemesForWhichDomainRelaxationIsForbidden;
  64. Vector<String> urlSchemesRegisteredAsLocal;
  65. Vector<String> urlSchemesRegisteredAsNoAccess;
  66. Vector<String> urlSchemesRegisteredAsDisplayIsolated;
  67. Vector<String> urlSchemesRegisteredAsCORSEnabled;
  68. #if ENABLE(CUSTOM_PROTOCOLS)
  69. Vector<String> urlSchemesRegisteredForCustomProtocols;
  70. #endif
  71. #if USE(SOUP)
  72. Vector<String> urlSchemesRegistered;
  73. String cookiePersistentStoragePath;
  74. uint32_t cookiePersistentStorageType;
  75. HTTPCookieAcceptPolicy cookieAcceptPolicy;
  76. bool ignoreTLSErrors;
  77. #endif
  78. CacheModel cacheModel;
  79. bool shouldTrackVisitedLinks;
  80. bool shouldAlwaysUseComplexTextCodePath;
  81. bool shouldUseFontSmoothing;
  82. bool iconDatabaseEnabled;
  83. double terminationTimeout;
  84. Vector<String> languages;
  85. TextCheckerState textCheckerState;
  86. bool fullKeyboardAccessEnabled;
  87. double defaultRequestTimeoutInterval;
  88. #if PLATFORM(MAC) || USE(CFNETWORK)
  89. String uiProcessBundleIdentifier;
  90. #endif
  91. #if PLATFORM(MAC)
  92. pid_t presenterApplicationPid;
  93. bool accessibilityEnhancedUserInterfaceEnabled;
  94. uint64_t nsURLCacheMemoryCapacity;
  95. uint64_t nsURLCacheDiskCapacity;
  96. CoreIPC::MachPort acceleratedCompositingPort;
  97. String uiProcessBundleResourcePath;
  98. SandboxExtension::Handle uiProcessBundleResourcePathExtensionHandle;
  99. bool shouldForceScreenFontSubstitution;
  100. bool shouldEnableKerningAndLigaturesByDefault;
  101. #endif // PLATFORM(MAC)
  102. #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
  103. HashMap<String, bool> notificationPermissions;
  104. #endif
  105. #if ENABLE(NETWORK_PROCESS)
  106. bool usesNetworkProcess;
  107. #endif
  108. #if PLATFORM(MANX)
  109. int userID;
  110. #endif
  111. HashMap<unsigned, double> plugInAutoStartOriginHashes;
  112. Vector<String> plugInAutoStartOrigins;
  113. };
  114. } // namespace WebKit
  115. #endif // WebProcessCreationParameters_h