Changeset 198736 in webkit
- Timestamp:
- Mar 28, 2016, 8:56:53 AM (10 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 6 added
- 12 edited
-
CMakeLists.txt (modified) (5 diffs)
-
ChangeLog (modified) (1 diff)
-
DerivedSources.make (modified) (4 diffs)
-
UIProcess/Automation/WebAutomationSession.cpp (modified) (3 diffs)
-
UIProcess/Automation/WebAutomationSession.h (modified) (4 diffs)
-
UIProcess/Automation/WebAutomationSession.messages.in (added)
-
UIProcess/WebProcessPool.cpp (modified) (3 diffs)
-
UIProcess/WebProcessPool.h (modified) (1 diff)
-
WebKit2.xcodeproj/project.pbxproj (modified) (13 diffs)
-
WebProcess/Automation (added)
-
WebProcess/Automation/WebAutomationSessionProxy.cpp (added)
-
WebProcess/Automation/WebAutomationSessionProxy.h (added)
-
WebProcess/Automation/WebAutomationSessionProxy.js (added)
-
WebProcess/Automation/WebAutomationSessionProxy.messages.in (added)
-
WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp (modified) (2 diffs)
-
WebProcess/WebProcess.cpp (modified) (2 diffs)
-
WebProcess/WebProcess.h (modified) (4 diffs)
-
WebProcess/WebProcess.messages.in (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/CMakeLists.txt
r198678 r198736 43 43 "${WEBKIT2_DIR}/WebProcess" 44 44 "${WEBKIT2_DIR}/WebProcess/ApplicationCache" 45 "${WEBKIT2_DIR}/WebProcess/Automation" 45 46 "${WEBKIT2_DIR}/WebProcess/Battery" 46 47 "${WEBKIT2_DIR}/WebProcess/Cookies" … … 503 504 WebProcess/WebProcess.cpp 504 505 506 WebProcess/Automation/WebAutomationSessionProxy.cpp 507 505 508 WebProcess/Battery/WebBatteryManager.cpp 506 509 … … 674 677 UIProcess/WebVibrationProxy.messages.in 675 678 679 UIProcess/Automation/WebAutomationSession.messages.in 680 676 681 UIProcess/Databases/DatabaseProcessProxy.messages.in 677 682 … … 689 694 690 695 WebProcess/WebProcess.messages.in 696 697 WebProcess/Automation/WebAutomationSessionProxy.messages.in 691 698 692 699 WebProcess/Battery/WebBatteryManager.messages.in … … 799 806 ) 800 807 808 add_custom_command( 809 OUTPUT ${DERIVED_SOURCES_WEBKIT2_DIR}/WebAutomationSessionProxyScriptSource.h ${DERIVED_SOURCES_WEBKIT2_DIR}/WebAutomationSessionProxy.min.js 810 MAIN_DEPENDENCY ${WEBKIT2_DIR}/WebProcess/Automation/WebAutomationSessionProxy.js 811 DEPENDS ${JavaScriptCore_SCRIPTS_DIR}/xxd.pl ${JavaScriptCore_SCRIPTS_DIR}/jsmin.py 812 COMMAND ${CMAKE_COMMAND} -E echo "//# sourceURL=__WebAutomationInjectedScript__" > ${DERIVED_SOURCES_WEBKIT2_DIR}/WebAutomationSessionProxy.min.js 813 COMMAND ${PYTHON_EXECUTABLE} ${JavaScriptCore_SCRIPTS_DIR}/jsmin.py < ${WEBKIT2_DIR}/WebProcess/Automation/WebAutomationSessionProxy.js >> ${DERIVED_SOURCES_WEBKIT2_DIR}/WebAutomationSessionProxy.min.js 814 COMMAND ${PERL_EXECUTABLE} ${JavaScriptCore_SCRIPTS_DIR}/xxd.pl WebAutomationSessionProxyScriptSource ${DERIVED_SOURCES_WEBKIT2_DIR}/WebAutomationSessionProxy.min.js ${DERIVED_SOURCES_WEBKIT2_DIR}/WebAutomationSessionProxyScriptSource.h 815 VERBATIM) 816 817 list(APPEND WebKit2_HEADERS 818 ${DERIVED_SOURCES_WEBKIT2_DIR}/WebauotmationSessionProxyScriptSource.h 819 ) 820 801 821 WEBKIT_FRAMEWORK(WebKit2) 802 822 add_dependencies(WebKit2 WebCore ${WEBKIT2_EXTRA_DEPENDENCIES}) -
trunk/Source/WebKit2/ChangeLog
r198733 r198736 1 2016-03-14 Timothy Hatcher <timothy@apple.com> 2 3 Add WebAutomationSessionProxy for WebProcess side automation tasks 4 5 https://bugs.webkit.org/show_bug.cgi?id=155221 6 rdar://problem/25054868 7 8 Reviewed by Joseph Pecoraro. 9 10 * CMakeLists.txt: Add build step to build-in WebAutomationSessionProxy.js. 11 * DerivedSources.make: Ditto. 12 13 * UIProcess/Automation/WebAutomationSession.cpp: 14 (WebKit::WebAutomationSession::~WebAutomationSession): 15 (WebKit::WebAutomationSession::setProcessPool): Add / remove message receiver. 16 * UIProcess/Automation/WebAutomationSession.h: 17 18 * UIProcess/Automation/WebAutomationSession.messages.in: Added. 19 Test message to get things to build. 20 21 * UIProcess/WebProcessPool.cpp: 22 (WebKit::WebProcessPool::removeMessageReceiver): 23 (WebKit::WebProcessPool::setAutomationSession): 24 * UIProcess/WebProcessPool.h: 25 26 * WebKit2.xcodeproj/project.pbxproj: Added new files. 27 28 * WebProcess/Automation/WebAutomationSessionProxy.cpp: Added. 29 (WebKit::toJSString): 30 (WebKit::toJSValue): 31 (WebKit::WebAutomationSessionProxy::WebAutomationSessionProxy): 32 (WebKit::WebAutomationSessionProxy::~WebAutomationSessionProxy): 33 (WebKit::evaluate): 34 (WebKit::createUUID): 35 (WebKit::WebAutomationSessionProxy::scriptObjectForFrame): 36 (WebKit::WebAutomationSessionProxy::didClearWindowObjectForFrame): 37 Create a script object per frame that is evaluated from WebAutomationSessionProxy.js. 38 Clear the script object when the window object is cleared. 39 40 * WebProcess/Automation/WebAutomationSessionProxy.h: Added. 41 (WebKit::WebAutomationSessionProxy::test): 42 Added test message to let the messages files build. 43 44 * WebProcess/Automation/WebAutomationSessionProxy.js: Added. 45 46 * WebProcess/Automation/WebAutomationSessionProxy.messages.in: Added. 47 48 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: 49 (WebKit::WebFrameLoaderClient::dispatchDidClearWindowObjectInWorld): 50 Call WebAutomationSessionProxy::didClearWindowObjectForFrame to clear the script object. 51 52 * WebProcess/WebProcess.cpp: 53 (WebKit::WebProcess::ensureAutomationSessionProxy): 54 (WebKit::WebProcess::destroyAutomationSessionProxy): 55 Creates and destroys the WebAutomationSessionProxy when the UIProcess WebAutomationSession 56 is set or removed on the WebProcessPool. 57 58 * WebProcess/WebProcess.h: 59 (WebKit::WebProcess::automationSessionProxy): Added. 60 61 * WebProcess/WebProcess.messages.in: Added. Test message to get things to build. 62 1 63 2016-03-28 Dan Bernstein <mitz@apple.com> 2 64 -
trunk/Source/WebKit2/DerivedSources.make
r198678 r198736 37 37 $(WebKit2)/Shared/mac \ 38 38 $(WebKit2)/WebProcess/ApplicationCache \ 39 $(WebKit2)/WebProcess/Automation \ 39 40 $(WebKit2)/WebProcess/Cookies \ 40 41 $(WebKit2)/WebProcess/Databases/IndexedDB \ … … 71 72 $(WEBKITADDITIONS_HEADER_SEARCH_PATHS) \ 72 73 # 74 75 PYTHON = python 76 PERL = perl 77 78 ifeq ($(OS),Windows_NT) 79 DELETE = cmd //C del 80 else 81 DELETE = rm -f 82 endif 73 83 74 84 MESSAGE_RECEIVERS = \ … … 109 119 VisitedLinkStore \ 110 120 VisitedLinkTableController \ 121 WebAutomationSession \ 122 WebAutomationSessionProxy \ 111 123 WebConnection \ 112 124 WebCookieManager \ … … 220 232 221 233 all : $(firstword $(AUTOMATION_PROTOCOL_OUTPUT_FILES)) 234 235 %ScriptSource.h : %.js $(JavaScriptCore_SCRIPTS_DIR)/jsmin.py $(JavaScriptCore_SCRIPTS_DIR)/xxd.pl 236 echo "//# sourceURL=__WebAutomationInjectedScript__" > $(basename $(notdir $<)).min.js 237 $(PYTHON) $(JavaScriptCore_SCRIPTS_DIR)/jsmin.py < $< >> $(basename $(notdir $<)).min.js 238 $(PERL) $(JavaScriptCore_SCRIPTS_DIR)/xxd.pl $(basename $(notdir $<))ScriptSource $(basename $(notdir $<)).min.js $@ 239 $(DELETE) $(basename $(notdir $<)).min.js 240 241 all : WebAutomationSessionProxyScriptSource.h -
trunk/Source/WebKit2/UIProcess/Automation/WebAutomationSession.cpp
r198678 r198736 29 29 #include "APIAutomationSessionClient.h" 30 30 #include "AutomationProtocolObjects.h" 31 #include "WebAutomationSessionMessages.h" 32 #include "WebAutomationSessionProxyMessages.h" 31 33 #include "WebProcessPool.h" 32 34 #include <JavaScriptCore/InspectorBackendDispatcher.h> … … 58 60 { 59 61 ASSERT(!m_client); 62 63 if (m_processPool) 64 m_processPool->removeMessageReceiver(Messages::WebAutomationSession::messageReceiverName()); 60 65 } 61 66 … … 63 68 { 64 69 m_client = WTFMove(client); 70 } 71 72 void WebAutomationSession::setProcessPool(WebKit::WebProcessPool* processPool) 73 { 74 if (m_processPool) 75 m_processPool->removeMessageReceiver(Messages::WebAutomationSession::messageReceiverName()); 76 77 m_processPool = processPool; 78 79 if (m_processPool) 80 m_processPool->addMessageReceiver(Messages::WebAutomationSession::messageReceiverName(), *this); 65 81 } 66 82 -
trunk/Source/WebKit2/UIProcess/Automation/WebAutomationSession.h
r198678 r198736 29 29 #include "APIObject.h" 30 30 #include "AutomationBackendDispatchers.h" 31 #include "Connection.h" 31 32 #include <wtf/Forward.h> 32 33 … … 50 51 class WebProcessPool; 51 52 52 class WebAutomationSession final : public API::ObjectImpl<API::Object::Type::AutomationSession> 53 class WebAutomationSession final : public API::ObjectImpl<API::Object::Type::AutomationSession>, public IPC::MessageReceiver 53 54 #if ENABLE(REMOTE_INSPECTOR) 54 55 , public Inspector::RemoteAutomationTarget … … 69 70 70 71 WebKit::WebProcessPool* processPool() const { return m_processPool; } 71 void setProcessPool(WebKit::WebProcessPool* processPool) { m_processPool = processPool; }72 void setProcessPool(WebKit::WebProcessPool*); 72 73 73 74 #if ENABLE(REMOTE_INSPECTOR) … … 94 95 String handleForWebPageProxy(WebKit::WebPageProxy*); 95 96 97 // Implemented in generated WebAutomationSessionMessageReceiver.cpp 98 void didReceiveMessage(IPC::Connection&, IPC::MessageDecoder&) override; 99 100 // Called by WebAutomationSession messages 101 // FIXME: Add message functions here. 102 void test() { }; 103 96 104 WebKit::WebProcessPool* m_processPool { nullptr }; 97 105 std::unique_ptr<API::AutomationSessionClient> m_client; -
trunk/Source/WebKit2/UIProcess/WebProcessPool.cpp
r198189 r198736 648 648 process->send(Messages::WebProcess::EnsurePrivateBrowsingSession(SessionID::legacyPrivateSessionID()), 0); 649 649 650 if (m_automationSession) 651 process->send(Messages::WebProcess::EnsureAutomationSessionProxy(m_automationSession->sessionIdentifier()), 0); 652 650 653 m_processes.append(process.ptr()); 651 654 … … 993 996 } 994 997 998 void WebProcessPool::removeMessageReceiver(IPC::StringReference messageReceiverName) 999 { 1000 m_messageReceiverMap.removeMessageReceiver(messageReceiverName); 1001 } 1002 995 1003 void WebProcessPool::removeMessageReceiver(IPC::StringReference messageReceiverName, uint64_t destinationID) 996 1004 { … … 1128 1136 m_automationSession->init(); 1129 1137 m_automationSession->setProcessPool(this); 1130 } 1138 1139 sendToAllProcesses(Messages::WebProcess::EnsureAutomationSessionProxy(m_automationSession->sessionIdentifier())); 1140 } else 1141 sendToAllProcesses(Messages::WebProcess::DestroyAutomationSessionProxy()); 1131 1142 #endif 1132 1143 } -
trunk/Source/WebKit2/UIProcess/WebProcessPool.h
r198189 r198736 127 127 void addMessageReceiver(IPC::StringReference messageReceiverName, IPC::MessageReceiver&); 128 128 void addMessageReceiver(IPC::StringReference messageReceiverName, uint64_t destinationID, IPC::MessageReceiver&); 129 void removeMessageReceiver(IPC::StringReference messageReceiverName); 129 130 void removeMessageReceiver(IPC::StringReference messageReceiverName, uint64_t destinationID); 130 131 -
trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj
r198678 r198736 518 518 1AFE436618B6C081009C7A48 /* UIDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AFE436418B6C081009C7A48 /* UIDelegate.h */; }; 519 519 1AFF49001833DE78009AB15A /* WKDeprecatedFunctions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AFF48FE1833DE78009AB15A /* WKDeprecatedFunctions.cpp */; }; 520 1C0A19461C8FF1A800FE0EBB /* WebAutomationSessionProxy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1C0A19441C8FF1A800FE0EBB /* WebAutomationSessionProxy.cpp */; }; 521 1C0A19471C8FF1A800FE0EBB /* WebAutomationSessionProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C0A19451C8FF1A800FE0EBB /* WebAutomationSessionProxy.h */; }; 522 1C0A19531C8FFDFB00FE0EBB /* WebAutomationSessionProxyMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1C0A19511C8FFDFB00FE0EBB /* WebAutomationSessionProxyMessageReceiver.cpp */; }; 523 1C0A19541C8FFDFB00FE0EBB /* WebAutomationSessionProxyMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C0A19521C8FFDFB00FE0EBB /* WebAutomationSessionProxyMessages.h */; }; 524 1C0A19571C90068F00FE0EBB /* WebAutomationSessionMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1C0A19551C90068F00FE0EBB /* WebAutomationSessionMessageReceiver.cpp */; }; 525 1C0A19581C90068F00FE0EBB /* WebAutomationSessionMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C0A19561C90068F00FE0EBB /* WebAutomationSessionMessages.h */; }; 526 1C0A195C1C916E1B00FE0EBB /* WebAutomationSessionProxyScriptSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C0A195B1C916E1B00FE0EBB /* WebAutomationSessionProxyScriptSource.h */; }; 520 527 1C891D6519B124FF00BA79DD /* WebInspectorUI.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1C891D6219B124FF00BA79DD /* WebInspectorUI.cpp */; }; 521 528 1C891D6619B124FF00BA79DD /* WebInspectorUI.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C891D6319B124FF00BA79DD /* WebInspectorUI.h */; }; … … 2477 2484 1AFF48FE1833DE78009AB15A /* WKDeprecatedFunctions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKDeprecatedFunctions.cpp; sourceTree = "<group>"; }; 2478 2485 1BB417C912C00CCA002BE67B /* TextCheckerCompletion.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TextCheckerCompletion.cpp; sourceTree = "<group>"; }; 2486 1C0A19441C8FF1A800FE0EBB /* WebAutomationSessionProxy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebAutomationSessionProxy.cpp; sourceTree = "<group>"; }; 2487 1C0A19451C8FF1A800FE0EBB /* WebAutomationSessionProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebAutomationSessionProxy.h; sourceTree = "<group>"; }; 2488 1C0A19481C8FF30E00FE0EBB /* WebAutomationSessionProxy.messages.in */ = {isa = PBXFileReference; lastKnownFileType = text; path = WebAutomationSessionProxy.messages.in; sourceTree = "<group>"; }; 2489 1C0A19511C8FFDFB00FE0EBB /* WebAutomationSessionProxyMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebAutomationSessionProxyMessageReceiver.cpp; sourceTree = "<group>"; }; 2490 1C0A19521C8FFDFB00FE0EBB /* WebAutomationSessionProxyMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebAutomationSessionProxyMessages.h; sourceTree = "<group>"; }; 2491 1C0A19551C90068F00FE0EBB /* WebAutomationSessionMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebAutomationSessionMessageReceiver.cpp; sourceTree = "<group>"; }; 2492 1C0A19561C90068F00FE0EBB /* WebAutomationSessionMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebAutomationSessionMessages.h; sourceTree = "<group>"; }; 2493 1C0A19591C9006EA00FE0EBB /* WebAutomationSession.messages.in */ = {isa = PBXFileReference; lastKnownFileType = text; path = WebAutomationSession.messages.in; sourceTree = "<group>"; }; 2494 1C0A195A1C91669500FE0EBB /* WebAutomationSessionProxy.js */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.javascript; path = WebAutomationSessionProxy.js; sourceTree = "<group>"; }; 2495 1C0A195B1C916E1B00FE0EBB /* WebAutomationSessionProxyScriptSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebAutomationSessionProxyScriptSource.h; sourceTree = "<group>"; }; 2479 2496 1C77C1951288A872006A742F /* WebInspectorProxy.messages.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WebInspectorProxy.messages.in; sourceTree = "<group>"; }; 2480 2497 1C891D6219B124FF00BA79DD /* WebInspectorUI.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebInspectorUI.cpp; sourceTree = "<group>"; }; … … 4710 4727 sourceTree = "<group>"; 4711 4728 }; 4729 1C0A19431C8FF1A800FE0EBB /* Automation */ = { 4730 isa = PBXGroup; 4731 children = ( 4732 1C0A19441C8FF1A800FE0EBB /* WebAutomationSessionProxy.cpp */, 4733 1C0A19451C8FF1A800FE0EBB /* WebAutomationSessionProxy.h */, 4734 1C0A195A1C91669500FE0EBB /* WebAutomationSessionProxy.js */, 4735 1C0A19481C8FF30E00FE0EBB /* WebAutomationSessionProxy.messages.in */, 4736 ); 4737 path = Automation; 4738 sourceTree = "<group>"; 4739 }; 4712 4740 1F0181681858DC1500F92884 /* Cocoa */ = { 4713 4741 isa = PBXGroup; … … 5596 5624 9955A6EA1C7980BB00EB6A93 /* WebAutomationSession.cpp */, 5597 5625 9955A6EB1C7980BB00EB6A93 /* WebAutomationSession.h */, 5626 1C0A19591C9006EA00FE0EBB /* WebAutomationSession.messages.in */, 5598 5627 ); 5599 5628 path = Automation; … … 5655 5684 children = ( 5656 5685 7C6E70F818B2D47E00F24E2E /* cocoa */, 5686 1C0A19431C8FF1A800FE0EBB /* Automation */, 5657 5687 3309344B1315B93A0097A7BC /* Cookies */, 5658 5688 512A9754180DF9270039A149 /* Databases */, … … 6876 6906 1A8E7D3A18C15149005A702A /* VisitedLinkTableControllerMessageReceiver.cpp */, 6877 6907 1A8E7D3B18C15149005A702A /* VisitedLinkTableControllerMessages.h */, 6908 1C0A19551C90068F00FE0EBB /* WebAutomationSessionMessageReceiver.cpp */, 6909 1C0A19561C90068F00FE0EBB /* WebAutomationSessionMessages.h */, 6910 1C0A19511C8FFDFB00FE0EBB /* WebAutomationSessionProxyMessageReceiver.cpp */, 6911 1C0A19521C8FFDFB00FE0EBB /* WebAutomationSessionProxyMessages.h */, 6912 1C0A195B1C916E1B00FE0EBB /* WebAutomationSessionProxyScriptSource.h */, 6878 6913 1A1FEC1A1627B45600700F6D /* WebConnectionMessageReceiver.cpp */, 6879 6914 1A1FEC1B1627B45700700F6D /* WebConnectionMessages.h */, … … 7349 7384 BCA8C6B011E3C08700812FB7 /* InjectedBundlePageUIClient.h in Headers */, 7350 7385 9955A6F71C7986E500EB6A93 /* AutomationProtocolObjects.h in Headers */, 7386 1C0A19581C90068F00FE0EBB /* WebAutomationSessionMessages.h in Headers */, 7351 7387 BC33E0D112408E8600360F3F /* InjectedBundleRangeHandle.h in Headers */, 7352 7388 BC14DF77120B5B7900826C0C /* InjectedBundleScriptWorld.h in Headers */, … … 7365 7401 CE1A0BD51A48E6C60054EF74 /* ManagedConfigurationSPI.h in Headers */, 7366 7402 51933DEF1965EB31008AC3EA /* MenuUtilities.h in Headers */, 7403 1C0A195C1C916E1B00FE0EBB /* WebAutomationSessionProxyScriptSource.h in Headers */, 7367 7404 1A232903162C867300D82F7A /* MessageDecoder.h in Headers */, 7368 7405 1A2328FF162C866A00D82F7A /* MessageEncoder.h in Headers */, … … 7428 7465 1A2D82A7127F4EAB001EB962 /* NPObjectProxy.h in Headers */, 7429 7466 1A2D82A9127F4EAB001EB962 /* NPRemoteObjectMap.h in Headers */, 7467 1C0A19471C8FF1A800FE0EBB /* WebAutomationSessionProxy.h in Headers */, 7430 7468 1A2161B011F37664008AD0F5 /* NPRuntimeObjectMap.h in Headers */, 7431 7469 1A2162B111F38971008AD0F5 /* NPRuntimeUtilities.h in Headers */, … … 7456 7494 1A179780137EE82C00F97D45 /* PluginCreationParameters.h in Headers */, 7457 7495 7C3F8C91173AF52D007B7F39 /* PluginInformation.h in Headers */, 7496 1C0A19541C8FFDFB00FE0EBB /* WebAutomationSessionProxyMessages.h in Headers */, 7458 7497 1AEFCC1211D01F96008219D3 /* PluginInfoStore.h in Headers */, 7459 7498 1A3D610213A7CC2A00F95D4E /* PluginModuleInfo.h in Headers */, … … 8877 8916 1A2D8439127F65D5001EB962 /* NPObjectMessageReceiverMessageReceiver.cpp in Sources */, 8878 8917 1A2D82A6127F4EAB001EB962 /* NPObjectProxy.cpp in Sources */, 8918 1C0A19531C8FFDFB00FE0EBB /* WebAutomationSessionProxyMessageReceiver.cpp in Sources */, 8879 8919 1A2D82A8127F4EAB001EB962 /* NPRemoteObjectMap.cpp in Sources */, 8880 8920 1A2161B111F37664008AD0F5 /* NPRuntimeObjectMap.cpp in Sources */, … … 9118 9158 1C891D6519B124FF00BA79DD /* WebInspectorUI.cpp in Sources */, 9119 9159 1CA8B954127C891500576C2B /* WebInspectorUIMac.mm in Sources */, 9160 1C0A19571C90068F00FE0EBB /* WebAutomationSessionMessageReceiver.cpp in Sources */, 9120 9161 1CBBE4A019B66C53006B7D81 /* WebInspectorUIMessageReceiver.cpp in Sources */, 9121 9162 2DA944A11884E4F000ED86DB /* WebIOSEventFactory.mm in Sources */, … … 9213 9254 BCC5715C115ADAEF001CCAF9 /* WebSystemInterface.mm in Sources */, 9214 9255 51032F18180F73BB00961BB7 /* WebToDatabaseProcessConnection.cpp in Sources */, 9256 1C0A19461C8FF1A800FE0EBB /* WebAutomationSessionProxy.cpp in Sources */, 9215 9257 C0337DD8127A51B6008FF4F4 /* WebTouchEvent.cpp in Sources */, 9216 9258 2DA944A31884E4F000ED86DB /* WebTouchEventIOS.cpp in Sources */, -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
r196223 r198736 38 38 #include "UserData.h" 39 39 #include "WKBundleAPICast.h" 40 #include "WebAutomationSessionProxy.h" 40 41 #include "WebBackForwardListProxy.h" 41 42 #include "WebCoreArgumentCoders.h" … … 1580 1581 webPage->injectedBundleLoaderClient().didClearWindowObjectForFrame(webPage, m_frame, world); 1581 1582 1583 if (auto automationSessionProxy = WebProcess::singleton().automationSessionProxy()) 1584 automationSessionProxy->didClearWindowObjectForFrame(*m_frame); 1585 1582 1586 #if HAVE(ACCESSIBILITY) && (PLATFORM(GTK) || PLATFORM(EFL)) 1583 1587 // Ensure the accessibility hierarchy is updated. -
trunk/Source/WebKit2/WebProcess/WebProcess.cpp
r198457 r198736 42 42 #include "StatisticsData.h" 43 43 #include "UserData.h" 44 #include "WebAutomationSessionProxy.h" 44 45 #include "WebConnectionToUIProcess.h" 45 46 #include "WebCookieManager.h" … … 1439 1440 #endif 1440 1441 1442 void WebProcess::ensureAutomationSessionProxy(const String& sessionIdentifier) 1443 { 1444 m_automationSessionProxy = std::make_unique<WebAutomationSessionProxy>(sessionIdentifier); 1445 } 1446 1447 void WebProcess::destroyAutomationSessionProxy() 1448 { 1449 m_automationSessionProxy = nullptr; 1450 } 1451 1441 1452 void WebProcess::prefetchDNS(const String& hostname) 1442 1453 { -
trunk/Source/WebKit2/WebProcess/WebProcess.h
r198457 r198736 77 77 class ObjCObjectGraph; 78 78 class UserData; 79 class WebAutomationSessionProxy; 79 80 class WebConnectionToUIProcess; 80 81 class WebFrame; … … 211 212 void prefetchDNS(const String&); 212 213 214 WebAutomationSessionProxy* automationSessionProxy() { return m_automationSessionProxy.get(); } 215 213 216 private: 214 217 WebProcess(); … … 285 288 void actualPrepareToSuspend(ShouldAcknowledgeWhenReadyToSuspend); 286 289 290 void ensureAutomationSessionProxy(const String& sessionIdentifier); 291 void destroyAutomationSessionProxy(); 292 287 293 // ChildProcess 288 294 void initializeProcess(const ChildProcessInitializationParameters&) override; … … 354 360 WebCore::HysteresisActivity m_dnsPrefetchHystereris; 355 361 362 std::unique_ptr<WebAutomationSessionProxy> m_automationSessionProxy; 363 356 364 #if ENABLE(DATABASE_PROCESS) 357 365 void ensureWebToDatabaseProcessConnection(); -
trunk/Source/WebKit2/WebProcess/WebProcess.messages.in
r198189 r198736 93 93 #endif 94 94 95 EnsureAutomationSessionProxy(String sessionIdentifier) 96 DestroyAutomationSessionProxy() 97 95 98 ProcessWillSuspendImminently() -> (bool handled) 96 99 PrepareToSuspend()
Note:
See TracChangeset
for help on using the changeset viewer.