summaryrefslogtreecommitdiff
path: root/Source/WebKit2/UIProcess/Plugins/PluginProcessProxy.h
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@digia.com>2013-09-13 12:51:20 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-19 20:50:05 +0200
commitd441d6f39bb846989d95bcf5caf387b42414718d (patch)
treee367e64a75991c554930278175d403c072de6bb8 /Source/WebKit2/UIProcess/Plugins/PluginProcessProxy.h
parent0060b2994c07842f4c59de64b5e3e430525c4b90 (diff)
downloadqtwebkit-d441d6f39bb846989d95bcf5caf387b42414718d.tar.gz
Import Qt5x2 branch of QtWebkit for Qt 5.2
Importing a new snapshot of webkit. Change-Id: I2d01ad12cdc8af8cb015387641120a9d7ea5f10c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Diffstat (limited to 'Source/WebKit2/UIProcess/Plugins/PluginProcessProxy.h')
-rw-r--r--Source/WebKit2/UIProcess/Plugins/PluginProcessProxy.h50
1 files changed, 25 insertions, 25 deletions
diff --git a/Source/WebKit2/UIProcess/Plugins/PluginProcessProxy.h b/Source/WebKit2/UIProcess/Plugins/PluginProcessProxy.h
index 194d7a373..1cb2268a9 100644
--- a/Source/WebKit2/UIProcess/Plugins/PluginProcessProxy.h
+++ b/Source/WebKit2/UIProcess/Plugins/PluginProcessProxy.h
@@ -28,9 +28,11 @@
#if ENABLE(PLUGIN_PROCESS)
+#include "ChildProcessProxy.h"
#include "Connection.h"
#include "PluginModuleInfo.h"
#include "PluginProcess.h"
+#include "PluginProcessAttributes.h"
#include "ProcessLauncher.h"
#include "WebProcessProxyMessages.h"
#include <wtf/Deque.h>
@@ -61,14 +63,15 @@ struct RawPluginMetaData {
};
#endif
-class PluginProcessProxy : public RefCounted<PluginProcessProxy>, CoreIPC::Connection::Client, ProcessLauncher::Client {
+class PluginProcessProxy : public ChildProcessProxy {
public:
- static PassRefPtr<PluginProcessProxy> create(PluginProcessManager*, const PluginModuleInfo&, PluginProcess::Type);
+ static PassRefPtr<PluginProcessProxy> create(PluginProcessManager*, const PluginProcessAttributes&, uint64_t pluginProcessToken);
~PluginProcessProxy();
- const PluginModuleInfo& pluginInfo() const { return m_pluginInfo; }
+ const PluginProcessAttributes& pluginProcessAttributes() const { return m_pluginProcessAttributes; }
+ uint64_t pluginProcessToken() const { return m_pluginProcessToken; }
- // Asks the plug-in process to create a new connection to a web process. The connection identifier will be
+ // Asks the plug-in process to create a new connection to a web process. The connection identifier will be
// encoded in the given argument encoder and sent back to the connection of the given web process.
void getPluginProcessConnection(PassRefPtr<Messages::WebProcessProxy::GetPluginProcessConnection::DelayedReply>);
@@ -78,15 +81,10 @@ public:
// Asks the plug-in process to clear the data for the given sites.
void clearSiteData(WebPluginSiteDataManager*, const Vector<String>& sites, uint64_t flags, uint64_t maxAgeInSeconds, uint64_t callbackID);
- // Terminates the plug-in process.
- void terminate();
-
bool isValid() const { return m_connection; }
- PluginProcess::Type processType() const { return m_processType; }
-
#if PLATFORM(MAC)
- void setApplicationIsOccluded(bool);
+ void setProcessSuppressionEnabled(bool);
// Returns whether the plug-in needs the heap to be marked executable.
static bool pluginNeedsExecutableHeap(const PluginModuleInfo&);
@@ -100,12 +98,17 @@ public:
#endif
private:
- PluginProcessProxy(PluginProcessManager*, const PluginModuleInfo&, PluginProcess::Type);
+ PluginProcessProxy(PluginProcessManager*, const PluginProcessAttributes&, uint64_t pluginProcessToken);
+
+ virtual void getLaunchOptions(ProcessLauncher::LaunchOptions&) OVERRIDE;
+ void platformGetLaunchOptions(ProcessLauncher::LaunchOptions&, const PluginProcessAttributes&);
void pluginProcessCrashedOrFailedToLaunch();
// CoreIPC::Connection::Client
- virtual void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::MessageDecoder&) OVERRIDE;
+ virtual void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageDecoder&) OVERRIDE;
+ virtual void didReceiveSyncMessage(CoreIPC::Connection*, CoreIPC::MessageDecoder&, OwnPtr<CoreIPC::MessageEncoder>&) OVERRIDE;
+
virtual void didClose(CoreIPC::Connection*) OVERRIDE;
virtual void didReceiveInvalidMessage(CoreIPC::Connection*, CoreIPC::StringReference messageReceiverName, CoreIPC::StringReference messageName) OVERRIDE;
@@ -113,7 +116,6 @@ private:
virtual void didFinishLaunching(ProcessLauncher*, CoreIPC::Connection::Identifier);
// Message handlers
- void didReceivePluginProcessProxyMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::MessageDecoder&);
void didCreateWebProcessConnection(const CoreIPC::Attachment&, bool supportsAsynchronousPluginInitialization);
void didGetSitesWithData(const Vector<String>& sites, uint64_t callbackID);
void didClearSiteData(uint64_t callbackID);
@@ -132,27 +134,27 @@ private:
void endModal();
void applicationDidBecomeActive();
+ void openPluginPreferencePane();
+ void launchProcess(const String& launchPath, const Vector<String>& arguments, bool& result);
+ void launchApplicationAtURL(const String& urlString, const Vector<String>& arguments, bool& result);
+ void openURL(const String& url, bool& result, int32_t& status, String& launchedURLString);
#endif
- static void platformInitializeLaunchOptions(ProcessLauncher::LaunchOptions&, const PluginModuleInfo& pluginInfo);
void platformInitializePluginProcess(PluginProcessCreationParameters& parameters);
// The plug-in host process manager.
PluginProcessManager* m_pluginProcessManager;
-
- // Information about the plug-in.
- PluginModuleInfo m_pluginInfo;
+
+ PluginProcessAttributes m_pluginProcessAttributes;
+ uint64_t m_pluginProcessToken;
// The connection to the plug-in host process.
RefPtr<CoreIPC::Connection> m_connection;
- // The process launcher for the plug-in host process.
- RefPtr<ProcessLauncher> m_processLauncher;
-
- Deque<RefPtr<Messages::WebProcessProxy::GetPluginProcessConnection::DelayedReply> > m_pendingConnectionReplies;
+ Deque<RefPtr<Messages::WebProcessProxy::GetPluginProcessConnection::DelayedReply>> m_pendingConnectionReplies;
Vector<uint64_t> m_pendingGetSitesRequests;
- HashMap<uint64_t, RefPtr<WebPluginSiteDataManager> > m_pendingGetSitesReplies;
+ HashMap<uint64_t, RefPtr<WebPluginSiteDataManager>> m_pendingGetSitesReplies;
struct ClearSiteDataRequest {
Vector<String> sites;
@@ -161,7 +163,7 @@ private:
uint64_t callbackID;
};
Vector<ClearSiteDataRequest> m_pendingClearSiteDataRequests;
- HashMap<uint64_t, RefPtr<WebPluginSiteDataManager> > m_pendingClearSiteDataReplies;
+ HashMap<uint64_t, RefPtr<WebPluginSiteDataManager>> m_pendingClearSiteDataReplies;
// If createPluginConnection is called while the process is still launching we'll keep count of it and send a bunch of requests
// when the process finishes launching.
@@ -174,8 +176,6 @@ private:
bool m_fullscreenWindowIsShowing;
unsigned m_preFullscreenAppPresentationOptions;
#endif
-
- PluginProcess::Type m_processType;
};
} // namespace WebKit