summaryrefslogtreecommitdiff
path: root/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
commit1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch)
tree46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h
parent32761a6cee1d0dee366b885b7b9c777e67885688 (diff)
downloadWebKitGtk-tarball-master.tar.gz
Diffstat (limited to 'Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h')
-rw-r--r--Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h68
1 files changed, 28 insertions, 40 deletions
diff --git a/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h b/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h
index 23508ce1b..4794a68ab 100644
--- a/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h
+++ b/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
+ * Copyright (C) 2010-2016 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -33,18 +33,17 @@
#include <WebCore/UserContentTypes.h>
#include <WebCore/UserScriptTypes.h>
#include <wtf/PassRefPtr.h>
+#include <wtf/RetainPtr.h>
#include <wtf/text/WTFString.h>
#if PLATFORM(GTK)
typedef struct _GModule GModule;
#endif
-#if PLATFORM(EFL)
-#include <Eina.h>
-#endif
-
-#if PLATFORM(MAC)
+#if USE(FOUNDATION)
OBJC_CLASS NSBundle;
+OBJC_CLASS NSMutableDictionary;
+OBJC_CLASS WKWebProcessBundleParameters;
#endif
namespace API {
@@ -53,18 +52,17 @@ class Data;
}
namespace IPC {
-class ArgumentDecoder;
+class Decoder;
class Connection;
+class DataReference;
}
namespace WebKit {
-#if PLATFORM(MAC)
+#if USE(FOUNDATION)
typedef NSBundle *PlatformBundle;
#elif PLATFORM(GTK)
typedef ::GModule* PlatformBundle;
-#elif PLATFORM(EFL)
-typedef Eina_Module* PlatformBundle;
#endif
class InjectedBundleScriptWorld;
@@ -73,17 +71,18 @@ class WebConnection;
class WebFrame;
class WebPage;
class WebPageGroupProxy;
+struct WebProcessCreationParameters;
class InjectedBundle : public API::ObjectImpl<API::Object::Type::Bundle> {
public:
- static PassRefPtr<InjectedBundle> create(const String& path)
- {
- return adoptRef(new InjectedBundle(path));
- }
+ static PassRefPtr<InjectedBundle> create(const WebProcessCreationParameters&, API::Object* initializationUserData);
+
~InjectedBundle();
- bool load(API::Object* initializationUserData);
- void setSandboxExtension(PassRefPtr<SandboxExtension> sandboxExtension) { m_sandboxExtension = sandboxExtension; }
+ bool initialize(const WebProcessCreationParameters&, API::Object* initializationUserData);
+
+ void setBundleParameter(const String&, const IPC::DataReference&);
+ void setBundleParameters(const IPC::DataReference&);
// API
void initializeClient(const WKBundleClientBase*);
@@ -93,20 +92,16 @@ public:
WebConnection* webConnectionToUIProcess() const;
// TestRunner only SPI
- void setShouldTrackVisitedLinks(bool);
- void setAlwaysAcceptCookies(bool);
- void removeAllVisitedLinks();
- void setCacheModel(uint32_t);
- void activateMacFontAscentHack();
void overrideBoolPreferenceForTestRunner(WebPageGroupProxy*, const String& preference, bool enabled);
- void overrideXSSAuditorEnabledForTestRunner(WebPageGroupProxy* pageGroup, bool enabled);
void setAllowUniversalAccessFromFileURLs(WebPageGroupProxy*, bool);
void setAllowFileAccessFromFileURLs(WebPageGroupProxy*, bool);
+ void setNeedsStorageAccessFromFileURLsQuirk(WebPageGroupProxy*, bool);
void setMinimumLogicalFontSize(WebPageGroupProxy*, int size);
void setFrameFlatteningEnabled(WebPageGroupProxy*, bool);
void setPluginsEnabled(WebPageGroupProxy*, bool);
void setJavaScriptCanAccessClipboard(WebPageGroupProxy*, bool);
void setPrivateBrowsingEnabled(WebPageGroupProxy*, bool);
+ void setUseDashboardCompatibilityMode(WebPageGroupProxy*, bool);
void setPopupBlockingEnabled(WebPageGroupProxy*, bool);
void setAuthorAndUserStylesEnabled(WebPageGroupProxy*, bool);
void setSpatialNavigationEnabled(WebPageGroupProxy*, bool);
@@ -133,19 +128,6 @@ public:
void removeUserStyleSheets(WebPageGroupProxy*, InjectedBundleScriptWorld*);
void removeAllUserContent(WebPageGroupProxy*);
- // Local storage API
- void clearAllDatabases();
- void setDatabaseQuota(uint64_t);
-
- // Application Cache API
- void clearApplicationCache();
- void clearApplicationCacheForOrigin(const String& origin);
- void setAppCacheMaximumSize(uint64_t);
- uint64_t appCacheUsageForOrigin(const String& origin);
- void setApplicationCacheOriginQuota(const String& origin, uint64_t);
- void resetApplicationCacheOriginQuota(const String& origin);
- PassRefPtr<API::Array> originsWithApplicationCache();
-
// Garbage collection API
void garbageCollectJavaScriptObjects();
void garbageCollectJavaScriptObjectsOnAlternateThreadForDebugging(bool waitUntilDone);
@@ -164,14 +146,16 @@ public:
void setTabKeyCyclesThroughElements(WebPage*, bool enabled);
void setSerialLoadingEnabled(bool);
- void setShadowDOMEnabled(bool);
- void setCSSRegionsEnabled(bool);
- void setCSSCompositingEnabled(bool);
- void setSeamlessIFramesEnabled(bool);
+ void setCSSAnimationTriggersEnabled(bool);
+ void setWebAnimationsEnabled(bool);
void dispatchPendingLoadRequests();
+#if PLATFORM(COCOA) && WK_API_ENABLED
+ WKWebProcessBundleParameters *bundleParameters();
+#endif
+
private:
- explicit InjectedBundle(const String&);
+ explicit InjectedBundle(const WebProcessCreationParameters&);
String m_path;
PlatformBundle m_platformBundle; // This is leaked right now, since we never unload the bundle/module.
@@ -179,6 +163,10 @@ private:
RefPtr<SandboxExtension> m_sandboxExtension;
InjectedBundleClient m_client;
+
+#if PLATFORM(COCOA) && WK_API_ENABLED
+ RetainPtr<WKWebProcessBundleParameters> m_bundleParameters;
+#endif
};
} // namespace WebKit