Rename shared() static member functions to singleton() for singleton classes.
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 30 Jan 2015 20:49:33 +0000 (20:49 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 30 Jan 2015 20:49:33 +0000 (20:49 +0000)
https://bugs.webkit.org/show_bug.cgi?id=141088

Reviewed by Ryosuke Niwa and Benjamin Poulain.

Rename shared() static member functions to singleton() for singleton
classes as per the recent coding style change.
Source/JavaScriptCore:

* inspector/remote/RemoteInspector.h:
* inspector/remote/RemoteInspector.mm:
(Inspector::RemoteInspector::singleton):
(Inspector::RemoteInspector::start):
(Inspector::RemoteInspector::shared): Deleted.
* inspector/remote/RemoteInspectorDebuggable.cpp:
(Inspector::RemoteInspectorDebuggable::~RemoteInspectorDebuggable):
(Inspector::RemoteInspectorDebuggable::init):
(Inspector::RemoteInspectorDebuggable::update):
(Inspector::RemoteInspectorDebuggable::setRemoteDebuggingAllowed):
(Inspector::RemoteInspectorDebuggable::pauseWaitingForAutomaticInspection):
(Inspector::RemoteInspectorDebuggable::unpauseForInitializedInspector):
* inspector/remote/RemoteInspectorDebuggableConnection.mm:
(Inspector::RemoteInspectorDebuggableConnection::setup):
(Inspector::RemoteInspectorDebuggableConnection::sendMessageToFrontend):

Source/WebKit:

* Storage/WebDatabaseProvider.cpp:
(WebDatabaseProvider::singleton):
(WebDatabaseProvider::shared): Deleted.
* Storage/WebDatabaseProvider.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179409 268f45cc-cd09-0410-ab3c-d52691b4dbfc

281 files changed:
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/inspector/remote/RemoteInspector.h
Source/JavaScriptCore/inspector/remote/RemoteInspector.mm
Source/JavaScriptCore/inspector/remote/RemoteInspectorDebuggable.cpp
Source/JavaScriptCore/inspector/remote/RemoteInspectorDebuggableConnection.mm
Source/WebCore/ChangeLog
Source/WebCore/Modules/gamepad/GamepadManager.cpp
Source/WebCore/Modules/gamepad/GamepadManager.h
Source/WebCore/Modules/gamepad/NavigatorGamepad.cpp
Source/WebCore/Modules/mediastream/MediaStreamTrack.cpp
Source/WebCore/Modules/mediastream/UserMediaRequest.cpp
Source/WebCore/WebCore.exp.in
Source/WebCore/bindings/js/JSCryptoAlgorithmDictionary.cpp
Source/WebCore/bindings/js/JSCryptoKeySerializationJWK.cpp
Source/WebCore/bindings/js/JSSubtleCryptoCustom.cpp
Source/WebCore/crypto/CryptoAlgorithmRegistry.cpp
Source/WebCore/crypto/CryptoAlgorithmRegistry.h
Source/WebCore/crypto/CryptoKey.cpp
Source/WebCore/crypto/keys/CryptoKeyHMAC.cpp
Source/WebCore/crypto/mac/CryptoKeyRSAMac.cpp
Source/WebCore/history/BackForwardList.cpp
Source/WebCore/history/CachedFrame.cpp
Source/WebCore/history/HistoryItem.cpp
Source/WebCore/history/PageCache.cpp
Source/WebCore/history/PageCache.h
Source/WebCore/loader/CrossOriginPreflightResultCache.cpp
Source/WebCore/loader/CrossOriginPreflightResultCache.h
Source/WebCore/loader/DocumentThreadableLoader.cpp
Source/WebCore/loader/FrameLoader.cpp
Source/WebCore/loader/HistoryController.cpp
Source/WebCore/page/DOMWindow.cpp
Source/WebCore/page/DebugPageOverlays.cpp
Source/WebCore/page/DebugPageOverlays.h
Source/WebCore/page/Frame.cpp
Source/WebCore/page/Page.cpp
Source/WebCore/page/PageGroup.cpp
Source/WebCore/page/Settings.cpp
Source/WebCore/page/scrolling/ScrollingThread.cpp
Source/WebCore/page/scrolling/ScrollingThread.h
Source/WebCore/platform/GamepadProvider.cpp
Source/WebCore/platform/GamepadProvider.h
Source/WebCore/platform/MemoryPressureHandler.cpp
Source/WebCore/platform/graphics/ShadowBlur.cpp
Source/WebCore/platform/graphics/ca/win/CACFLayerTreeHost.cpp
Source/WebCore/platform/graphics/ca/win/LayerChangesFlusher.cpp
Source/WebCore/platform/graphics/ca/win/LayerChangesFlusher.h
Source/WebCore/platform/ios/wak/FloatingPointEnvironment.cpp
Source/WebCore/platform/ios/wak/FloatingPointEnvironment.h
Source/WebCore/platform/ios/wak/WebCoreThread.mm
Source/WebCore/platform/mac/HIDGamepadProvider.cpp
Source/WebCore/platform/mac/HIDGamepadProvider.h
Source/WebCore/platform/mediastream/MediaStreamCenter.cpp
Source/WebCore/platform/mediastream/MediaStreamCenter.h
Source/WebCore/platform/mediastream/mac/AVCaptureDeviceManager.h
Source/WebCore/platform/mediastream/mac/AVCaptureDeviceManager.mm
Source/WebCore/platform/mediastream/mac/MediaStreamCenterMac.cpp
Source/WebCore/platform/network/DNSResolveQueue.cpp
Source/WebCore/platform/network/DNSResolveQueue.h
Source/WebCore/platform/network/cf/DNSCFNet.cpp
Source/WebCore/platform/network/soup/DNSSoup.cpp
Source/WebCore/testing/Internals.cpp
Source/WebCore/testing/MockPageOverlayClient.cpp
Source/WebCore/testing/MockPageOverlayClient.h
Source/WebCore/workers/WorkerThread.cpp
Source/WebKit/ChangeLog
Source/WebKit/Storage/WebDatabaseProvider.cpp
Source/WebKit/Storage/WebDatabaseProvider.h
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/History/WebBackForwardList.mm
Source/WebKit/mac/Misc/WebCache.mm
Source/WebKit/mac/Misc/WebCoreStatistics.mm
Source/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.h
Source/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.mm
Source/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm
Source/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm
Source/WebKit/mac/Plugins/WebNetscapePluginPackage.mm
Source/WebKit/mac/WebCoreSupport/WebChromeClient.mm
Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
Source/WebKit/mac/WebCoreSupport/WebVisitedLinkStore.mm
Source/WebKit/mac/WebView/WebView.mm
Source/WebKit/win/ChangeLog
Source/WebKit/win/WebCache.cpp
Source/WebKit/win/WebCoreStatistics.cpp
Source/WebKit/win/WebCoreSupport/WebVisitedLinkStore.cpp
Source/WebKit/win/WebCoreSupport/WebVisitedLinkStore.h
Source/WebKit/win/WebView.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/DatabaseProcess/DatabaseProcess.cpp
Source/WebKit2/DatabaseProcess/DatabaseProcess.h
Source/WebKit2/DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp
Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp
Source/WebKit2/NetworkProcess/FileAPI/NetworkBlobRegistry.cpp
Source/WebKit2/NetworkProcess/FileAPI/NetworkBlobRegistry.h
Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.cpp
Source/WebKit2/NetworkProcess/NetworkProcess.cpp
Source/WebKit2/NetworkProcess/NetworkProcess.h
Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp
Source/WebKit2/NetworkProcess/cache/NetworkCache.cpp
Source/WebKit2/NetworkProcess/cache/NetworkCache.h
Source/WebKit2/NetworkProcess/cocoa/NetworkProcessCocoa.mm
Source/WebKit2/NetworkProcess/ios/NetworkProcessIOS.mm
Source/WebKit2/NetworkProcess/mac/NetworkProcessMac.mm
Source/WebKit2/NetworkProcess/mac/RemoteNetworkingContext.mm
Source/WebKit2/PluginProcess/PluginControllerProxy.cpp
Source/WebKit2/PluginProcess/PluginProcess.cpp
Source/WebKit2/PluginProcess/PluginProcess.h
Source/WebKit2/PluginProcess/WebProcessConnection.cpp
Source/WebKit2/PluginProcess/mac/PluginControllerProxyMac.mm
Source/WebKit2/PluginProcess/mac/PluginProcessMac.mm
Source/WebKit2/Shared/ConnectionStack.cpp
Source/WebKit2/Shared/ConnectionStack.h
Source/WebKit2/Shared/EntryPointUtilities/mac/LegacyProcess/ChildProcessEntryPoint.h
Source/WebKit2/Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h
Source/WebKit2/Shared/WebMemorySampler.cpp
Source/WebKit2/Shared/WebMemorySampler.h
Source/WebKit2/Shared/ios/ChildProcessIOS.mm
Source/WebKit2/Shared/linux/SeccompFilters/SeccompBroker.cpp
Source/WebKit2/Shared/mac/CookieStorageShim.h
Source/WebKit2/Shared/mac/CookieStorageShim.mm
Source/WebKit2/Shared/mac/SecItemShim.cpp
Source/WebKit2/Shared/mac/SecItemShim.h
Source/WebKit2/Shared/unix/ChildProcessMain.h
Source/WebKit2/UIProcess/API/C/WKTextChecker.cpp
Source/WebKit2/UIProcess/API/efl/ewk_main.cpp
Source/WebKit2/UIProcess/API/efl/ewk_main_private.h
Source/WebKit2/UIProcess/API/efl/ewk_view.cpp
Source/WebKit2/UIProcess/Cocoa/WebProcessPoolCocoa.mm
Source/WebKit2/UIProcess/InspectorServer/WebInspectorServer.cpp
Source/WebKit2/UIProcess/InspectorServer/WebInspectorServer.h
Source/WebKit2/UIProcess/Network/NetworkProcessProxy.cpp
Source/WebKit2/UIProcess/Plugins/PluginProcessManager.cpp
Source/WebKit2/UIProcess/Plugins/PluginProcessManager.h
Source/WebKit2/UIProcess/Plugins/PluginProcessProxy.cpp
Source/WebKit2/UIProcess/Plugins/WebPluginSiteDataManager.cpp
Source/WebKit2/UIProcess/Plugins/gtk/PluginInfoCache.cpp
Source/WebKit2/UIProcess/Plugins/gtk/PluginInfoCache.h
Source/WebKit2/UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp
Source/WebKit2/UIProcess/WebInspectorProxy.cpp
Source/WebKit2/UIProcess/WebPageProxy.cpp
Source/WebKit2/UIProcess/WebPasteboardProxy.cpp
Source/WebKit2/UIProcess/WebPasteboardProxy.h
Source/WebKit2/UIProcess/WebProcessPool.cpp
Source/WebKit2/UIProcess/WebProcessProxy.cpp
Source/WebKit2/UIProcess/WebTextChecker.cpp
Source/WebKit2/UIProcess/WebTextChecker.h
Source/WebKit2/UIProcess/efl/EwkDebug.h
Source/WebKit2/UIProcess/efl/TextCheckerEfl.cpp
Source/WebKit2/UIProcess/efl/WebContextEfl.cpp
Source/WebKit2/UIProcess/gtk/TextCheckerGtk.cpp
Source/WebKit2/UIProcess/gtk/WebProcessPoolGtk.cpp
Source/WebKit2/UIProcess/ios/WebMemoryPressureHandlerIOS.h
Source/WebKit2/UIProcess/ios/WebMemoryPressureHandlerIOS.mm
Source/WebKit2/UIProcess/mac/PageClientImpl.mm
Source/WebKit2/UIProcess/mac/SecItemShimProxy.cpp
Source/WebKit2/UIProcess/mac/SecItemShimProxy.h
Source/WebKit2/UIProcess/mac/ServicesController.h
Source/WebKit2/UIProcess/mac/ServicesController.mm
Source/WebKit2/UIProcess/mac/ViewSnapshotStore.h
Source/WebKit2/UIProcess/mac/ViewSnapshotStore.mm
Source/WebKit2/UIProcess/mac/WebContextMenuProxyMac.mm
Source/WebKit2/UIProcess/mac/WindowServerConnection.h
Source/WebKit2/UIProcess/mac/WindowServerConnection.mm
Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp
Source/WebKit2/WebProcess/Databases/WebToDatabaseProcessConnection.cpp
Source/WebKit2/WebProcess/FileAPI/BlobRegistryProxy.cpp
Source/WebKit2/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm
Source/WebKit2/WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp
Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm
Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp
Source/WebKit2/WebProcess/Network/NetworkProcessConnection.cpp
Source/WebKit2/WebProcess/Network/WebResourceLoadScheduler.cpp
Source/WebKit2/WebProcess/Network/WebResourceLoader.cpp
Source/WebKit2/WebProcess/Notifications/NotificationPermissionRequestManager.cpp
Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.mm
Source/WebKit2/WebProcess/Plugins/PluginProcessConnectionManager.cpp
Source/WebKit2/WebProcess/Plugins/PluginProxy.cpp
Source/WebKit2/WebProcess/Plugins/PluginView.cpp
Source/WebKit2/WebProcess/Scrolling/RemoteScrollingCoordinator.mm
Source/WebKit2/WebProcess/Storage/StorageAreaMap.cpp
Source/WebKit2/WebProcess/UserContent/WebUserContentController.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebBatteryClient.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebColorChooser.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebGeolocationClient.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebNotificationClient.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebPlugInClient.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebPopupMenu.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebSearchPopupMenu.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebVibrationClient.cpp
Source/WebKit2/WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp
Source/WebKit2/WebProcess/WebCoreSupport/ios/WebQuickLookHandleClient.cpp
Source/WebKit2/WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm
Source/WebKit2/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm
Source/WebKit2/WebProcess/WebPage/DrawingArea.cpp
Source/WebKit2/WebProcess/WebPage/EventDispatcher.cpp
Source/WebKit2/WebProcess/WebPage/ViewGestureGeometryCollector.cpp
Source/WebKit2/WebProcess/WebPage/ViewUpdateDispatcher.cpp
Source/WebKit2/WebProcess/WebPage/VisitedLinkTableController.cpp
Source/WebKit2/WebProcess/WebPage/WebBackForwardListProxy.cpp
Source/WebKit2/WebProcess/WebPage/WebContextMenu.cpp
Source/WebKit2/WebProcess/WebPage/WebFrame.cpp
Source/WebKit2/WebProcess/WebPage/WebInspector.cpp
Source/WebKit2/WebProcess/WebPage/WebInspectorUI.cpp
Source/WebKit2/WebProcess/WebPage/WebPage.cpp
Source/WebKit2/WebProcess/WebPage/WebPageGroupProxy.cpp
Source/WebKit2/WebProcess/WebPage/gtk/PrinterListGtk.cpp
Source/WebKit2/WebProcess/WebPage/gtk/PrinterListGtk.h
Source/WebKit2/WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp
Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm
Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm
Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm
Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm
Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm
Source/WebKit2/WebProcess/WebProcess.cpp
Source/WebKit2/WebProcess/WebProcess.h
Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm
Source/WebKit2/WebProcess/efl/ExtensionManagerEfl.cpp
Source/WebKit2/WebProcess/efl/ExtensionManagerEfl.h
Source/WebKit2/WebProcess/efl/WebInjectedBundleMainEfl.cpp
Source/WebKit2/WebProcess/gtk/WebGtkExtensionManager.cpp
Source/WebKit2/WebProcess/gtk/WebGtkExtensionManager.h
Source/WebKit2/WebProcess/gtk/WebGtkInjectedBundleMain.cpp
Source/WebKit2/WebProcess/ios/WebVideoFullscreenManager.mm
Source/WebKit2/WebProcess/soup/WebProcessSoup.cpp
Tools/ChangeLog
Tools/DumpRenderTree/TestRunner.cpp
Tools/DumpRenderTree/WorkQueue.cpp
Tools/DumpRenderTree/WorkQueue.h
Tools/DumpRenderTree/mac/DumpRenderTree.mm
Tools/DumpRenderTree/mac/FrameLoadDelegate.mm
Tools/DumpRenderTree/mac/TestRunnerMac.mm
Tools/DumpRenderTree/win/DumpRenderTree.cpp
Tools/DumpRenderTree/win/FrameLoadDelegate.cpp
Tools/DumpRenderTree/win/TestRunnerWin.cpp
Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py
Tools/TestWebKitAPI/InjectedBundleController.cpp
Tools/TestWebKitAPI/InjectedBundleController.h
Tools/TestWebKitAPI/InjectedBundleMain.cpp
Tools/TestWebKitAPI/InjectedBundleTest.h
Tools/TestWebKitAPI/Tests/WebKit2/DidAssociateFormControls_Bundle.cpp
Tools/TestWebKitAPI/Tests/WebKit2/HitTestResultNodeHandle_Bundle.cpp
Tools/TestWebKitAPI/Tests/WebKit2/PasteboardNotifications_Bundle.cpp
Tools/TestWebKitAPI/Tests/WebKit2/WillLoad_Bundle.cpp
Tools/TestWebKitAPI/Tests/WebKit2/WillSendSubmitEvent_Bundle.cpp
Tools/TestWebKitAPI/TestsController.cpp
Tools/TestWebKitAPI/TestsController.h
Tools/TestWebKitAPI/efl/main.cpp
Tools/TestWebKitAPI/gtk/main.cpp
Tools/TestWebKitAPI/ios/mainIOS.mm
Tools/TestWebKitAPI/mac/mainMac.mm
Tools/TestWebKitAPI/win/main.cpp
Tools/WebKitTestRunner/InjectedBundle/AccessibilityController.cpp
Tools/WebKitTestRunner/InjectedBundle/EventSendingController.cpp
Tools/WebKitTestRunner/InjectedBundle/GCController.cpp
Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp
Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.h
Tools/WebKitTestRunner/InjectedBundle/InjectedBundleMain.cpp
Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp
Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp
Tools/WebKitTestRunner/InjectedBundle/TextInputController.cpp
Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityControllerAtk.cpp
Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityNotificationHandlerAtk.cpp
Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp
Tools/WebKitTestRunner/InjectedBundle/cocoa/InjectedBundlePageCocoa.mm
Tools/WebKitTestRunner/InjectedBundle/efl/TestRunnerEfl.cpp
Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityControllerIOS.mm
Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityControllerMac.mm
Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityNotificationHandler.mm
Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm
Tools/WebKitTestRunner/InjectedBundle/mac/TestRunnerMac.mm
Tools/WebKitTestRunner/TestController.cpp
Tools/WebKitTestRunner/TestController.h
Tools/WebKitTestRunner/TestInvocation.cpp
Tools/WebKitTestRunner/WorkQueueManager.cpp
Tools/WebKitTestRunner/cairo/TestInvocationCairo.cpp
Tools/WebKitTestRunner/cg/TestInvocationCG.cpp
Tools/WebKitTestRunner/mac/WebKitTestRunnerDraggingInfo.mm
Tools/WebKitTestRunner/mac/WebKitTestRunnerEvent.mm

index 7481ff8e9af2ad96b71bace2bdf1b4db7ecb9791..dfa4d3c69d7364164d956902c90bfa50e33808b0 100644 (file)
@@ -1,3 +1,29 @@
+2015-01-30  Chris Dumez  <cdumez@apple.com>
+
+        Rename shared() static member functions to singleton() for singleton classes.
+        https://bugs.webkit.org/show_bug.cgi?id=141088
+
+        Reviewed by Ryosuke Niwa and Benjamin Poulain.
+
+        Rename shared() static member functions to singleton() for singleton
+        classes as per the recent coding style change.
+
+        * inspector/remote/RemoteInspector.h:
+        * inspector/remote/RemoteInspector.mm:
+        (Inspector::RemoteInspector::singleton):
+        (Inspector::RemoteInspector::start):
+        (Inspector::RemoteInspector::shared): Deleted.
+        * inspector/remote/RemoteInspectorDebuggable.cpp:
+        (Inspector::RemoteInspectorDebuggable::~RemoteInspectorDebuggable):
+        (Inspector::RemoteInspectorDebuggable::init):
+        (Inspector::RemoteInspectorDebuggable::update):
+        (Inspector::RemoteInspectorDebuggable::setRemoteDebuggingAllowed):
+        (Inspector::RemoteInspectorDebuggable::pauseWaitingForAutomaticInspection):
+        (Inspector::RemoteInspectorDebuggable::unpauseForInitializedInspector):
+        * inspector/remote/RemoteInspectorDebuggableConnection.mm:
+        (Inspector::RemoteInspectorDebuggableConnection::setup):
+        (Inspector::RemoteInspectorDebuggableConnection::sendMessageToFrontend):
+
 2015-01-30  Geoffrey Garen  <ggaren@apple.com>
 
         Use FastMalloc (bmalloc) instead of BlockAllocator for GC pages
index 0dffc286f03fbd2b71973b310300527f24fd354e..2cd85197b3f42882184b4f8bafa0a88de29746df 100644 (file)
@@ -46,7 +46,7 @@ struct RemoteInspectorDebuggableInfo;
 class JS_EXPORT_PRIVATE RemoteInspector final : public RemoteInspectorXPCConnection::Client {
 public:
     static void startDisabled();
-    static RemoteInspector& shared();
+    static RemoteInspector& singleton();
     friend class NeverDestroyed<RemoteInspector>;
 
     void registerDebuggable(RemoteInspectorDebuggable*);
index c8a39e641f1a4504ca254a444839c6c474e1e703..46d5044c5e0224f92e56224878740faf47a0f2bf 100644 (file)
@@ -91,7 +91,7 @@ void RemoteInspector::startDisabled()
     RemoteInspector::startEnabled = false;
 }
 
-RemoteInspector& RemoteInspector::shared()
+RemoteInspector& RemoteInspector::singleton()
 {
     static NeverDestroyed<RemoteInspector> shared;
 
@@ -309,7 +309,7 @@ void RemoteInspector::start()
     });
 
     notify_register_dispatch(WIRServiceAvailableNotification, &m_notifyToken, m_xpcQueue, ^(int) {
-        RemoteInspector::shared().setupXPCConnectionIfNeeded();
+        RemoteInspector::singleton().setupXPCConnectionIfNeeded();
     });
 
     notify_post(WIRServiceAvailabilityCheckNotification);
index dfee0ebbc929cba46fc356eeed7ecf1a73b38998..ac83a18e95995b1c3586fa7861071fcc4e5eb839 100644 (file)
@@ -42,17 +42,17 @@ RemoteInspectorDebuggable::RemoteInspectorDebuggable()
 
 RemoteInspectorDebuggable::~RemoteInspectorDebuggable()
 {
-    RemoteInspector::shared().unregisterDebuggable(this);
+    RemoteInspector::singleton().unregisterDebuggable(this);
 }
 
 void RemoteInspectorDebuggable::init()
 {
-    RemoteInspector::shared().registerDebuggable(this);
+    RemoteInspector::singleton().registerDebuggable(this);
 }
 
 void RemoteInspectorDebuggable::update()
 {
-    RemoteInspector::shared().updateDebuggable(this);
+    RemoteInspector::singleton().updateDebuggable(this);
 }
 
 void RemoteInspectorDebuggable::setRemoteDebuggingAllowed(bool allowed)
@@ -63,9 +63,9 @@ void RemoteInspectorDebuggable::setRemoteDebuggingAllowed(bool allowed)
     m_allowed = allowed;
 
     if (m_allowed && automaticInspectionAllowed())
-        RemoteInspector::shared().updateDebuggableAutomaticInspectCandidate(this);
+        RemoteInspector::singleton().updateDebuggableAutomaticInspectCandidate(this);
     else
-        RemoteInspector::shared().updateDebuggable(this);
+        RemoteInspector::singleton().updateDebuggable(this);
 }
 
 RemoteInspectorDebuggableInfo RemoteInspectorDebuggable::info() const
@@ -87,13 +87,13 @@ void RemoteInspectorDebuggable::pauseWaitingForAutomaticInspection()
     ASSERT(automaticInspectionAllowed());
 
     EventLoop loop;
-    while (RemoteInspector::shared().waitingForAutomaticInspection(identifier()) && !loop.ended())
+    while (RemoteInspector::singleton().waitingForAutomaticInspection(identifier()) && !loop.ended())
         loop.cycle();
 }
 
 void RemoteInspectorDebuggable::unpauseForInitializedInspector()
 {
-    RemoteInspector::shared().setupCompleted(identifier());
+    RemoteInspector::singleton().setupCompleted(identifier());
 }
 
 } // namespace Inspector
index a97dcbbbad90832795cd49bd554d4a65038415ce..8e79a56b29d2d3a3b8cf3073267c6182604901dc 100644 (file)
@@ -161,7 +161,7 @@ bool RemoteInspectorDebuggableConnection::setup(bool isAutomaticInspection)
         {
             std::lock_guard<std::mutex> lock(m_debuggableMutex);
             if (!m_debuggable || !m_debuggable->remoteDebuggingAllowed() || m_debuggable->hasLocalDebugger()) {
-                RemoteInspector::shared().setupFailed(identifier());
+                RemoteInspector::singleton().setupFailed(identifier());
                 m_debuggable = nullptr;
             } else {
                 m_debuggable->connect(this, isAutomaticInspection);
@@ -220,7 +220,7 @@ void RemoteInspectorDebuggableConnection::sendMessageToBackend(NSString *message
 
 bool RemoteInspectorDebuggableConnection::sendMessageToFrontend(const String& message)
 {
-    RemoteInspector::shared().sendMessageToRemoteFrontend(identifier(), message);
+    RemoteInspector::singleton().sendMessageToRemoteFrontend(identifier(), message);
 
     return true;
 }
index 7d21697c6813f6cb527c44639dbbdfff8b8c39c7..613daacf62d205d935f8e30ce01d07507b54e499 100644 (file)
@@ -1,3 +1,13 @@
+2015-01-30  Chris Dumez  <cdumez@apple.com>
+
+        Rename shared() static member functions to singleton() for singleton classes.
+        https://bugs.webkit.org/show_bug.cgi?id=141088
+
+        Reviewed by Ryosuke Niwa and Benjamin Poulain.
+
+        Rename shared() static member functions to singleton() for singleton
+        classes as per the recent coding style change.
+
 2015-01-30  Matthew Mirman  <mmirman@apple.com>
 
         Added ClientRect as an interface that requires attributes 
index c3e086f535c229ea9e52ce9a588bd16a3f24c212..68c7d048877651552cfee75d77202536e6d2d1d5 100644 (file)
@@ -47,7 +47,7 @@ static NavigatorGamepad* navigatorGamepadFromDOMWindow(DOMWindow* window)
     return NavigatorGamepad::from(navigator);
 }
 
-GamepadManager& GamepadManager::shared()
+GamepadManager& GamepadManager::singleton()
 {
     static NeverDestroyed<GamepadManager> sharedManager;
     return sharedManager;
@@ -61,7 +61,7 @@ GamepadManager::GamepadManager()
 void GamepadManager::platformGamepadConnected(PlatformGamepad& platformGamepad)
 {
     // Notify blind Navigators and Windows about all gamepads except for this one.
-    for (auto* gamepad : GamepadProvider::shared().platformGamepads()) {
+    for (auto* gamepad : GamepadProvider::singleton().platformGamepads()) {
         if (!gamepad || gamepad == &platformGamepad)
             continue;
 
@@ -119,7 +119,7 @@ void GamepadManager::platformGamepadInputActivity()
     if (m_gamepadBlindNavigators.isEmpty() && m_gamepadBlindDOMWindows.isEmpty())
         return;
 
-    for (auto* gamepad : GamepadProvider::shared().platformGamepads())
+    for (auto* gamepad : GamepadProvider::singleton().platformGamepads())
         makeGamepadVisible(*gamepad, m_gamepadBlindNavigators, m_gamepadBlindDOMWindows);
 
     m_gamepadBlindNavigators.clear();
@@ -218,7 +218,7 @@ void GamepadManager::maybeStartMonitoringGamepads()
     if (!m_navigators.isEmpty() || !m_domWindows.isEmpty()) {
         LOG(Gamepad, "GamepadManager has %i NavigatorGamepads and %i DOMWindows registered, is starting gamepad monitoring", m_navigators.size(), m_domWindows.size());
         m_isMonitoringGamepads = true;
-        GamepadProvider::shared().startMonitoringGamepads(this);
+        GamepadProvider::singleton().startMonitoringGamepads(this);
     }
 }
 
@@ -230,7 +230,7 @@ void GamepadManager::maybeStopMonitoringGamepads()
     if (m_navigators.isEmpty() && m_domWindows.isEmpty()) {
         LOG(Gamepad, "GamepadManager has no NavigatorGamepads or DOMWindows registered, is stopping gamepad monitoring");
         m_isMonitoringGamepads = false;
-        GamepadProvider::shared().stopMonitoringGamepads(this);
+        GamepadProvider::singleton().stopMonitoringGamepads(this);
     }
 }
 
index 10460b85fc5bf71dd70d0806e8ed7330c024c71d..11148e124836391b05576297ef43fd78b93fbc62 100644 (file)
@@ -44,7 +44,7 @@ class GamepadManager : public GamepadProviderClient {
     WTF_MAKE_NONCOPYABLE(GamepadManager);
     friend class NeverDestroyed<GamepadManager>;
 public:
-    static GamepadManager& shared();
+    static GamepadManager& singleton();
 
     virtual void platformGamepadConnected(PlatformGamepad&) override final;
     virtual void platformGamepadDisconnected(PlatformGamepad&) override final;
index 5d7b539622aa94088b1f116077d2b77ede9117e8..18f1b4e635f68b17f7b0279c42e58c2e1c4bb9cf 100644 (file)
@@ -43,12 +43,12 @@ namespace WebCore {
 NavigatorGamepad::NavigatorGamepad()
     : m_navigationStart(std::numeric_limits<double>::infinity())
 {
-    GamepadManager::shared().registerNavigator(this);
+    GamepadManager::singleton().registerNavigator(this);
 }
 
 NavigatorGamepad::~NavigatorGamepad()
 {
-    GamepadManager::shared().unregisterNavigator(this);
+    GamepadManager::singleton().unregisterNavigator(this);
 }
 
 const char* NavigatorGamepad::supplementName()
@@ -91,7 +91,7 @@ const Vector<RefPtr<Gamepad>>& NavigatorGamepad::gamepads()
     if (m_gamepads.isEmpty())
         return m_gamepads;
 
-    const Vector<PlatformGamepad*>& platformGamepads = GamepadProvider::shared().platformGamepads();
+    const Vector<PlatformGamepad*>& platformGamepads = GamepadProvider::singleton().platformGamepads();
 
     for (unsigned i = 0; i < platformGamepads.size(); ++i) {
         if (!platformGamepads[i]) {
@@ -108,7 +108,7 @@ const Vector<RefPtr<Gamepad>>& NavigatorGamepad::gamepads()
 
 void NavigatorGamepad::gamepadsBecameVisible()
 {
-    const Vector<PlatformGamepad*>& platformGamepads = GamepadProvider::shared().platformGamepads();
+    const Vector<PlatformGamepad*>& platformGamepads = GamepadProvider::singleton().platformGamepads();
     m_gamepads.resize(platformGamepads.size());
 
     for (unsigned i = 0; i < platformGamepads.size(); ++i) {
@@ -128,7 +128,7 @@ void NavigatorGamepad::gamepadConnected(PlatformGamepad& platformGamepad)
     }
 
     unsigned index = platformGamepad.index();
-    ASSERT(GamepadProvider::shared().platformGamepads()[index] == &platformGamepad);
+    ASSERT(GamepadProvider::singleton().platformGamepads()[index] == &platformGamepad);
 
     // The new index should already fit in the existing array, or should be exactly one past-the-end of the existing array.
     ASSERT(index <= m_gamepads.size());
index b9c654c2d3bdc1a2a7e85ccb582635f3fc611be4..31fc198b1716c13ca8926df9ef42502158c3c4fa 100644 (file)
@@ -151,7 +151,7 @@ const AtomicString& MediaStreamTrack::readyState() const
 void MediaStreamTrack::getSources(ScriptExecutionContext* context, PassRefPtr<MediaStreamTrackSourcesCallback> callback, ExceptionCode& ec)
 {
     RefPtr<MediaStreamTrackSourcesRequest> request = MediaStreamTrackSourcesRequest::create(context, callback);
-    if (!MediaStreamCenter::shared().getMediaStreamTrackSources(request.release()))
+    if (!MediaStreamCenter::singleton().getMediaStreamTrackSources(request.release()))
         ec = NOT_SUPPORTED_ERR;
 }
 
index cbd6fba799f70f765c52f577af5fe76f3ac6ce42..c532d78fd4b713ca3a9641ab73e8386e88de70d0 100644 (file)
@@ -114,7 +114,7 @@ void UserMediaRequest::start()
 {
     // 1 - make sure the system is capable of supporting the audio and video constraints. We don't want to ask for
     // user permission if the constraints can not be suported.
-    MediaStreamCenter::shared().validateRequestConstraints(this, m_audioConstraints, m_videoConstraints);
+    MediaStreamCenter::singleton().validateRequestConstraints(this, m_audioConstraints, m_videoConstraints);
 }
 
     
@@ -133,7 +133,7 @@ void UserMediaRequest::userMediaAccessGranted()
     RefPtr<UserMediaRequest> protectedThis(this);
     callOnMainThread([protectedThis] {
         // 3 - the user granted access, ask platform to create the media stream descriptors.
-        MediaStreamCenter::shared().createMediaStream(protectedThis.get(), protectedThis->m_audioConstraints, protectedThis->m_videoConstraints);
+        MediaStreamCenter::singleton().createMediaStream(protectedThis.get(), protectedThis->m_audioConstraints, protectedThis->m_videoConstraints);
     });
 }
 
index 96e57f390733d3451ffa284a0dc3d86920d53a41..02f8587a059f37cb2a707b7267896b37e4f8697c 100644 (file)
@@ -1163,7 +1163,7 @@ __ZN7WebCore30hostNameNeedsDecodingWithRangeEP8NSString8_NSRange
 __ZN7WebCore30hostNameNeedsEncodingWithRangeEP8NSString8_NSRange
 __ZN7WebCore30overrideUserPreferredLanguagesERKN3WTF6VectorINS0_6StringELm0ENS0_15CrashOnOverflowEEE
 __ZN7WebCore31CrossOriginPreflightResultCache5emptyEv
-__ZN7WebCore31CrossOriginPreflightResultCache6sharedEv
+__ZN7WebCore31CrossOriginPreflightResultCache9singletonEv
 __ZN7WebCore31equalIgnoringFragmentIdentifierERKNS_3URLES2_
 __ZN7WebCore33stripLeadingAndTrailingHTMLSpacesERKN3WTF6StringE
 __ZN7WebCore36largestRectWithAspectRatioInsideRectEfRKNS_9FloatRectE
@@ -1613,7 +1613,7 @@ __ZN7WebCore9PageCache10setMaxSizeEj
 __ZN7WebCore9PageCache14pruneToSizeNowEjNS_13PruningReasonE
 __ZN7WebCore9PageCache34markPagesForVisitedLinkStyleRecalcEv
 __ZN7WebCore9PageCache6removeERNS_11HistoryItemE
-__ZN7WebCore9PageCache6sharedEv
+__ZN7WebCore9PageCache9singletonEv
 __ZN7WebCore9PageGroup9pageGroupERKN3WTF6StringE
 __ZN7WebCore9Scrollbar11mouseExitedEv
 __ZN7WebCore9Scrollbar12mouseEnteredEv
@@ -2760,7 +2760,7 @@ __ZN7WebCore23atBoundaryOfGranularityERKNS_15VisiblePositionENS_15TextGranularit
 __ZN7WebCore24DocumentMarkerController14markersInRangeEPNS_5RangeENS_14DocumentMarker11MarkerTypesE
 __ZN7WebCore24FloatingPointEnvironment21enableDenormalSupportEv
 __ZN7WebCore24FloatingPointEnvironment25saveMainThreadEnvironmentEv
-__ZN7WebCore24FloatingPointEnvironment6sharedEv
+__ZN7WebCore24FloatingPointEnvironment9singletonEv
 __ZN7WebCore24acquireLineBreakIteratorEN3WTF10StringViewERKNS0_12AtomicStringEPKtjNS_21LineBreakIteratorModeEb
 __ZN7WebCore24charactersAroundPositionERKNS_15VisiblePositionERiS3_S3_
 __ZN7WebCore24createTemporaryDirectoryEP8NSString
@@ -3137,8 +3137,8 @@ __ZNK7WebCore7Element25containsFullScreenElementEv
 
 #if ENABLE(GAMEPAD)
 __ZN7WebCore15GamepadProvider17setSharedProviderERS0_
-__ZN7WebCore15GamepadProvider6sharedEv
-__ZN7WebCore18HIDGamepadProvider6sharedEv
+__ZN7WebCore15GamepadProvider9singletonEv
+__ZN7WebCore18HIDGamepadProvider9singletonEv
 #endif
 
 #if ENABLE(GEOLOCATION)
index 769d72de088a174ecc03c8f73d1264df3d4a142a..64d56d970a74e5dc1aeaa38595b56bd1e6346fe2 100644 (file)
@@ -79,7 +79,7 @@ bool JSCryptoAlgorithmDictionary::getAlgorithmIdentifier(ExecState* exec, JSValu
         return false;
     }
 
-    if (!CryptoAlgorithmRegistry::shared().getIdentifierForName(algorithmName, algorithmIdentifier)) {
+    if (!CryptoAlgorithmRegistry::singleton().getIdentifierForName(algorithmName, algorithmIdentifier)) {
         setDOMException(exec, NOT_SUPPORTED_ERR);
         return false;
     }
index 02fa1c05cccebe766fccd9647c9714bcae8ab473..a8917d75da4d846044af1ae29e1a9ce41d5f3319 100644 (file)
@@ -170,49 +170,50 @@ bool JSCryptoKeySerializationJWK::reconcileAlgorithm(std::unique_ptr<CryptoAlgor
         return true;
     }
 
+    auto& algorithmRegisty = CryptoAlgorithmRegistry::singleton();
     std::unique_ptr<CryptoAlgorithm> algorithm;
     std::unique_ptr<CryptoAlgorithmParameters> parameters;
     if (m_jwkAlgorithmName == "HS256") {
-        algorithm = CryptoAlgorithmRegistry::shared().create(CryptoAlgorithmIdentifier::HMAC);
+        algorithm = algorithmRegisty.create(CryptoAlgorithmIdentifier::HMAC);
         parameters = createHMACParameters(CryptoAlgorithmIdentifier::SHA_256);
     } else if (m_jwkAlgorithmName == "HS384") {
-        algorithm = CryptoAlgorithmRegistry::shared().create(CryptoAlgorithmIdentifier::HMAC);
+        algorithm = algorithmRegisty.create(CryptoAlgorithmIdentifier::HMAC);
         parameters = createHMACParameters(CryptoAlgorithmIdentifier::SHA_384);
     } else if (m_jwkAlgorithmName == "HS512") {
-        algorithm = CryptoAlgorithmRegistry::shared().create(CryptoAlgorithmIdentifier::HMAC);
+        algorithm = algorithmRegisty.create(CryptoAlgorithmIdentifier::HMAC);
         parameters = createHMACParameters(CryptoAlgorithmIdentifier::SHA_512);
     } else if (m_jwkAlgorithmName == "RS256") {
-        algorithm = CryptoAlgorithmRegistry::shared().create(CryptoAlgorithmIdentifier::RSASSA_PKCS1_v1_5);
+        algorithm = algorithmRegisty.create(CryptoAlgorithmIdentifier::RSASSA_PKCS1_v1_5);
         parameters = createRSAKeyParametersWithHash(CryptoAlgorithmIdentifier::SHA_256);
     } else if (m_jwkAlgorithmName == "RS384") {
-        algorithm = CryptoAlgorithmRegistry::shared().create(CryptoAlgorithmIdentifier::RSASSA_PKCS1_v1_5);
+        algorithm = algorithmRegisty.create(CryptoAlgorithmIdentifier::RSASSA_PKCS1_v1_5);
         parameters = createRSAKeyParametersWithHash(CryptoAlgorithmIdentifier::SHA_384);
     } else if (m_jwkAlgorithmName == "RS512") {
-        algorithm = CryptoAlgorithmRegistry::shared().create(CryptoAlgorithmIdentifier::RSASSA_PKCS1_v1_5);
+        algorithm = algorithmRegisty.create(CryptoAlgorithmIdentifier::RSASSA_PKCS1_v1_5);
         parameters = createRSAKeyParametersWithHash(CryptoAlgorithmIdentifier::SHA_512);
     } else if (m_jwkAlgorithmName == "RSA1_5") {
-        algorithm = CryptoAlgorithmRegistry::shared().create(CryptoAlgorithmIdentifier::RSAES_PKCS1_v1_5);
+        algorithm = algorithmRegisty.create(CryptoAlgorithmIdentifier::RSAES_PKCS1_v1_5);
         parameters = std::make_unique<CryptoAlgorithmParameters>();
     } else if (m_jwkAlgorithmName == "RSA-OAEP") {
-        algorithm = CryptoAlgorithmRegistry::shared().create(CryptoAlgorithmIdentifier::RSA_OAEP);
+        algorithm = algorithmRegisty.create(CryptoAlgorithmIdentifier::RSA_OAEP);
         parameters = createRSAKeyParametersWithHash(CryptoAlgorithmIdentifier::SHA_1);
     } else if (m_jwkAlgorithmName == "A128CBC") {
-        algorithm = CryptoAlgorithmRegistry::shared().create(CryptoAlgorithmIdentifier::AES_CBC);
+        algorithm = algorithmRegisty.create(CryptoAlgorithmIdentifier::AES_CBC);
         parameters = std::make_unique<CryptoAlgorithmParameters>();
     } else if (m_jwkAlgorithmName == "A192CBC") {
-        algorithm = CryptoAlgorithmRegistry::shared().create(CryptoAlgorithmIdentifier::AES_CBC);
+        algorithm = algorithmRegisty.create(CryptoAlgorithmIdentifier::AES_CBC);
         parameters = std::make_unique<CryptoAlgorithmParameters>();
     } else if (m_jwkAlgorithmName == "A256CBC") {
-        algorithm = CryptoAlgorithmRegistry::shared().create(CryptoAlgorithmIdentifier::AES_CBC);
+        algorithm = algorithmRegisty.create(CryptoAlgorithmIdentifier::AES_CBC);
         parameters = std::make_unique<CryptoAlgorithmParameters>();
     } else if (m_jwkAlgorithmName == "A128KW") {
-        algorithm = CryptoAlgorithmRegistry::shared().create(CryptoAlgorithmIdentifier::AES_KW);
+        algorithm = algorithmRegisty.create(CryptoAlgorithmIdentifier::AES_KW);
         parameters = std::make_unique<CryptoAlgorithmParameters>();
     } else if (m_jwkAlgorithmName == "A192KW") {
-        algorithm = CryptoAlgorithmRegistry::shared().create(CryptoAlgorithmIdentifier::AES_KW);
+        algorithm = algorithmRegisty.create(CryptoAlgorithmIdentifier::AES_KW);
         parameters = std::make_unique<CryptoAlgorithmParameters>();
     } else if (m_jwkAlgorithmName == "A256KW") {
-        algorithm = CryptoAlgorithmRegistry::shared().create(CryptoAlgorithmIdentifier::AES_KW);
+        algorithm = algorithmRegisty.create(CryptoAlgorithmIdentifier::AES_KW);
         parameters = std::make_unique<CryptoAlgorithmParameters>();
     } else {
         throwTypeError(m_exec, "Unsupported JWK algorithm " + m_jwkAlgorithmName);
index b2a64888dfa65cd1d93453b1f2c6db0169a42297..6baefcd6ebd1945169ba4ad2a3afba21cdfa6427 100644 (file)
@@ -67,7 +67,7 @@ static std::unique_ptr<CryptoAlgorithm> createAlgorithmFromJSValue(ExecState* ex
         return nullptr;
     }
 
-    auto result = CryptoAlgorithmRegistry::shared().create(algorithmIdentifier);
+    auto result = CryptoAlgorithmRegistry::singleton().create(algorithmIdentifier);
     if (!result)
         setDOMException(exec, NOT_SUPPORTED_ERR);
     return result;
index 7f4eee34a4c89cdbf861992ad995c1a3f15d4aa5..40dd2c935d3538505656c5f5c354d5b340402665 100644 (file)
@@ -34,7 +34,7 @@
 
 namespace WebCore {
 
-CryptoAlgorithmRegistry& CryptoAlgorithmRegistry::shared()
+CryptoAlgorithmRegistry& CryptoAlgorithmRegistry::singleton()
 {
     static NeverDestroyed<CryptoAlgorithmRegistry> registry;
 
index f0948141f835f9fb9a4960306511aaf80ea6b53a..bd64b141798f19d3af97a17aba74695d99068e3d 100644 (file)
@@ -45,7 +45,7 @@ class CryptoAlgorithmRegistry {
     friend class NeverDestroyed<CryptoAlgorithmRegistry>;
 
 public:
-    static CryptoAlgorithmRegistry& shared();
+    static CryptoAlgorithmRegistry& singleton();
 
     bool getIdentifierForName(const String&, CryptoAlgorithmIdentifier&);
     String nameForIdentifier(CryptoAlgorithmIdentifier);
index ba2f02a9ad5bdee9f76d9d67410219b478259a62..53d1c1eb545f6141ee0517265ab13c69825d963c 100644 (file)
@@ -63,7 +63,7 @@ String CryptoKey::type() const
 
 void CryptoKey::buildAlgorithmDescription(CryptoAlgorithmDescriptionBuilder& builder) const
 {
-    builder.add("name", CryptoAlgorithmRegistry::shared().nameForIdentifier(m_algorithm));
+    builder.add("name", CryptoAlgorithmRegistry::singleton().nameForIdentifier(m_algorithm));
     // Subclasses will add other keys.
 }
 
index 5fa13841bd9e703698a50ed9dffefde4c5b364d4..b551f7a9ec608645cb30835384ac7de17aa3d983 100644 (file)
@@ -72,7 +72,7 @@ void CryptoKeyHMAC::buildAlgorithmDescription(CryptoAlgorithmDescriptionBuilder&
     CryptoKey::buildAlgorithmDescription(builder);
 
     auto hashDescriptionBuilder = builder.createEmptyClone();
-    hashDescriptionBuilder->add("name", CryptoAlgorithmRegistry::shared().nameForIdentifier(m_hash));
+    hashDescriptionBuilder->add("name", CryptoAlgorithmRegistry::singleton().nameForIdentifier(m_hash));
     builder.add("hash", *hashDescriptionBuilder);
 
     builder.add("length", m_key.size());
index b56ac2294b06b7b687967d4153fe736abd7ffb04..b33a64e57acab49a65a56b8729824df6b501ac77 100644 (file)
@@ -181,7 +181,7 @@ void CryptoKeyRSA::buildAlgorithmDescription(CryptoAlgorithmDescriptionBuilder&
 
     if (m_restrictedToSpecificHash) {
         auto hashDescriptionBuilder = builder.createEmptyClone();
-        hashDescriptionBuilder->add("name", CryptoAlgorithmRegistry::shared().nameForIdentifier(m_hash));
+        hashDescriptionBuilder->add("name", CryptoAlgorithmRegistry::singleton().nameForIdentifier(m_hash));
         builder.add("hash", *hashDescriptionBuilder);
     }
 }
index b3ad6197e2b71e1ad8381f3c73c6dedc4e0058b8..eae62bc71f86380c72516b7e70d71ce7ae3b5053 100644 (file)
@@ -68,7 +68,7 @@ void BackForwardList::addItem(PassRefPtr<HistoryItem> prpItem)
             RefPtr<HistoryItem> item = m_entries.last();
             m_entries.removeLast();
             m_entryHash.remove(item);
-            PageCache::shared().remove(*item);
+            PageCache::singleton().remove(*item);
         }
     }
 
@@ -78,7 +78,7 @@ void BackForwardList::addItem(PassRefPtr<HistoryItem> prpItem)
         RefPtr<HistoryItem> item = m_entries[0];
         m_entries.remove(0);
         m_entryHash.remove(item);
-        PageCache::shared().remove(*item);
+        PageCache::singleton().remove(*item);
         m_current--;
     }
 
@@ -175,7 +175,7 @@ void BackForwardList::setCapacity(int size)
         RefPtr<HistoryItem> item = m_entries.last();
         m_entries.removeLast();
         m_entryHash.remove(item);
-        PageCache::shared().remove(*item);
+        PageCache::singleton().remove(*item);
     }
 
     if (!size)
@@ -245,7 +245,7 @@ bool BackForwardList::clearAllPageCaches()
     for (auto& item : m_entries) {
         if (item->isInPageCache()) {
             didRemoveAtLeastOneItem = true;
-            PageCache::shared().remove(*item);
+            PageCache::singleton().remove(*item);
         }
     }
     return didRemoveAtLeastOneItem;
@@ -255,7 +255,7 @@ bool BackForwardList::clearAllPageCaches()
 void BackForwardList::close()
 {
     for (auto& item : m_entries)
-        PageCache::shared().remove(*item);
+        PageCache::singleton().remove(*item);
     m_entries.clear();
     m_entryHash.clear();
     m_page = nullptr;
index ecf4ea86e7a25b9dc4b321bba69db7f05644f116..e65ce6e66fc1f5989ea6c3350a26960c72509179 100644 (file)
@@ -173,7 +173,7 @@ CachedFrame::CachedFrame(Frame& frame)
 
     frame.loader().client().savePlatformDataToCachedFrame(this);
 
-    if (m_isComposited && PageCache::shared().shouldClearBackingStores())
+    if (m_isComposited && PageCache::singleton().shouldClearBackingStores())
         frame.view()->clearBackingStores();
 
     // documentWillSuspendForPageCache() can set up a layout timer on the FrameView, so clear timers after that.
index 1b525df28c4476ff20f326511a3a14ac552bd61c..c3c367f43c4355e46924d32853e0d7a637dd5b43 100644 (file)
@@ -286,7 +286,7 @@ void HistoryItem::setURLString(const String& urlString)
 
 void HistoryItem::setURL(const URL& url)
 {
-    PageCache::shared().remove(*this);
+    PageCache::singleton().remove(*this);
     setURLString(url.string());
     clearDocumentState();
 }
index 22d680258f3cd4aada827d38a787b7b0b6474362..9620990385a3c35014092b0c9ebef8e0c8acdad9 100644 (file)
@@ -291,7 +291,7 @@ static void logCanCachePageDecision(Page& page)
     diagnosticLoggingClient.logDiagnosticMessageWithResult(DiagnosticLoggingKeys::pageCacheKey(), emptyString(), rejectReasons ? DiagnosticLoggingResultFail : DiagnosticLoggingResultPass);
 }
 
-PageCache& PageCache::shared()
+PageCache& PageCache::singleton()
 {
     static NeverDestroyed<PageCache> globalPageCache;
     return globalPageCache;
@@ -484,7 +484,7 @@ CachedPage* PageCache::get(HistoryItem& item, Page* page) const
     if (cachedPage->hasExpired()) {
         LOG(PageCache, "Not restoring page for %s from back/forward cache because cache entry has expired", item.url().string().ascii().data());
         logPageCacheFailureDiagnosticMessage(page, DiagnosticLoggingKeys::expiredKey());
-        PageCache::shared().remove(item);
+        PageCache::singleton().remove(item);
         return nullptr;
     }
     return cachedPage;
index 9536a9f86df214da31ac4afe9e37427a4865391f..0f2fb496382b75ecc79675b0c9f09262aa10715e 100644 (file)
@@ -44,7 +44,7 @@ class PageCache {
     WTF_MAKE_NONCOPYABLE(PageCache); WTF_MAKE_FAST_ALLOCATED;
 public:
     // Function to obtain the global page cache.
-    WEBCORE_EXPORT static PageCache& shared();
+    WEBCORE_EXPORT static PageCache& singleton();
 
     bool canCache(Page*) const;
 
@@ -73,7 +73,7 @@ public:
     void setShouldClearBackingStores(bool flag) { m_shouldClearBackingStores = flag; }
 
 private:
-    PageCache() = default; // Use shared() instead.
+    PageCache() = default; // Use singleton() instead.
     ~PageCache() = delete; // Make sure nobody accidentally calls delete -- WebCore does not delete singletons.
 
     static bool canCachePageContainingThisFrame(Frame&);
index 8d1ec42f3a10f02fe0a89a42a164ad6fbfc56529..a0f28dc80584d6f7fffd0843552696912fa0cc1a 100644 (file)
@@ -151,7 +151,7 @@ bool CrossOriginPreflightResultCacheItem::allowsRequest(StoredCredentials includ
     return true;
 }
 
-CrossOriginPreflightResultCache& CrossOriginPreflightResultCache::shared()
+CrossOriginPreflightResultCache& CrossOriginPreflightResultCache::singleton()
 {
     ASSERT(isMainThread());
 
index e7d281b7917f006c7276339d38c81acd3de078a6..f4785fff2888abe8b115a7fd881c15d9d995522e 100644 (file)
@@ -66,7 +66,7 @@ class CrossOriginPreflightResultCache {
     WTF_MAKE_NONCOPYABLE(CrossOriginPreflightResultCache); WTF_MAKE_FAST_ALLOCATED;
 
 public:
-    WEBCORE_EXPORT static CrossOriginPreflightResultCache& shared();
+    WEBCORE_EXPORT static CrossOriginPreflightResultCache& singleton();
 
     void appendEntry(const String& origin, const URL&, std::unique_ptr<CrossOriginPreflightResultCacheItem>);
     bool canSkipPreflight(const String& origin, const URL&, StoredCredentials, const String& method, const HTTPHeaderMap& requestHeaders);
index 952981182d0d3d4bedffa04b1d3b3e1a7d932a7f..e1ab138918d1d97c720831ff58728dcddb39e7fa 100644 (file)
@@ -104,7 +104,7 @@ void DocumentThreadableLoader::makeCrossOriginAccessRequest(const ResourceReques
         m_simpleRequest = false;
         m_actualRequest = WTF::move(crossOriginRequest);
 
-        if (CrossOriginPreflightResultCache::shared().canSkipPreflight(securityOrigin()->toString(), m_actualRequest->url(), m_options.allowCredentials(), m_actualRequest->httpMethod(), m_actualRequest->httpHeaderFields()))
+        if (CrossOriginPreflightResultCache::singleton().canSkipPreflight(securityOrigin()->toString(), m_actualRequest->url(), m_options.allowCredentials(), m_actualRequest->httpMethod(), m_actualRequest->httpHeaderFields()))
             preflightSuccess();
         else
             makeCrossOriginAccessRequestWithPreflight(*m_actualRequest);
@@ -256,7 +256,7 @@ void DocumentThreadableLoader::didReceiveResponse(unsigned long identifier, cons
             return;
         }
 
-        CrossOriginPreflightResultCache::shared().appendEntry(securityOrigin()->toString(), m_actualRequest->url(), WTF::move(preflightResult));
+        CrossOriginPreflightResultCache::singleton().appendEntry(securityOrigin()->toString(), m_actualRequest->url(), WTF::move(preflightResult));
     } else {
         if (!m_sameOriginRequest && m_options.crossOriginRequestPolicy == UseAccessControl) {
             if (!passesAccessControlCheck(response, m_options.allowCredentials(), securityOrigin(), accessControlErrorDescription)) {
index 731908875f1a0dba33702b78158a027451ae63fb..059f0ff8e4fc16f6f093a1cd0ac279e2c470974d 100644 (file)
@@ -1741,7 +1741,7 @@ void FrameLoader::commitProvisionalLoad()
 
     std::unique_ptr<CachedPage> cachedPage;
     if (m_loadingFromCachedPage && history().provisionalItem())
-        cachedPage = PageCache::shared().take(*history().provisionalItem(), m_frame.page());
+        cachedPage = PageCache::singleton().take(*history().provisionalItem(), m_frame.page());
 
     LOG(PageCache, "WebCoreLoading %s: About to commit provisional load from previous URL '%s' to new URL '%s'", m_frame.tree().uniqueName().string().utf8().data(),
         m_frame.document() ? m_frame.document()->url().stringCenterEllipsizedToLength().utf8().data() : "",
@@ -1758,11 +1758,12 @@ void FrameLoader::commitProvisionalLoad()
             LOG(MemoryPressure, "Pruning page cache because under memory pressure at: %s", __PRETTY_FUNCTION__);
             LOG(PageCache, "Pruning page cache to 0 due to memory pressure");
             // Don't cache any page if we are under memory pressure.
-            PageCache::shared().pruneToSizeNow(0, PruningReason::MemoryPressure);
+            PageCache::singleton().pruneToSizeNow(0, PruningReason::MemoryPressure);
         } else if (systemMemoryLevel() <= memoryLevelThresholdToPrunePageCache) {
             LOG(MemoryPressure, "Pruning page cache because system memory level is %d at: %s", systemMemoryLevel(), __PRETTY_FUNCTION__);
-            LOG(PageCache, "Pruning page cache to %d due to low memory (level %d less or equal to %d threshold)", PageCache::shared().maxSize() / 2, systemMemoryLevel(), memoryLevelThresholdToPrunePageCache);
-            PageCache::shared().pruneToSizeNow(PageCache::shared().maxSize() / 2, PruningReason::MemoryPressure);
+            auto& pageCache = PageCache::singleton();
+            LOG(PageCache, "Pruning page cache to %d due to low memory (level %d less or equal to %d threshold)", pageCache.maxSize() / 2, systemMemoryLevel(), memoryLevelThresholdToPrunePageCache);
+            pageCache.pruneToSizeNow(pageCache.maxSize() / 2, PruningReason::MemoryPressure);
         }
     }
 #endif
@@ -1772,8 +1773,8 @@ void FrameLoader::commitProvisionalLoad()
     // Check to see if we need to cache the page we are navigating away from into the back/forward cache.
     // We are doing this here because we know for sure that a new page is about to be loaded.
     HistoryItem& item = *history().currentItem();
-    if (!m_frame.tree().parent() && PageCache::shared().canCache(m_frame.page()) && !item.isInPageCache())
-        PageCache::shared().add(item, *m_frame.page());
+    if (!m_frame.tree().parent() && PageCache::singleton().canCache(m_frame.page()) && !item.isInPageCache())
+        PageCache::singleton().add(item, *m_frame.page());
 
     if (m_loadType != FrameLoadType::Replace)
         closeOldDataSources();
@@ -3159,7 +3160,7 @@ void FrameLoader::loadDifferentDocumentItem(HistoryItem& item, FrameLoadType loa
     // Remember this item so we can traverse any child items as child frames load
     history().setProvisionalItem(&item);
 
-    if (CachedPage* cachedPage = PageCache::shared().get(item, m_frame.page())) {
+    if (CachedPage* cachedPage = PageCache::singleton().get(item, m_frame.page())) {
         auto documentLoader = cachedPage->documentLoader();
         documentLoader->setTriggeringAction(NavigationAction(documentLoader->request(), loadType, false));
         documentLoader->setLastCheckedRequest(ResourceRequest());
index 833e5884baa07b35b1b35e5f4bac37db39c9dda2..acf90906eadd209d0d04b4a8df870e80f5e97de7 100644 (file)
@@ -238,7 +238,7 @@ void HistoryController::invalidateCurrentItemCachedPage()
         return;
 
     // When we are pre-commit, the currentItem is where any page cache data resides.
-    std::unique_ptr<CachedPage> cachedPage = PageCache::shared().take(*currentItem(), m_frame.page());
+    std::unique_ptr<CachedPage> cachedPage = PageCache::singleton().take(*currentItem(), m_frame.page());
     if (!cachedPage)
         return;
 
@@ -336,7 +336,7 @@ void HistoryController::updateForReload()
 #endif
 
     if (m_currentItem) {
-        PageCache::shared().remove(*m_currentItem);
+        PageCache::singleton().remove(*m_currentItem);
     
         if (m_frame.loader().loadType() == FrameLoadType::Reload || m_frame.loader().loadType() == FrameLoadType::ReloadFromOrigin)
             saveScrollPositionAndViewStateToItem(m_currentItem.get());
index cb394ea657788726356c185485a5f28d11f93591..ea16158e70ca0618b2fc26ba5964f5bb61ae88d6 100644 (file)
@@ -453,7 +453,7 @@ DOMWindow::~DOMWindow()
 
 #if ENABLE(GAMEPAD)
     if (m_gamepadEventListenerCount)
-        GamepadManager::shared().unregisterDOMWindow(this);
+        GamepadManager::singleton().unregisterDOMWindow(this);
 #endif
 }
 
@@ -519,7 +519,7 @@ void DOMWindow::willDetachDocumentFromFrame()
 void DOMWindow::incrementGamepadEventListenerCount()
 {
     if (++m_gamepadEventListenerCount == 1)
-        GamepadManager::shared().registerDOMWindow(this);
+        GamepadManager::singleton().registerDOMWindow(this);
 }
 
 void DOMWindow::decrementGamepadEventListenerCount()
@@ -527,7 +527,7 @@ void DOMWindow::decrementGamepadEventListenerCount()
     ASSERT(m_gamepadEventListenerCount);
 
     if (!--m_gamepadEventListenerCount)
-        GamepadManager::shared().unregisterDOMWindow(this);
+        GamepadManager::singleton().unregisterDOMWindow(this);
 }
 #endif
 
index b4ab6ca09a0537507318294f8d92b9c31e0a82b4..ce1148bb0e09240f3601cdfef7b5e832d4337794 100644 (file)
@@ -210,7 +210,7 @@ void RegionOverlay::recomputeRegion()
         m_overlay->setNeedsDisplay();
 }
 
-DebugPageOverlays& DebugPageOverlays::shared()
+DebugPageOverlays& DebugPageOverlays::singleton()
 {
     if (!sharedDebugOverlays)
         sharedDebugOverlays = new DebugPageOverlays;
@@ -296,7 +296,7 @@ void DebugPageOverlays::settingsChanged(MainFrame& frame)
     if (!activeOverlayRegions && !hasOverlays(frame))
         return;
 
-    DebugPageOverlays::shared().updateOverlayRegionVisibility(frame, activeOverlayRegions);
+    DebugPageOverlays::singleton().updateOverlayRegionVisibility(frame, activeOverlayRegions);
 }
 
 }
index 1f641fd28a4232cb47953d620f5bf4df54806bec..54610a244bb6947b0d98ab6f34e4f51eb1cc39ba 100644 (file)
@@ -37,7 +37,7 @@ class RegionOverlay;
 
 class DebugPageOverlays {
 public:
-    static DebugPageOverlays& shared();
+    static DebugPageOverlays& singleton();
 
     enum class RegionType {
         WheelEventHandlers,
index 78cb19353389b7688e47b5b5f6b2f5000d047e97..988ad06dcc94cb81fd804b1e14b8f787be2aeeaf 100644 (file)
@@ -989,7 +989,7 @@ void Frame::setPageAndTextZoomFactors(float pageZoomFactor, float textZoomFactor
     }
 
     if (isMainFrame())
-        PageCache::shared().markPagesForFullStyleRecalc(*page);
+        PageCache::singleton().markPagesForFullStyleRecalc(*page);
 }
 
 float Frame::frameScaleFactor() const
index 7d97aef0e2ba222e559e5cbf8deb286da2de707c..27c04b5958dcbaf2db55f6fbe23a517bf6d21552 100644 (file)
@@ -839,9 +839,9 @@ void Page::setDeviceScaleFactor(float scaleFactor)
     setNeedsRecalcStyleInAllFrames();
 
     mainFrame().deviceOrPageScaleFactorChanged();
-    PageCache::shared().markPagesForDeviceScaleChanged(*this);
+    PageCache::singleton().markPagesForDeviceScaleChanged(*this);
 
-    PageCache::shared().markPagesForFullStyleRecalc(*this);
+    PageCache::singleton().markPagesForFullStyleRecalc(*this);
     GraphicsContext::updateDocumentMarkerResources();
 
     mainFrame().pageOverlayController().didChangeDeviceScaleFactor();
@@ -921,7 +921,7 @@ void Page::setPagination(const Pagination& pagination)
     m_pagination = pagination;
 
     setNeedsRecalcStyleInAllFrames();
-    PageCache::shared().markPagesForFullStyleRecalc(*this);
+    PageCache::singleton().markPagesForFullStyleRecalc(*this);
 }
 
 unsigned Page::pageCount() const
@@ -1661,7 +1661,7 @@ void Page::setVisitedLinkStore(Ref<VisitedLinkStore>&& visitedLinkStore)
     m_visitedLinkStore->addPage(*this);
 
     invalidateStylesForAllLinks();
-    PageCache::shared().markPagesForFullStyleRecalc(*this);
+    PageCache::singleton().markPagesForFullStyleRecalc(*this);
 }
 
 SessionID Page::sessionID() const
index dac26f278d7a17521f29d7fa2cd11c5462e294b7..a08a929befbd3b93d06574210134761ace50c20f 100644 (file)
@@ -111,7 +111,7 @@ void PageGroup::captionPreferencesChanged()
 {
     for (auto it = m_pages.begin(), end = m_pages.end(); it != end; ++it)
         (*it)->captionPreferencesChanged();
-    PageCache::shared().markPagesForCaptionPreferencesChanged();
+    PageCache::singleton().markPagesForCaptionPreferencesChanged();
 }
 
 CaptionUserPreferences* PageGroup::captionPreferences()
index f7bdc4c600045d972e2dd6df610269475d7bcfc4..53d2f9555f3016f22aee7f6b46cc2d2c9b4f2140 100644 (file)
@@ -512,7 +512,7 @@ void Settings::setUsesPageCache(bool usesPageCache)
         return;
 
     if (!m_usesPageCache)
-        PageCache::shared().pruneToSizeNow(0, PruningReason::None);
+        PageCache::singleton().pruneToSizeNow(0, PruningReason::None);
 }
 
 void Settings::setFontRenderingMode(FontRenderingMode mode)
index 9c8e2d1993f242d7ecc959fa2ee3a5f723415575..3117f8f24a7bb9c9273d08b0ed806ec969e49ddf 100644 (file)
@@ -40,22 +40,21 @@ ScrollingThread::ScrollingThread()
 
 bool ScrollingThread::isCurrentThread()
 {
-    if (!shared().m_threadIdentifier)
-        return false;
-
-    return currentThread() == shared().m_threadIdentifier;
+    auto threadIdentifier = ScrollingThread::singleton().m_threadIdentifier;
+    return threadIdentifier && currentThread() == threadIdentifier;
 }
 
 void ScrollingThread::dispatch(std::function<void ()> function)
 {
-    shared().createThreadIfNeeded();
+    auto& scrollingThread = ScrollingThread::singleton();
+    scrollingThread.createThreadIfNeeded();
 
     {
-        std::lock_guard<std::mutex> lock(shared().m_functionsMutex);
-        shared().m_functions.append(function);
+        std::lock_guard<std::mutex> lock(singleton().m_functionsMutex);
+        scrollingThread.m_functions.append(function);
     }
 
-    shared().wakeUpRunLoop();
+    scrollingThread.wakeUpRunLoop();
 }
 
 void ScrollingThread::dispatchBarrier(std::function<void ()> function)
@@ -65,7 +64,7 @@ void ScrollingThread::dispatchBarrier(std::function<void ()> function)
     });
 }
 
-ScrollingThread& ScrollingThread::shared()
+ScrollingThread& ScrollingThread::singleton()
 {
     static NeverDestroyed<ScrollingThread> scrollingThread;
 
index 7f1368e63b4b33548d9be299fd8138f422ecfa97..262cdf18a9648247d997b5c2d8b3155d447afaa6 100644 (file)
@@ -57,7 +57,7 @@ private:
 
     ScrollingThread();
 
-    static ScrollingThread& shared();
+    static ScrollingThread& singleton();
 
     void createThreadIfNeeded();
     static void threadCallback(void* scrollingThread);
index 0504a68b8e579e2c8e31f674b553a6706bf90f3f..b0f4927f123b1099f4c08b65e55fc1a10e4380bf 100644 (file)
@@ -33,7 +33,7 @@ namespace WebCore {
 
 static GamepadProvider* sharedProvider = nullptr;
 
-GamepadProvider& GamepadProvider::shared()
+GamepadProvider& GamepadProvider::singleton()
 {
     if (!sharedProvider) {
         static NeverDestroyed<GamepadProvider> defaultProvider;
index 24a9c7e42449b9080ff2d103ee79c05c0d44e202..8d1c5314ad4ab4606e89a42e0be7802e5ad18f5e 100644 (file)
@@ -39,7 +39,7 @@ class GamepadProvider {
 public:
     virtual ~GamepadProvider() { }
 
-    WEBCORE_EXPORT static GamepadProvider& shared();
+    WEBCORE_EXPORT static GamepadProvider& singleton();
     WEBCORE_EXPORT static void setSharedProvider(GamepadProvider&);
 
     virtual void startMonitoringGamepads(GamepadProviderClient*);
index b502deb30ee3ec4f59e644d898bc6075c1d3e7d7..e5246961f3fa14579d167f81cadc5285f3e7481c 100644 (file)
@@ -102,7 +102,7 @@ void MemoryPressureHandler::releaseCriticalMemory()
         ReliefLogger log("Empty the PageCache");
         // Right now, the only reason we call release critical memory while not under memory pressure is if the process is about to be suspended.
         PruningReason pruningReason = memoryPressureHandler().isUnderMemoryPressure() ? PruningReason::MemoryPressure : PruningReason::ProcessSuspended;
-        PageCache::shared().pruneToSizeNow(0, pruningReason);
+        PageCache::singleton().pruneToSizeNow(0, pruningReason);
     }
 
     {
index 4fbd999d6f7949049660f9ad7e8f79468cbac820..064800dd760359c01eab918fca62eae675735ac9 100644 (file)
@@ -127,7 +127,7 @@ public:
         m_purgeTimer.startOneShot(scratchBufferPurgeInterval);
     }
     
-    static ScratchBuffer& shared();
+    static ScratchBuffer& singleton();
 
 private:
     void timerFired()
@@ -159,7 +159,7 @@ private:
 #endif
 };
 
-ScratchBuffer& ScratchBuffer::shared()
+ScratchBuffer& ScratchBuffer::singleton()
 {
     DEPRECATED_DEFINE_STATIC_LOCAL(ScratchBuffer, scratchBuffer, ());
     return scratchBuffer;
@@ -567,7 +567,7 @@ void ShadowBlur::drawInsetShadow(GraphicsContext* graphicsContext, const FloatRe
 
 void ShadowBlur::drawRectShadowWithoutTiling(GraphicsContext* graphicsContext, const FloatRoundedRect& shadowedRect, const IntRect& layerRect)
 {
-    m_layerImage = ScratchBuffer::shared().getScratchBuffer(layerRect.size());
+    m_layerImage = ScratchBuffer::singleton().getScratchBuffer(layerRect.size());
     if (!m_layerImage)
         return;
 
@@ -575,7 +575,7 @@ void ShadowBlur::drawRectShadowWithoutTiling(GraphicsContext* graphicsContext, c
     bufferRelativeShadowedRect.move(m_layerContextTranslation);
 
     // Only redraw in the scratch buffer if its cached contents don't match our needs
-    bool redrawNeeded = ScratchBuffer::shared().setCachedShadowValues(m_blurRadius, Color::black, ColorSpaceDeviceRGB, bufferRelativeShadowedRect, shadowedRect.radii(), m_layerSize);
+    bool redrawNeeded = ScratchBuffer::singleton().setCachedShadowValues(m_blurRadius, Color::black, ColorSpaceDeviceRGB, bufferRelativeShadowedRect, shadowedRect.radii(), m_layerSize);
     if (redrawNeeded) {
         GraphicsContext* shadowContext = m_layerImage->context();
         GraphicsContextStateSaver stateSaver(*shadowContext);
@@ -597,12 +597,12 @@ void ShadowBlur::drawRectShadowWithoutTiling(GraphicsContext* graphicsContext, c
     
     drawShadowBuffer(graphicsContext);
     m_layerImage = 0;
-    ScratchBuffer::shared().scheduleScratchBufferPurge();
+    ScratchBuffer::singleton().scheduleScratchBufferPurge();
 }
 
 void ShadowBlur::drawInsetShadowWithoutTiling(GraphicsContext* graphicsContext, const FloatRect& rect, const FloatRoundedRect& holeRect, const IntRect& layerRect)
 {
-    m_layerImage = ScratchBuffer::shared().getScratchBuffer(layerRect.size());
+    m_layerImage = ScratchBuffer::singleton().getScratchBuffer(layerRect.size());
     if (!m_layerImage)
         return;
 
@@ -613,7 +613,7 @@ void ShadowBlur::drawInsetShadowWithoutTiling(GraphicsContext* graphicsContext,
     bufferRelativeHoleRect.move(m_layerContextTranslation);
 
     // Only redraw in the scratch buffer if its cached contents don't match our needs
-    bool redrawNeeded = ScratchBuffer::shared().setCachedInsetShadowValues(m_blurRadius, Color::black, ColorSpaceDeviceRGB, bufferRelativeRect, bufferRelativeHoleRect, holeRect.radii());
+    bool redrawNeeded = ScratchBuffer::singleton().setCachedInsetShadowValues(m_blurRadius, Color::black, ColorSpaceDeviceRGB, bufferRelativeRect, bufferRelativeHoleRect, holeRect.radii());
     if (redrawNeeded) {
         GraphicsContext* shadowContext = m_layerImage->context();
         GraphicsContextStateSaver stateSaver(*shadowContext);
@@ -638,7 +638,7 @@ void ShadowBlur::drawInsetShadowWithoutTiling(GraphicsContext* graphicsContext,
     
     drawShadowBuffer(graphicsContext);
     m_layerImage = 0;
-    ScratchBuffer::shared().scheduleScratchBufferPurge();
+    ScratchBuffer::singleton().scheduleScratchBufferPurge();
 }
 
 /*
@@ -675,7 +675,7 @@ void ShadowBlur::drawInsetShadowWithoutTiling(GraphicsContext* graphicsContext,
 
 void ShadowBlur::drawInsetShadowWithTiling(GraphicsContext* graphicsContext, const FloatRect& rect, const FloatRoundedRect& holeRect, const IntSize& templateSize, const IntSize& edgeSize)
 {
-    m_layerImage = ScratchBuffer::shared().getScratchBuffer(templateSize);
+    m_layerImage = ScratchBuffer::singleton().getScratchBuffer(templateSize);
     if (!m_layerImage)
         return;
 
@@ -684,7 +684,7 @@ void ShadowBlur::drawInsetShadowWithTiling(GraphicsContext* graphicsContext, con
     FloatRect templateHole = FloatRect(edgeSize.width(), edgeSize.height(), templateSize.width() - 2 * edgeSize.width(), templateSize.height() - 2 * edgeSize.height());
 
     // Only redraw in the scratch buffer if its cached contents don't match our needs
-    bool redrawNeeded = ScratchBuffer::shared().setCachedInsetShadowValues(m_blurRadius, m_color, m_colorSpace, templateBounds, templateHole, holeRect.radii());
+    bool redrawNeeded = ScratchBuffer::singleton().setCachedInsetShadowValues(m_blurRadius, m_color, m_colorSpace, templateBounds, templateHole, holeRect.radii());
     if (redrawNeeded) {
         // Draw shadow into a new ImageBuffer.
         GraphicsContext* shadowContext = m_layerImage->context();
@@ -735,19 +735,20 @@ void ShadowBlur::drawInsetShadowWithTiling(GraphicsContext* graphicsContext, con
     drawLayerPieces(graphicsContext, destHoleBounds, holeRect.radii(), edgeSize, templateSize, InnerShadow);
 
     m_layerImage = 0;
-    ScratchBuffer::shared().scheduleScratchBufferPurge();
+    ScratchBuffer::singleton().scheduleScratchBufferPurge();
 }
 
 void ShadowBlur::drawRectShadowWithTiling(GraphicsContext* graphicsContext, const FloatRoundedRect& shadowedRect, const IntSize& templateSize, const IntSize& edgeSize)
 {
-    m_layerImage = ScratchBuffer::shared().getScratchBuffer(templateSize);
+    auto& scratchBuffer = ScratchBuffer::singleton();
+    m_layerImage = scratchBuffer.getScratchBuffer(templateSize);
     if (!m_layerImage)
         return;
 
     FloatRect templateShadow = FloatRect(edgeSize.width(), edgeSize.height(), templateSize.width() - 2 * edgeSize.width(), templateSize.height() - 2 * edgeSize.height());
 
     // Only redraw in the scratch buffer if its cached contents don't match our needs
-    bool redrawNeeded = ScratchBuffer::shared().setCachedShadowValues(m_blurRadius, m_color, m_colorSpace, templateShadow, shadowedRect.radii(), m_layerSize);
+    bool redrawNeeded = scratchBuffer.setCachedShadowValues(m_blurRadius, m_color, m_colorSpace, templateShadow, shadowedRect.radii(), m_layerSize);
     if (redrawNeeded) {
         // Draw shadow into the ImageBuffer.
         GraphicsContext* shadowContext = m_layerImage->context();
@@ -780,7 +781,7 @@ void ShadowBlur::drawRectShadowWithTiling(GraphicsContext* graphicsContext, cons
     drawLayerPieces(graphicsContext, shadowBounds, shadowedRect.radii(), edgeSize, templateSize, OuterShadow);
 
     m_layerImage = 0;
-    ScratchBuffer::shared().scheduleScratchBufferPurge();
+    ScratchBuffer::singleton().scheduleScratchBufferPurge();
 }
 
 void ShadowBlur::drawLayerPieces(GraphicsContext* graphicsContext, const FloatRect& shadowBounds, const FloatRoundedRect::Radii& radii, const IntSize& bufferPadding, const IntSize& templateSize, ShadowDirection direction)
@@ -891,12 +892,13 @@ GraphicsContext* ShadowBlur::beginShadowLayer(GraphicsContext *context, const Fl
     IntRect layerRect = calculateLayerBoundingRect(context, layerArea, context->clipBounds());
 
     if (layerRect.isEmpty())
-        return 0;
+        return nullptr;
 
     // We reset the scratch buffer values here, because the buffer will no longer contain
     // data from any previous rectangle or inset shadows drawn via the tiling path.
-    ScratchBuffer::shared().setCachedShadowValues(FloatSize(), Color::black, ColorSpaceDeviceRGB, IntRect(), FloatRoundedRect::Radii(), m_layerSize);
-    m_layerImage = ScratchBuffer::shared().getScratchBuffer(layerRect.size());
+    auto& scratchBuffer = ScratchBuffer::singleton();
+    scratchBuffer.setCachedShadowValues(FloatSize(), Color::black, ColorSpaceDeviceRGB, IntRect(), FloatRoundedRect::Radii(), m_layerSize);
+    m_layerImage = scratchBuffer.getScratchBuffer(layerRect.size());
 
     GraphicsContext* shadowContext = m_layerImage->context();
     shadowContext->save();
@@ -919,7 +921,7 @@ void ShadowBlur::endShadowLayer(GraphicsContext* context)
     context->drawImageBuffer(m_layerImage, ColorSpaceDeviceRGB, FloatRect(roundedIntPoint(m_layerOrigin), m_layerSize), FloatRect(FloatPoint(), m_layerSize), context->compositeOperation());
 
     m_layerImage = 0;
-    ScratchBuffer::shared().scheduleScratchBufferPurge();
+    ScratchBuffer::singleton().scheduleScratchBufferPurge();
 }
 
 } // namespace WebCore
index b7559b00bf9be5e328739c7583c32cb325b25c4d..c7e831d8cc6d1f0a9c799e27a43524855c663ca4 100644 (file)
@@ -220,14 +220,14 @@ void CACFLayerTreeHost::layerTreeDidChange()
     // The layer tree is changing as a result of someone modifying a PlatformCALayer that doesn't
     // have a corresponding GraphicsLayer. Schedule a flush since we won't schedule one through the
     // normal GraphicsLayer mechanisms.
-    LayerChangesFlusher::shared().flushPendingLayerChangesSoon(this);
+    LayerChangesFlusher::singleton().flushPendingLayerChangesSoon(this);
 }
 
 void CACFLayerTreeHost::destroyRenderer()
 {
     m_rootLayer = 0;
     m_rootChildLayer = 0;
-    LayerChangesFlusher::shared().cancelPendingFlush(this);
+    LayerChangesFlusher::singleton().cancelPendingFlush(this);
 }
 
 static void getDirtyRects(HWND window, Vector<CGRect>& outRects)
@@ -270,7 +270,7 @@ void CACFLayerTreeHost::paint()
 void CACFLayerTreeHost::flushPendingGraphicsLayerChangesSoon()
 {
     m_shouldFlushPendingGraphicsLayerChanges = true;
-    LayerChangesFlusher::shared().flushPendingLayerChangesSoon(this);
+    LayerChangesFlusher::singleton().flushPendingLayerChangesSoon(this);
 }
 
 void CACFLayerTreeHost::setShouldInvertColors(bool)
index 4b036ca40cf8bda06568de0fa51b4f031c85b267..3918755ee7af58d6c9ed22c0cdfe8c92b296d797 100644 (file)
@@ -33,7 +33,7 @@
 
 namespace WebCore {
 
-LayerChangesFlusher& LayerChangesFlusher::shared()
+LayerChangesFlusher& LayerChangesFlusher::singleton()
 {
     DEPRECATED_DEFINE_STATIC_LOCAL(LayerChangesFlusher, flusher, ());
     return flusher;
@@ -74,7 +74,7 @@ LRESULT LayerChangesFlusher::hookCallback(int code, WPARAM wParam, LPARAM lParam
     // crash for debugging purposes if an exception is hit. 
     ExceptionRegistration registrationStruct; // Note: must be stack allocated.
     StructuredExceptionHandlerSuppressor supressor(registrationStruct);
-    return shared().hookFired(code, wParam, lParam);
+    return singleton().hookFired(code, wParam, lParam);
 }
 
 LRESULT LayerChangesFlusher::hookFired(int code, WPARAM wParam, LPARAM lParam)
index fcb31e7b9de224f72758d566dd82c126221029c7..28e66b98539f03d7114e6a82072014fe16bf0d20 100644 (file)
@@ -37,7 +37,7 @@ class AbstractCACFLayerTreeHost;
 class LayerChangesFlusher {
     WTF_MAKE_NONCOPYABLE(LayerChangesFlusher);
 public:
-    static LayerChangesFlusher& shared();
+    static LayerChangesFlusher& singleton();
 
     void flushPendingLayerChangesSoon(AbstractCACFLayerTreeHost*);
     void cancelPendingFlush(AbstractCACFLayerTreeHost*);
index e7036c17b4f92daee1e250b09a600cdfdd897dcb..d16b95384eb705a14afa5d922a2f14e3ac0f0534 100644 (file)
@@ -33,7 +33,7 @@
 
 namespace WebCore {
 
-FloatingPointEnvironment& FloatingPointEnvironment::shared()
+FloatingPointEnvironment& FloatingPointEnvironment::singleton()
 {
     static NeverDestroyed<FloatingPointEnvironment> floatingPointEnvironment;
     return floatingPointEnvironment;
index 03f4d3f0fbcd2456f5a8dbe73da68fa9301968a9..6511bf0e0759b1527caaa4e33ea7ae3a1ad7d284 100644 (file)
@@ -40,7 +40,7 @@ public:
     WEBCORE_EXPORT void saveMainThreadEnvironment();
     void propagateMainThreadEnvironment();
 
-    WEBCORE_EXPORT static FloatingPointEnvironment& shared();
+    WEBCORE_EXPORT static FloatingPointEnvironment& singleton();
 
 private:
 
index 4b09d1f06da8238f7360435c17f3a19a95c3b3c9..d9d1396529fd8e37daa077012b718e6027d64636 100644 (file)
@@ -642,7 +642,7 @@ NO_RETURN
 #endif
 void *RunWebThread(void *arg)
 {
-    FloatingPointEnvironment::shared().propagateMainThreadEnvironment();
+    FloatingPointEnvironment::singleton().propagateMainThreadEnvironment();
 
     UNUSED_PARAM(arg);
     // WTF::initializeMainThread() needs to be called before JSC::initializeThreading() since the
@@ -757,7 +757,7 @@ static void StartWebThread()
     ASSERT_WITH_MESSAGE(result == 0, "startup lock failed with code:%d", result);
 
     // Propagate the mainThread's fenv to workers & the web thread.
-    FloatingPointEnvironment::shared().saveMainThreadEnvironment();
+    FloatingPointEnvironment::singleton().saveMainThreadEnvironment();
 
     pthread_create(&webThread, &tattr, RunWebThread, NULL);
     pthread_attr_destroy(&tattr);
index 24f1b08475c75c4913463941fa0e5fa2b01c5dbb..697a49c6180aab18fc237b0b8e6d9f457c644802 100644 (file)
@@ -73,7 +73,7 @@ static void deviceValuesChangedCallback(void* context, IOReturn result, void*, I
     listener->valuesChanged(value);
 }
 
-HIDGamepadProvider& HIDGamepadProvider::shared()
+HIDGamepadProvider& HIDGamepadProvider::singleton()
 {
     static NeverDestroyed<HIDGamepadProvider> sharedListener;
     return sharedListener;
index 80e30eecb0531659560210f3becc7d86ec2529cd..5a068df6bb19d54580bd5717ef1ad6c37e89093d 100644 (file)
@@ -46,7 +46,7 @@ class HIDGamepadProvider : public GamepadProvider {
     WTF_MAKE_NONCOPYABLE(HIDGamepadProvider);
     friend class NeverDestroyed<HIDGamepadProvider>;
 public:
-    WEBCORE_EXPORT static HIDGamepadProvider& shared();
+    WEBCORE_EXPORT static HIDGamepadProvider& singleton();
 
     virtual void startMonitoringGamepads(GamepadProviderClient*);
     virtual void stopMonitoringGamepads(GamepadProviderClient*);
index 389138c9b40ef5179e8c4fbb599e47d9b08c864b..cc5a5cbe1f2a8928119c8282eb07da0533d35117 100644 (file)
@@ -45,7 +45,7 @@ static MediaStreamCenter*& mediaStreamCenterOverride()
     return override;
 }
 
-MediaStreamCenter& MediaStreamCenter::shared()
+MediaStreamCenter& MediaStreamCenter::singleton()
 {
     MediaStreamCenter* override = mediaStreamCenterOverride();
     if (override)
index 7d540b94de958604c7a4404b73b05d0de4331332..e697f02e0d54b67654c38a17cf3a40286a3dc2a8 100644 (file)
@@ -49,7 +49,7 @@ class MediaStreamCenter {
 public:
     virtual ~MediaStreamCenter();
 
-    static MediaStreamCenter& shared();
+    static MediaStreamCenter& singleton();
     static void setSharedStreamCenter(MediaStreamCenter*);
 
     virtual void validateRequestConstraints(PassRefPtr<MediaStreamCreationClient>, PassRefPtr<MediaConstraints> audioConstraints, PassRefPtr<MediaConstraints> videoConstraints) = 0;
index 8efe415994a7e06632466ea55d60a226fac53c5c..a3893c0e431559bc8c8d620749286468ba563a0c 100644 (file)
@@ -45,7 +45,7 @@ class CaptureDevice;
 
 class AVCaptureDeviceManager {
 public:
-    static AVCaptureDeviceManager& shared();
+    static AVCaptureDeviceManager& singleton();
     static bool isAvailable();
 
     Vector<RefPtr<TrackSourceInfo>> getSourcesInfo(const String&);
index 9afd9edaafac21dcc01e2d3f8d8ac7319dae4cf5..b0b26f6c35560db45628d08a7eb12be59e3eeaa3 100644 (file)
@@ -117,7 +117,7 @@ static Vector<CaptureDevice>& captureDeviceList()
     if (firstTime && !captureDeviceList.size()) {
         firstTime = false;
         refreshCaptureDeviceList();
-        AVCaptureDeviceManager::shared().registerForDeviceNotifications();
+        AVCaptureDeviceManager::singleton().registerForDeviceNotifications();
     }
 
     return captureDeviceList;
@@ -174,7 +174,7 @@ bool AVCaptureDeviceManager::isAvailable()
     return AVFoundationLibrary();
 }
 
-AVCaptureDeviceManager& AVCaptureDeviceManager::shared()
+AVCaptureDeviceManager& AVCaptureDeviceManager::singleton()
 {
     DEPRECATED_DEFINE_STATIC_LOCAL(AVCaptureDeviceManager, manager, ());
     return manager;
index 8d8d90df14c2cfcab2d0b57e8a9f5a876e4c54ff..534e47e125753a9f56b3c1d7f77f211ffc67bc05 100644 (file)
@@ -65,7 +65,7 @@ void MediaStreamCenterMac::validateRequestConstraints(PassRefPtr<MediaStreamCrea
 
     if (audioConstraints) {
         String invalidConstraint;
-        AVCaptureDeviceManager::shared().verifyConstraintsForMediaType(MediaStreamSource::Audio, audioConstraints.get(), invalidConstraint);
+        AVCaptureDeviceManager::singleton().verifyConstraintsForMediaType(MediaStreamSource::Audio, audioConstraints.get(), invalidConstraint);
         if (!invalidConstraint.isEmpty()) {
             client->constraintsInvalid(invalidConstraint);
             return;
@@ -74,7 +74,7 @@ void MediaStreamCenterMac::validateRequestConstraints(PassRefPtr<MediaStreamCrea
 
     if (videoConstraints) {
         String invalidConstraint;
-        AVCaptureDeviceManager::shared().verifyConstraintsForMediaType(MediaStreamSource::Video, videoConstraints.get(), invalidConstraint);
+        AVCaptureDeviceManager::singleton().verifyConstraintsForMediaType(MediaStreamSource::Video, videoConstraints.get(), invalidConstraint);
         if (!invalidConstraint.isEmpty()) {
             client->constraintsInvalid(invalidConstraint);
             return;
@@ -95,13 +95,13 @@ void MediaStreamCenterMac::createMediaStream(PassRefPtr<MediaStreamCreationClien
     
     if (audioConstraints) {
         String invalidConstraint;
-        AVCaptureDeviceManager::shared().verifyConstraintsForMediaType(MediaStreamSource::Audio, audioConstraints.get(), invalidConstraint);
+        AVCaptureDeviceManager::singleton().verifyConstraintsForMediaType(MediaStreamSource::Audio, audioConstraints.get(), invalidConstraint);
         if (!invalidConstraint.isEmpty()) {
             client->failedToCreateStreamWithConstraintsError(invalidConstraint);
             return;
         }
         
-        RefPtr<MediaStreamSource> audioSource = AVCaptureDeviceManager::shared().bestSourceForTypeAndConstraints(MediaStreamSource::Audio, audioConstraints.get());
+        RefPtr<MediaStreamSource> audioSource = AVCaptureDeviceManager::singleton().bestSourceForTypeAndConstraints(MediaStreamSource::Audio, audioConstraints.get());
         ASSERT(audioSource);
         
         audioSources.append(audioSource.release());
@@ -109,13 +109,13 @@ void MediaStreamCenterMac::createMediaStream(PassRefPtr<MediaStreamCreationClien
     
     if (videoConstraints) {
         String invalidConstraint;
-        AVCaptureDeviceManager::shared().verifyConstraintsForMediaType(MediaStreamSource::Video, videoConstraints.get(), invalidConstraint);
+        AVCaptureDeviceManager::singleton().verifyConstraintsForMediaType(MediaStreamSource::Video, videoConstraints.get(), invalidConstraint);
         if (!invalidConstraint.isEmpty()) {
             client->failedToCreateStreamWithConstraintsError(invalidConstraint);
             return;
         }
         
-        RefPtr<MediaStreamSource> videoSource = AVCaptureDeviceManager::shared().bestSourceForTypeAndConstraints(MediaStreamSource::Video, videoConstraints.get());
+        RefPtr<MediaStreamSource> videoSource = AVCaptureDeviceManager::singleton().bestSourceForTypeAndConstraints(MediaStreamSource::Video, videoConstraints.get());
         ASSERT(videoSource);
         
         videoSources.append(videoSource.release());
@@ -128,7 +128,7 @@ bool MediaStreamCenterMac::getMediaStreamTrackSources(PassRefPtr<MediaStreamTrac
 {
     RefPtr<MediaStreamTrackSourcesRequestClient> requestClient = prpClient;
 
-    Vector<RefPtr<TrackSourceInfo>> sources = AVCaptureDeviceManager::shared().getSourcesInfo(requestClient->requestOrigin());
+    Vector<RefPtr<TrackSourceInfo>> sources = AVCaptureDeviceManager::singleton().getSourcesInfo(requestClient->requestOrigin());
 
     requestClient->didCompleteRequest(sources);
     return true;
index 85ea6671c020797419a5d4ac346e5c8533b85bc2..3706b5c380b413cfc1b8e16452ca91b88e22118b 100644 (file)
@@ -50,7 +50,7 @@ static const int gMaxRequestsToQueue = 64;
 // If there were queued names that couldn't be sent simultaneously, check the state of resolvers after this delay.
 static const double gRetryResolvingInSeconds = 0.1;
 
-DNSResolveQueue& DNSResolveQueue::shared()
+DNSResolveQueue& DNSResolveQueue::singleton()
 {
     static NeverDestroyed<DNSResolveQueue> queue;
 
index cd9ba0fc0e2a56ef4daa4fb966d7c9e432940cbf..27f00d8bd01937606029e77a8e3753798e795e17 100644 (file)
@@ -39,7 +39,7 @@ class DNSResolveQueue {
     friend NeverDestroyed<DNSResolveQueue>;
 
 public:
-    static DNSResolveQueue& shared();
+    static DNSResolveQueue& singleton();
 
     void add(const String& hostname);
     void decrementRequestCount()
index bd40572d9f1b0b84f50b3a0ca9e40dc231a60503..e6fea6d0dd673d6d754e1e9cd8f14bd1a171b514 100644 (file)
@@ -77,7 +77,7 @@ bool DNSResolveQueue::platformProxyIsEnabledInSystemPreferences()
 
 static void clientCallback(CFHostRef theHost, CFHostInfoType, const CFStreamError*, void*)
 {
-    DNSResolveQueue::shared().decrementRequestCount(); // It's ok to call shared() from a secondary thread, the static variable has already been initialized by now.
+    DNSResolveQueue::singleton().decrementRequestCount(); // It's ok to call singleton() from a secondary thread, the static variable has already been initialized by now.
     CFRelease(theHost);
 }
 
@@ -109,7 +109,7 @@ void prefetchDNS(const String& hostname)
     ASSERT(isMainThread());
     if (hostname.isEmpty())
         return;
-    DNSResolveQueue::shared().add(hostname);
+    DNSResolveQueue::singleton().add(hostname);
 }
 
 }
index ca414847f5f9de10a77bab610b9c5f4c89ede759..a4fb24bd667b85020074001bf9e048999fcaa44c 100644 (file)
@@ -47,7 +47,7 @@ bool DNSResolveQueue::platformProxyIsEnabledInSystemPreferences()
 
 static void resolvedCallback(SoupAddress*, guint, void*)
 {
-    DNSResolveQueue::shared().decrementRequestCount();
+    DNSResolveQueue::singleton().decrementRequestCount();
 }
 
 void DNSResolveQueue::platformResolve(const String& hostname)
@@ -63,7 +63,7 @@ void prefetchDNS(const String& hostname)
     if (hostname.isEmpty())
         return;
 
-    DNSResolveQueue::shared().add(hostname);
+    DNSResolveQueue::singleton().add(hostname);
 }
 
 }
index b3d1aa849f02eadca7dae820fb601f6b65a02866..87de7569672541d7204a3129ebda479b012c9eb3 100644 (file)
@@ -304,7 +304,7 @@ void Internals::resetToConsistentState(Page* page)
     AXObjectCache::disableAccessibility();
 #endif
 
-    MockPageOverlayClient::shared().uninstallAllOverlays();
+    MockPageOverlayClient::singleton().uninstallAllOverlays();
 }
 
 Internals::Internals(Document* document)
@@ -2431,7 +2431,7 @@ void Internals::installMockPageOverlay(const String& overlayType, ExceptionCode&
         return;
     }
 
-    MockPageOverlayClient::shared().installOverlay(document->frame()->mainFrame(), overlayType == "view" ? PageOverlay::OverlayType::View : PageOverlay::OverlayType::Document);
+    MockPageOverlayClient::singleton().installOverlay(document->frame()->mainFrame(), overlayType == "view" ? PageOverlay::OverlayType::View : PageOverlay::OverlayType::Document);
 }
 
 String Internals::pageOverlayLayerTreeAsText(ExceptionCode& ec) const
@@ -2444,7 +2444,7 @@ String Internals::pageOverlayLayerTreeAsText(ExceptionCode& ec) const
 
     document->updateLayout();
 
-    return MockPageOverlayClient::shared().layerTreeAsText(document->frame()->mainFrame());
+    return MockPageOverlayClient::singleton().layerTreeAsText(document->frame()->mainFrame());
 }
 
 void Internals::setPageMuted(bool muted)
index be09c3d606c1d1ace7d291b669d1005ff601e3c5..61f19bf16501a9dff16d7b9e89820484e21115d8 100644 (file)
@@ -34,7 +34,7 @@
 
 namespace WebCore {
 
-MockPageOverlayClient& MockPageOverlayClient::shared()
+MockPageOverlayClient& MockPageOverlayClient::singleton()
 {
     static NeverDestroyed<MockPageOverlayClient> sharedClient;
     return sharedClient.get();
index 7d463f236828283bd7aa4aba86baea0f38cae894..1dd297b39a0d738b7c1422dab47b9124aadb1fbb 100644 (file)
@@ -36,7 +36,7 @@ class MainFrame;
 class MockPageOverlayClient final : public PageOverlay::Client {
     friend class NeverDestroyed<MockPageOverlayClient>;
 public:
-    static MockPageOverlayClient& shared();
+    static MockPageOverlayClient& singleton();
 
     explicit MockPageOverlayClient();
 
index 0fbeb1d714c8415c26036ed0e32c09ee0f5a6b3a..3c2dca551ca46f2dc60d1ef2604bfa78b31ed1c6 100644 (file)
@@ -141,7 +141,7 @@ void WorkerThread::workerThread()
 {
     // Propagate the mainThread's fenv to workers.
 #if PLATFORM(IOS)
-    FloatingPointEnvironment::shared().propagateMainThreadEnvironment();
+    FloatingPointEnvironment::singleton().propagateMainThreadEnvironment();
 #endif
 
     {
index 31e2626ff57d080953fb40ecc2707d85dc37e7fe..f90a57093ce7372e4fba70ef5117f8d7780c38be 100644 (file)
@@ -1,3 +1,18 @@
+2015-01-30  Chris Dumez  <cdumez@apple.com>
+
+        Rename shared() static member functions to singleton() for singleton classes.
+        https://bugs.webkit.org/show_bug.cgi?id=141088
+
+        Reviewed by Ryosuke Niwa and Benjamin Poulain.
+
+        Rename shared() static member functions to singleton() for singleton
+        classes as per the recent coding style change.
+
+        * Storage/WebDatabaseProvider.cpp:
+        (WebDatabaseProvider::singleton):
+        (WebDatabaseProvider::shared): Deleted.
+        * Storage/WebDatabaseProvider.h:
+
 2015-01-29  Brent Fulgham  <bfulgham@apple.com>
 
         [Win] Build fix after r179368.
index 6be829ab4433b7958bb9c286b28fd6384e4ed05b..d150eca44c910561f011b01cf42f72853db61acf 100644 (file)
@@ -28,7 +28,7 @@
 #include <WebCore/IDBFactoryBackendInterface.h>
 #include <wtf/NeverDestroyed.h>
 
-WebDatabaseProvider& WebDatabaseProvider::shared()
+WebDatabaseProvider& WebDatabaseProvider::singleton()
 {
     static WebDatabaseProvider& databaseProvider = adoptRef(*new WebDatabaseProvider).leakRef();
 
index 32dc27a126d99d3a82431bbce1030c6a8915643d..ca21180d747383e928371bff418adb0d6664a009 100644 (file)
@@ -32,7 +32,7 @@
 class WebDatabaseProvider final : public WebCore::DatabaseProvider {
     friend class NeverDestroyed<WebDatabaseProvider>;
 public:
-    static WebDatabaseProvider& shared();
+    static WebDatabaseProvider& singleton();
     virtual ~WebDatabaseProvider();
 
 private:
index 1ae54340189320a88aa89f5ba18c45f2206b1107..13e9125b17db49b8a1b4a3e4067223ce851f242b 100644 (file)
@@ -1,3 +1,13 @@
+2015-01-30  Chris Dumez  <cdumez@apple.com>
+
+        Rename shared() static member functions to singleton() for singleton classes.
+        https://bugs.webkit.org/show_bug.cgi?id=141088
+
+        Reviewed by Ryosuke Niwa and Benjamin Poulain.
+
+        Rename shared() static member functions to singleton() for singleton
+        classes as per the recent coding style change.
+
 2015-01-29  Beth Dakin  <bdakin@apple.com>
 
         Remove more Mountain Lion code from WebKit
index 6b450021c4278626363291363102772c25c12e1f..ebfbd4d0041023c25c2c69e8479082c8c426357f 100644 (file)
@@ -355,7 +355,7 @@ static bool bumperCarBackForwardHackNeeded()
 
 - (NSUInteger)pageCacheSize
 {
-    return [kit(core(self)->page()) usesPageCache] ? PageCache::shared().maxSize() : 0;
+    return [kit(core(self)->page()) usesPageCache] ? PageCache::singleton().maxSize() : 0;
 }
 
 - (int)backListCount
index baee3d07570bb3d3dc1edb78e322c808e8025711..4431a9001a994a9cc73b5bee68439b59d79bb03a 100644 (file)
     WebCore::cacheStorage().empty();
 
     // Empty the Cross-Origin Preflight cache
-    WebCore::CrossOriginPreflightResultCache::shared().empty();
+    WebCore::CrossOriginPreflightResultCache::singleton().empty();
 }
 
 #if PLATFORM(IOS)
index 563ec8e9906d8ad8156791661bf4097e5db91cb6..e8dcb24422dedbb84acb9e814ec3aa6ed7a4ddfe 100644 (file)
@@ -224,12 +224,12 @@ using namespace WebCore;
 
 + (int)cachedPageCount
 {
-    return PageCache::shared().pageCount();
+    return PageCache::singleton().pageCount();
 }
 
 + (int)cachedFrameCount
 {
-    return PageCache::shared().frameCount();
+    return PageCache::singleton().frameCount();
 }
 
 // Deprecated
index 1486d92d746e184c4a2728eed2b5c96694ef4dae..fcb220aac6907956edf3f171344e046e695e62f9 100644 (file)
@@ -42,7 +42,7 @@ class NetscapePluginHostProxy;
 
 class NetscapePluginHostManager {
 public:
-    static NetscapePluginHostManager& shared();
+    static NetscapePluginHostManager& singleton();
     
     PassRefPtr<NetscapePluginInstanceProxy> instantiatePlugin(const String& pluginPath, cpu_type_t pluginArchitecture, const String& bundleIdentifier, WebHostedNetscapePluginView *, NSString *mimeType, NSArray *attributeKeys, NSArray *attributeValues, NSString *userAgent, NSURL *sourceURL, bool fullFrame, bool isPrivateBrowsingEnabled, bool isAcceleratedCompositingEnabled, bool hostLayersInWindowServer);
 
index 1f9facbbdf2054897ae6171ac5180be97f0ee78d..40ecb206235adff6e75fc348c19f0045c01e4ef0 100644 (file)
@@ -49,7 +49,7 @@ using namespace WebCore;
 
 namespace WebKit {
 
-NetscapePluginHostManager& NetscapePluginHostManager::shared()
+NetscapePluginHostManager& NetscapePluginHostManager::singleton()
 {
     DEPRECATED_DEFINE_STATIC_LOCAL(NetscapePluginHostManager, pluginHostManager, ());
     
index 5705cfb3b17ee8a25c8474572d32eb326f44b91f..9cd655c9f710535a9df2af457d70446a6d9b6e67 100644 (file)
@@ -146,7 +146,7 @@ void NetscapePluginHostProxy::pluginHostDied()
     for (PluginInstanceMap::const_iterator it = instances.begin(); it != end; ++it)
         it->value->pluginHostDied();
     
-    NetscapePluginHostManager::shared().pluginHostDied(this);
+    NetscapePluginHostManager::singleton().pluginHostDied(this);
     
     // The plug-in crashed while its menu bar was hidden. Make sure to show it.
     if (!m_menuBarIsVisible)
index e4297faeb2fab79e153c6cb7c506757a11b211d9..7600583690d7960c5d8a59a73e72d025db2cff37 100644 (file)
@@ -130,7 +130,7 @@ extern "C" {
     acceleratedCompositingEnabled = [[[self webView] preferences] acceleratedCompositingEnabled];
     _hostsLayersInWindowServer = [self windowHostsLayersInWindowServer];
 
-    _proxy = NetscapePluginHostManager::shared().instantiatePlugin([_pluginPackage.get() path], [_pluginPackage.get() pluginHostArchitecture], [_pluginPackage.get() bundleIdentifier], self, _MIMEType.get(), _attributeKeys.get(), _attributeValues.get(), userAgent, _sourceURL.get(),
+    _proxy = NetscapePluginHostManager::singleton().instantiatePlugin([_pluginPackage.get() path], [_pluginPackage.get() pluginHostArchitecture], [_pluginPackage.get() bundleIdentifier], self, _MIMEType.get(), _attributeKeys.get(), _attributeValues.get(), userAgent, _sourceURL.get(),
                                                                    _mode == NP_FULL, _isPrivateBrowsingEnabled, acceleratedCompositingEnabled, _hostsLayersInWindowServer);
     if (!_proxy) 
         return NO;
index 9e34582a46a721428b9bafae861d1ccb011ce399..1906ef367db54a6ca2a8bd14533822a912e66b8f 100644 (file)
@@ -221,7 +221,7 @@ using namespace WebCore;
 
 - (void)createPropertyListFile
 {
-    NetscapePluginHostManager::shared().createPropertyListFile(path, pluginHostArchitecture, [self bundleIdentifier]);
+    NetscapePluginHostManager::singleton().createPropertyListFile(path, pluginHostArchitecture, [self bundleIdentifier]);
 }
 
 #endif
index c50bc2a4c7786b71a1074dbc7fdc415669bcf448..83d4865941afc76105e739a8e9dba9e534a2dc34 100644 (file)
@@ -297,7 +297,7 @@ Page* WebChromeClient::createWindow(Frame* frame, const FrameLoadRequest&, const
 
 #if USE(PLUGIN_HOST_PROCESS) && ENABLE(NETSCAPE_PLUGIN_API)
     if (newWebView)
-        WebKit::NetscapePluginHostManager::shared().didCreateWindow();
+        WebKit::NetscapePluginHostManager::singleton().didCreateWindow();
 #endif
     
     return core(newWebView);
index 8447164314d554f45691e9c2298c6e4dc3fbb054..e1f37dbb05fa325f3705e79472bdb58023c6e44e 100644 (file)
@@ -842,7 +842,7 @@ Frame* WebFrameLoaderClient::dispatchCreatePage(const NavigationAction&)
     
 #if USE(PLUGIN_HOST_PROCESS) && ENABLE(NETSCAPE_PLUGIN_API)
     if (newWebView)
-        WebKit::NetscapePluginHostManager::shared().didCreateWindow();
+        WebKit::NetscapePluginHostManager::singleton().didCreateWindow();
 #endif
         
     return core([newWebView mainFrame]);
index 4f2e2217025ee57a1fa34812be6dffcde29cbd54..332f6eb00191964cb269ee12e0cd4f61e6fabf1e 100644 (file)
@@ -74,7 +74,7 @@ void WebVisitedLinkStore::removeAllVisitedLinks()
 {
     for (auto& visitedLinkStore : visitedLinkStores())
         visitedLinkStore->removeVisitedLinkHashes();
-    PageCache::shared().markPagesForVisitedLinkStyleRecalc();
+    PageCache::singleton().markPagesForVisitedLinkStyleRecalc();
 }
 
 void WebVisitedLinkStore::addVisitedLink(NSString *urlString)
@@ -103,7 +103,7 @@ void WebVisitedLinkStore::removeVisitedLink(NSString *urlString)
     m_visitedLinkHashes.remove(linkHash);
 
     invalidateStylesForLink(linkHash);
-    PageCache::shared().markPagesForVisitedLinkStyleRecalc();
+    PageCache::singleton().markPagesForVisitedLinkStyleRecalc();
 }
 
 bool WebVisitedLinkStore::isLinkVisited(Page& page, LinkHash linkHash, const URL& baseURL, const AtomicString& attributeURL)
@@ -152,7 +152,7 @@ void WebVisitedLinkStore::addVisitedLinkHash(LinkHash linkHash)
     m_visitedLinkHashes.add(linkHash);
 
     invalidateStylesForLink(linkHash);
-    PageCache::shared().markPagesForVisitedLinkStyleRecalc();
+    PageCache::singleton().markPagesForVisitedLinkStyleRecalc();
 }
 
 void WebVisitedLinkStore::removeVisitedLinkHashes()
index 0c05f2c508880da89dd44ed42d818523c3e41f3e..74ad55a946ed8e39704a6dd3ba848abc88010ea2 100644 (file)
@@ -849,7 +849,7 @@ static void WebKitInitializeGamepadProviderIfNecessary()
     if (initialized)
         return;
 
-    GamepadProvider::shared().setSharedProvider(HIDGamepadProvider::shared());
+    GamepadProvider::singleton().setSharedProvider(HIDGamepadProvider::singleton());
     initialized = true;
 }
 #endif
@@ -957,7 +957,7 @@ static void WebKitInitializeGamepadProviderIfNecessary()
     pageConfiguration.alternativeTextClient = new WebAlternativeTextClient(self);
     pageConfiguration.loaderClientForMainFrame = new WebFrameLoaderClient;
     pageConfiguration.progressTrackerClient = new WebProgressTrackerClient(self);
-    pageConfiguration.databaseProvider = &WebDatabaseProvider::shared();
+    pageConfiguration.databaseProvider = &WebDatabaseProvider::singleton();
     pageConfiguration.storageNamespaceProvider = &_private->group->storageNamespaceProvider();
     pageConfiguration.userContentController = &_private->group->userContentController();
     pageConfiguration.visitedLinkStore = &_private->group->visitedLinkStore();
@@ -1190,7 +1190,7 @@ static void WebKitInitializeGamepadProviderIfNecessary()
     pageConfiguration.inspectorClient = new WebInspectorClient(self);
     pageConfiguration.loaderClientForMainFrame = new WebFrameLoaderClient;
     pageConfiguration.progressTrackerClient = new WebProgressTrackerClient(self);
-    pageConfiguration.databaseProvider = &WebDatabaseProvider::shared();
+    pageConfiguration.databaseProvider = &WebDatabaseProvider::singleton();
     pageConfiguration.storageNamespaceProvider = &_private->group->storageNamespaceProvider();
     pageConfiguration.userContentController = &_private->group->userContentController();
     pageConfiguration.visitedLinkStore = &_private->group->visitedLinkStore();
@@ -1868,12 +1868,12 @@ static bool fastDocumentTeardownEnabled()
 #if ENABLE(REMOTE_INSPECTOR)
 + (void)_enableRemoteInspector
 {
-    RemoteInspector::shared().start();
+    RemoteInspector::singleton().start();
 }
 
 + (void)_disableRemoteInspector
 {
-    RemoteInspector::shared().stop();
+    RemoteInspector::singleton().stop();
 }
 
 + (void)_disableAutoStartRemoteInspector
@@ -1883,12 +1883,12 @@ static bool fastDocumentTeardownEnabled()
 
 + (BOOL)_isRemoteInspectorEnabled
 {
-    return RemoteInspector::shared().enabled();
+    return RemoteInspector::singleton().enabled();
 }
 
 + (BOOL)_hasRemoteInspectorSession
 {
-    return RemoteInspector::shared().hasActiveDebugSession();
+    return RemoteInspector::singleton().hasActiveDebugSession();
 }
 
 - (BOOL)allowsRemoteInspection
@@ -1926,7 +1926,7 @@ static bool fastDocumentTeardownEnabled()
 - (void)_setHostApplicationProcessIdentifier:(pid_t)pid auditToken:(audit_token_t)auditToken
 {
     RetainPtr<CFDataRef> auditData = adoptCF(CFDataCreate(nullptr, (const UInt8*)&auditToken, sizeof(auditToken)));
-    RemoteInspector::shared().setParentProcessInformation(pid, auditData);
+    RemoteInspector::singleton().setParentProcessInformation(pid, auditData);
 }
 #endif // PLATFORM(IOS)
 #endif // ENABLE(REMOTE_INSPECTOR)
@@ -7915,9 +7915,11 @@ static inline uint64_t roundUpToPowerOf2(uint64_t num)
 
     memoryCache().setCapacities(cacheMinDeadCapacity, cacheMaxDeadCapacity, cacheTotalCapacity);
     memoryCache().setDeadDecodedDataDeletionInterval(deadDecodedDataDeletionInterval);
-    PageCache::shared().setMaxSize(pageCacheSize);
+
+    auto& pageCache = PageCache::singleton();
+    pageCache.setMaxSize(pageCacheSize);
 #if PLATFORM(IOS)
-    PageCache::shared().setShouldClearBackingStores(true);
+    pageCache.setShouldClearBackingStores(true);
     nsurlCacheMemoryCapacity = std::max(nsurlCacheMemoryCapacity, [nsurlCache memoryCapacity]);
     CFURLCacheRef cfCache;
     if ([nsurlCache respondsToSelector:@selector(_CFURLCache)] && (cfCache = [nsurlCache _CFURLCache]))
index b46c9283d49ccd541aa81485256d68340fa17994..ce59fec05792f6a0249dda5dfe31534b36cd086c 100644 (file)
@@ -1,3 +1,13 @@
+2015-01-30  Chris Dumez  <cdumez@apple.com>
+
+        Rename shared() static member functions to singleton() for singleton classes.
+        https://bugs.webkit.org/show_bug.cgi?id=141088
+
+        Reviewed by Ryosuke Niwa and Benjamin Poulain.
+
+        Rename shared() static member functions to singleton() for singleton
+        classes as per the recent coding style change.
+
 2015-01-29  Brent Fulgham  <bfulgham@apple.com>
 
         [Win] Build fix after r179368.
index 7c2c0cf91539171a61512a9556cd1f2b465fa9ab..da2726b711974b1211a6d3daab17ea19364aed78 100644 (file)
@@ -215,7 +215,7 @@ HRESULT STDMETHODCALLTYPE WebCache::empty( void)
     WebCore::cacheStorage().empty();
 
     // Empty the Cross-Origin Preflight cache
-    WebCore::CrossOriginPreflightResultCache::shared().empty();
+    WebCore::CrossOriginPreflightResultCache::singleton().empty();
 
     return S_OK;
 }
index b43071c2528da6e78e8bd1271510fc157b4a737b..1680265ad82f8fbb264243f612ace06ab626ef4a 100644 (file)
@@ -327,7 +327,7 @@ HRESULT WebCoreStatistics::cachedPageCount(INT* count)
     if (!count)
         return E_POINTER;
 
-    *count = PageCache::shared().pageCount();
+    *count = PageCache::singleton().pageCount();
     return S_OK;
 }
 
@@ -336,6 +336,6 @@ HRESULT WebCoreStatistics::cachedFrameCount(INT* count)
     if (!count)
         return E_POINTER;
 
-    *count = PageCache::shared().frameCount();
+    *count = PageCache::singleton().frameCount();
     return S_OK;
 }
index 49c03762e97c9a1e7badb374faf1c6b3172f7b5c..c2b19f1099894077cb737294ad04655207118fdc 100644 (file)
@@ -34,7 +34,7 @@ using namespace WebCore;
 
 static bool s_shouldTrackVisitedLinks;
 
-WebVisitedLinkStore& WebVisitedLinkStore::shared()
+WebVisitedLinkStore& WebVisitedLinkStore::singleton()
 {
     static WebVisitedLinkStore& visitedLinkStore = *adoptRef(new WebVisitedLinkStore).leakRef();
     
@@ -62,8 +62,8 @@ void WebVisitedLinkStore::setShouldTrackVisitedLinks(bool shouldTrackVisitedLink
 
 void WebVisitedLinkStore::removeAllVisitedLinks()
 {
-    shared().removeVisitedLinkHashes();
-    PageCache::shared().markPagesForVisitedLinkStyleRecalc();
+    WebVisitedLinkStore::singleton().removeVisitedLinkHashes();
+    PageCache::singleton().markPagesForVisitedLinkStyleRecalc();
 }
 
 void WebVisitedLinkStore::addVisitedLink(const String& urlString)
@@ -116,7 +116,7 @@ void WebVisitedLinkStore::addVisitedLinkHash(LinkHash linkHash)
     m_visitedLinkHashes.add(linkHash);
 
     invalidateStylesForLink(linkHash);
-    PageCache::shared().markPagesForVisitedLinkStyleRecalc();
+    PageCache::singleton().markPagesForVisitedLinkStyleRecalc();
 }
 
 void WebVisitedLinkStore::removeVisitedLinkHashes()
index 7e7a0747512a0969d6fabd085b890527a9b17578..64a980f1fa45c804ff6657a4eefa2ba6d6a64f1c 100644 (file)
@@ -32,7 +32,7 @@
 
 class WebVisitedLinkStore final : public WebCore::VisitedLinkStore {
 public:
-    static WebVisitedLinkStore& shared();
+    static WebVisitedLinkStore& singleton();
     WebVisitedLinkStore();
     virtual ~WebVisitedLinkStore();
 
index f4d5e7f8a7bc713b78d8747d06d0ccb19c70ddc7..99d353c0097f280358ebdc35f0e00e30e264abbe 100644 (file)
@@ -675,7 +675,7 @@ void WebView::setCacheModel(WebCacheModel cacheModel)
 
     memoryCache().setCapacities(cacheMinDeadCapacity, cacheMaxDeadCapacity, cacheTotalCapacity);
     memoryCache().setDeadDecodedDataDeletionInterval(deadDecodedDataDeletionInterval);
-    PageCache::shared().setMaxSize(pageCacheSize);
+    PageCache::singleton().setMaxSize(pageCacheSize);
 
 #if USE(CFNETWORK)
     // Don't shrink a big disk cache, since that would cause churn.
@@ -2805,10 +2805,10 @@ HRESULT STDMETHODCALLTYPE WebView::initWithFrame(
     configuration.dragClient = new WebDragClient(this);
     configuration.inspectorClient = m_inspectorClient;
     configuration.loaderClientForMainFrame = new WebFrameLoaderClient;
-    configuration.databaseProvider = &WebDatabaseProvider::shared();
+    configuration.databaseProvider = &WebDatabaseProvider::singleton();
     configuration.storageNamespaceProvider = WebStorageNamespaceProvider::create(localStorageDatabasePath(m_preferences.get()));
     configuration.progressTrackerClient = static_cast<WebFrameLoaderClient*>(configuration.loaderClientForMainFrame);
-    configuration.visitedLinkStore = &WebVisitedLinkStore::shared();
+    configuration.visitedLinkStore = &WebVisitedLinkStore::singleton();
 
     m_page = new Page(configuration);
     provideGeolocationTo(m_page, new WebGeolocationClient(this));
@@ -6464,7 +6464,7 @@ HRESULT WebView::historyDelegate(IWebHistoryDelegate** historyDelegate)
 
 HRESULT WebView::addVisitedLinks(BSTR* visitedURLs, unsigned visitedURLCount)
 {
-    auto& visitedLinkStore = WebVisitedLinkStore::shared();
+    auto& visitedLinkStore = WebVisitedLinkStore::singleton();
     PageGroup& group = core(this)->group();
     
     for (unsigned i = 0; i < visitedURLCount; ++i) {
index 80875aff13287e59c6f00aa3a15550bcd07ece47..aa3cdb95cc5f2ddf8466dc99eb04c8ff5fa3e0e2 100644 (file)
@@ -1,3 +1,13 @@
+2015-01-30  Chris Dumez  <cdumez@apple.com>
+
+        Rename shared() static member functions to singleton() for singleton classes.
+        https://bugs.webkit.org/show_bug.cgi?id=141088
+
+        Reviewed by Ryosuke Niwa and Benjamin Poulain.
+
+        Rename shared() static member functions to singleton() for singleton
+        classes as per the recent coding style change.
+
 2015-01-30  Alexey Proskuryakov  <ap@apple.com>
 
         Build fix.
index 85a9000879d428f4b75e2f0732bffa72cdb514fd..9e59ebe3a1f5f3e9b0f320a7b0391603fbee1582 100644 (file)
@@ -47,7 +47,7 @@ using namespace WebCore;
 
 namespace WebKit {
 
-DatabaseProcess& DatabaseProcess::shared()
+DatabaseProcess& DatabaseProcess::singleton()
 {
     static NeverDestroyed<DatabaseProcess> databaseProcess;
     return databaseProcess;
index b2b24eea13ffb81f3cf79047dfc7018443f5aa16..6eaeedfab5d67bbbb92458d01d1b7b8703cb1f30 100644 (file)
@@ -48,7 +48,7 @@ class DatabaseProcess : public ChildProcess, public WebOriginDataManagerSuppleme
     WTF_MAKE_NONCOPYABLE(DatabaseProcess);
     friend class NeverDestroyed<DatabaseProcess>;
 public:
-    static DatabaseProcess& shared();
+    static DatabaseProcess& singleton();
     ~DatabaseProcess();
 
     const String& indexedDatabaseDirectory() const { return m_indexedDatabaseDirectory; }
index 8bd06b3c91e8ccbc020bd9a059be88bbeeafafbd..6035880676979efd821fe91af881b856dc2f4986 100644 (file)
@@ -71,7 +71,7 @@ void DatabaseProcessIDBConnection::disconnectedFromWebProcess()
 
 void DatabaseProcessIDBConnection::establishConnection(const String& databaseName, const SecurityOriginData& openingOrigin, const SecurityOriginData& mainFrameOrigin)
 {
-    m_uniqueIDBDatabase = DatabaseProcess::shared().getOrCreateUniqueIDBDatabase(UniqueIDBDatabaseIdentifier(databaseName, openingOrigin, mainFrameOrigin));
+    m_uniqueIDBDatabase = DatabaseProcess::singleton().getOrCreateUniqueIDBDatabase(UniqueIDBDatabaseIdentifier(databaseName, openingOrigin, mainFrameOrigin));
     m_uniqueIDBDatabase->registerConnection(*this);
 }
 
index b301225a0a0bbbc54c2bfbb3e12a88f150164f16..15c7f11dc0727c78fa9a36d70b25fd97ea6527a3 100644 (file)
@@ -69,7 +69,7 @@ UniqueIDBDatabase::UniqueIDBDatabase(const UniqueIDBDatabaseIdentifier& identifi
     // Each unique Indexed Database exists in a directory named for the database, which exists in a directory representing its opening origin.
     m_databaseRelativeDirectory = pathByAppendingComponent(databaseFilenameIdentifier(identifier.openingOrigin()), filenameForDatabaseName());
 
-    DatabaseProcess::shared().ensureIndexedDatabaseRelativePathExists(m_databaseRelativeDirectory);
+    DatabaseProcess::singleton().ensureIndexedDatabaseRelativePathExists(m_databaseRelativeDirectory);
 }
 
 UniqueIDBDatabase::~UniqueIDBDatabase()
@@ -118,7 +118,7 @@ void UniqueIDBDatabase::unregisterConnection(DatabaseProcessIDBConnection& conne
 
     if (m_connections.isEmpty() && m_pendingTransactionRollbacks.isEmpty()) {
         shutdown(UniqueIDBDatabaseShutdownType::NormalShutdown);
-        DatabaseProcess::shared().removeUniqueIDBDatabase(*this);
+        DatabaseProcess::singleton().removeUniqueIDBDatabase(*this);
     }
 }
 
@@ -1125,7 +1125,7 @@ void UniqueIDBDatabase::finalizeRollback(const WebKit::IDBIdentifier& transactio
         resetTransaction(transactionId, [this, transactionId](bool) {
             if (m_acceptingNewRequests && m_connections.isEmpty() && m_pendingTransactionRollbacks.isEmpty()) {
                 shutdown(UniqueIDBDatabaseShutdownType::NormalShutdown);
-                DatabaseProcess::shared().removeUniqueIDBDatabase(*this);
+                DatabaseProcess::singleton().removeUniqueIDBDatabase(*this);
             }
         });
     });
@@ -1134,7 +1134,7 @@ void UniqueIDBDatabase::finalizeRollback(const WebKit::IDBIdentifier& transactio
 String UniqueIDBDatabase::absoluteDatabaseDirectory() const
 {
     ASSERT(RunLoop::isMain());
-    return DatabaseProcess::shared().absoluteIndexedDatabasePathFromDatabaseRelativePath(m_databaseRelativeDirectory);
+    return DatabaseProcess::singleton().absoluteIndexedDatabasePathFromDatabaseRelativePath(m_databaseRelativeDirectory);
 }
 
 void UniqueIDBDatabase::postMainThreadTask(std::unique_ptr<AsyncTask> task, DatabaseTaskType taskType)
@@ -1189,7 +1189,7 @@ void UniqueIDBDatabase::postDatabaseTask(std::unique_ptr<AsyncTask> task, Databa
     m_databaseTasks.append(WTF::move(task));
 
     RefPtr<UniqueIDBDatabase> database(this);
-    DatabaseProcess::shared().queue().dispatch([database] {
+    DatabaseProcess::singleton().queue().dispatch([database] {
         database->performNextDatabaseTask();
     });
 }
index c60188c84c29c6bf687721d74242c4ac26d8c3c7..ea520a9af6b4bd557935ba4419f52243775aa6fa 100644 (file)
@@ -39,7 +39,7 @@ using namespace WebCore;
 
 namespace WebKit {
 
-NetworkBlobRegistry& NetworkBlobRegistry::shared()
+NetworkBlobRegistry& NetworkBlobRegistry::singleton()
 {
     ASSERT(RunLoop::isMain());
     static NeverDestroyed<NetworkBlobRegistry> registry;
index e5db63e38dcfbfbeadf71262c96dbc9ebe652c17..0030e0c0ee582539677ceb4e8ba9aa9f2c8595b5 100644 (file)
@@ -46,7 +46,7 @@ class NetworkBlobRegistry {
 WTF_MAKE_NONCOPYABLE(NetworkBlobRegistry);
 public:
     NetworkBlobRegistry();
-    static NetworkBlobRegistry& shared();
+    static NetworkBlobRegistry& singleton();
 
     void registerFileBlobURL(NetworkConnectionToWebProcess*, const WebCore::URL&, const String& path, PassRefPtr<SandboxExtension>, const String& contentType);
     void registerBlobURL(NetworkConnectionToWebProcess*, const WebCore::URL&, Vector<WebCore::BlobPart>, const String& contentType);
index 46deabeafbb387e46a5df31dc0acc891635cdd4b..70b6afd1373fd523fe9936cecb3d31bd044c88c6 100644 (file)
@@ -106,8 +106,8 @@ void NetworkConnectionToWebProcess::didClose(IPC::Connection&)
         loader->abort();
     ASSERT(m_networkResourceLoaders.isEmpty());
 
-    NetworkBlobRegistry::shared().connectionToWebProcessDidClose(this);
-    NetworkProcess::shared().removeNetworkConnectionToWebProcess(this);
+    NetworkBlobRegistry::singleton().connectionToWebProcessDidClose(this);
+    NetworkProcess::singleton().removeNetworkConnectionToWebProcess(this);
 }
 
 void NetworkConnectionToWebProcess::didReceiveInvalidMessage(IPC::Connection&, IPC::StringReference, IPC::StringReference)
@@ -118,14 +118,14 @@ void NetworkConnectionToWebProcess::scheduleResourceLoad(const NetworkResourceLo
 {
     RefPtr<NetworkResourceLoader> loader = NetworkResourceLoader::create(loadParameters, this);
     m_networkResourceLoaders.add(loadParameters.identifier, loader);
-    NetworkProcess::shared().networkResourceLoadScheduler().scheduleLoader(loader.get());
+    NetworkProcess::singleton().networkResourceLoadScheduler().scheduleLoader(loader.get());
 }
 
 void NetworkConnectionToWebProcess::performSynchronousLoad(const NetworkResourceLoadParameters& loadParameters, PassRefPtr<Messages::NetworkConnectionToWebProcess::PerformSynchronousLoad::DelayedReply> reply)
 {
     RefPtr<NetworkResourceLoader> loader = NetworkResourceLoader::create(loadParameters, this, reply);
     m_networkResourceLoaders.add(loadParameters.identifier, loader);
-    NetworkProcess::shared().networkResourceLoadScheduler().scheduleLoader(loader.get());
+    NetworkProcess::singleton().networkResourceLoadScheduler().scheduleLoader(loader.get());
 }
 
 void NetworkConnectionToWebProcess::removeLoadIdentifier(ResourceLoadIdentifier identifier)
@@ -176,18 +176,19 @@ static NetworkStorageSession& storageSession(SessionID sessionID)
 void NetworkConnectionToWebProcess::startDownload(SessionID, uint64_t downloadID, const ResourceRequest& request)
 {
     // FIXME: Do something with the session ID.
-    NetworkProcess::shared().downloadManager().startDownload(downloadID, request);
+    NetworkProcess::singleton().downloadManager().startDownload(downloadID, request);
 }
 
 void NetworkConnectionToWebProcess::convertMainResourceLoadToDownload(uint64_t mainResourceLoadIdentifier, uint64_t downloadID, const ResourceRequest& request, const ResourceResponse& response)
 {
+    auto& networkProcess = NetworkProcess::singleton();
     if (!mainResourceLoadIdentifier) {
-        NetworkProcess::shared().downloadManager().startDownload(downloadID, request);
+        networkProcess.downloadManager().startDownload(downloadID, request);
         return;
     }
 
     NetworkResourceLoader* loader = m_networkResourceLoaders.get(mainResourceLoadIdentifier);
-    NetworkProcess::shared().downloadManager().convertHandleToDownload(downloadID, loader->handle(), request, response);
+    networkProcess.downloadManager().convertHandleToDownload(downloadID, loader->handle(), request, response);
 
     // Unblock the URL connection operation queue.
     loader->handle()->continueDidReceiveResponse();
@@ -229,32 +230,32 @@ void NetworkConnectionToWebProcess::registerFileBlobURL(const URL& url, const St
 {
     RefPtr<SandboxExtension> extension = SandboxExtension::create(extensionHandle);
 
-    NetworkBlobRegistry::shared().registerFileBlobURL(this, url, path, extension.release(), contentType);
+    NetworkBlobRegistry::singleton().registerFileBlobURL(this, url, path, extension.release(), contentType);
 }
 
 void NetworkConnectionToWebProcess::registerBlobURL(const URL& url, Vector<BlobPart> blobParts, const String& contentType)
 {
-    NetworkBlobRegistry::shared().registerBlobURL(this, url, WTF::move(blobParts), contentType);
+    NetworkBlobRegistry::singleton().registerBlobURL(this, url, WTF::move(blobParts), contentType);
 }
 
 void NetworkConnectionToWebProcess::registerBlobURLFromURL(const URL& url, const URL& srcURL)
 {
-    NetworkBlobRegistry::shared().registerBlobURL(this, url, srcURL);
+    NetworkBlobRegistry::singleton().registerBlobURL(this, url, srcURL);
 }
 
 void NetworkConnectionToWebProcess::registerBlobURLForSlice(const URL& url, const URL& srcURL, int64_t start, int64_t end)
 {
-    NetworkBlobRegistry::shared().registerBlobURLForSlice(this, url, srcURL, start, end);
+    NetworkBlobRegistry::singleton().registerBlobURLForSlice(this, url, srcURL, start, end);
 }
 
 void NetworkConnectionToWebProcess::unregisterBlobURL(const URL& url)
 {
-    NetworkBlobRegistry::shared().unregisterBlobURL(this, url);
+    NetworkBlobRegistry::singleton().unregisterBlobURL(this, url);
 }
 
 void NetworkConnectionToWebProcess::blobSize(const URL& url, uint64_t& resultSize)
 {
-    resultSize = NetworkBlobRegistry::shared().blobSize(this, url);
+    resultSize = NetworkBlobRegistry::singleton().blobSize(this, url);
 }
 
 } // namespace WebKit
index 909af0e6076ca25dedca94bd9ae8454b55ce949f..69a638365e1f5094355967d176d7bfef44064388 100644 (file)
@@ -60,7 +60,7 @@ using namespace WebCore;
 
 namespace WebKit {
 
-NetworkProcess& NetworkProcess::shared()
+NetworkProcess& NetworkProcess::singleton()
 {
     static NeverDestroyed<NetworkProcess> networkProcess;
     return networkProcess;
@@ -191,7 +191,7 @@ void NetworkProcess::initializeConnection(IPC::Connection* connection)
     ChildProcess::initializeConnection(connection);
 
 #if ENABLE(SEC_ITEM_SHIM)
-    SecItemShim::shared().initializeConnection(connection);
+    SecItemShim::singleton().initializeConnection(connection);
 #endif
 
     NetworkProcessSupplementMap::const_iterator it = m_supplements.begin();
@@ -288,14 +288,15 @@ void NetworkProcess::setCanHandleHTTPSServerTrustEvaluation(bool value)
 
 void NetworkProcess::getNetworkProcessStatistics(uint64_t callbackID)
 {
-    NetworkResourceLoadScheduler& scheduler = NetworkProcess::shared().networkResourceLoadScheduler();
+    NetworkResourceLoadScheduler& scheduler = NetworkProcess::singleton().networkResourceLoadScheduler();
 
     StatisticsData data;
 
+    auto& networkProcess = NetworkProcess::singleton();
     data.statisticsNumbers.set("LoadsPendingCount", scheduler.loadsPendingCount());
     data.statisticsNumbers.set("LoadsActiveCount", scheduler.loadsActiveCount());
-    data.statisticsNumbers.set("DownloadsActiveCount", shared().downloadManager().activeDownloadCount());
-    data.statisticsNumbers.set("OutstandingAuthenticationChallengesCount", shared().authenticationManager().outstandingAuthenticationChallengeCount());
+    data.statisticsNumbers.set("DownloadsActiveCount", networkProcess.downloadManager().activeDownloadCount());
+    data.statisticsNumbers.set("OutstandingAuthenticationChallengesCount", networkProcess.authenticationManager().outstandingAuthenticationChallengeCount());
 
     parentProcessConnection()->send(Messages::WebProcessPool::DidGetStatistics(data, callbackID), 0);
 }
index d57f751aeb6184c9f1fa110b28f37f21650311f6..ad1e291d46360a92abbbe6da757c67091ed9272b 100644 (file)
@@ -53,7 +53,7 @@ class NetworkProcess : public ChildProcess, private DownloadManager::Client {
     friend class NeverDestroyed<NetworkProcess>;
     friend class NeverDestroyed<DownloadManager>;
 public:
-    static NetworkProcess& shared();
+    static NetworkProcess& singleton();
 
     template <typename T>
     T* supplement()
index dac75af7216525712cfa5e503caef2f230d4dec9..cf7a4708654555455ae489a918f95923a18a6748 100644 (file)
@@ -100,13 +100,13 @@ NetworkResourceLoader::NetworkResourceLoader(const NetworkResourceLoadParameters
     if (originalRequest().httpBody()) {
         for (const FormDataElement& element : originalRequest().httpBody()->elements()) {
             if (element.m_type == FormDataElement::Type::EncodedBlob)
-                m_fileReferences.appendVector(NetworkBlobRegistry::shared().filesInBlob(connection, element.m_url));
+                m_fileReferences.appendVector(NetworkBlobRegistry::singleton().filesInBlob(connection, element.m_url));
         }
     }
 
     if (originalRequest().url().protocolIs("blob")) {
         ASSERT(!m_parameters.resourceSandboxExtension);
-        m_fileReferences.appendVector(NetworkBlobRegistry::shared().filesInBlob(connection, originalRequest().url()));
+        m_fileReferences.appendVector(NetworkBlobRegistry::singleton().filesInBlob(connection, originalRequest().url()));
     }
 
     if (synchronousReply)
@@ -135,13 +135,13 @@ void NetworkResourceLoader::start()
     m_currentRequest = originalRequest();
 
 #if ENABLE(NETWORK_CACHE)
-    if (!NetworkCache::shared().isEnabled() || sessionID().isEphemeral()) {
+    if (!NetworkCache::singleton().isEnabled() || sessionID().isEphemeral()) {
         startNetworkLoad();
         return;
     }
 
     RefPtr<NetworkResourceLoader> loader(this);
-    NetworkCache::shared().retrieve(originalRequest(), [loader](std::unique_ptr<NetworkCache::Entry> entry) {
+    NetworkCache::singleton().retrieve(originalRequest(), [loader](std::unique_ptr<NetworkCache::Entry> entry) {
         if (loader->hasOneRef()) {
             // The loader has been aborted and is only held alive by this lambda.
             return;
@@ -175,7 +175,7 @@ void NetworkResourceLoader::startNetworkLoad()
         m_bufferedData = WebCore::SharedBuffer::create();
 
 #if ENABLE(NETWORK_CACHE)
-    if (NetworkCache::shared().isEnabled())
+    if (NetworkCache::singleton().isEnabled())
         m_bufferedDataForCache = WebCore::SharedBuffer::create();
 #endif
 
@@ -204,7 +204,7 @@ void NetworkResourceLoader::cleanup()
 
     invalidateSandboxExtensions();
 
-    NetworkProcess::shared().networkResourceLoadScheduler().removeLoader(this);
+    NetworkProcess::singleton().networkResourceLoadScheduler().removeLoader(this);
 
     m_handle = nullptr;
 
@@ -257,7 +257,7 @@ void NetworkResourceLoader::didReceiveResponseAsync(ResourceHandle* handle, cons
     if (m_cacheEntryForValidation) {
         bool validationSucceeded = m_response.httpStatusCode() == 304; // 304 Not Modified
         if (validationSucceeded)
-            NetworkCache::shared().update(originalRequest(), *m_cacheEntryForValidation, m_response);
+            NetworkCache::singleton().update(originalRequest(), *m_cacheEntryForValidation, m_response);
         if (!validationSucceeded || isConditionalRequest(originalRequest()))
             m_cacheEntryForValidation = nullptr;
     }
@@ -318,7 +318,7 @@ void NetworkResourceLoader::didFinishLoading(ResourceHandle* handle, double fini
     ASSERT_UNUSED(handle, handle == m_handle);
 
 #if ENABLE(NETWORK_CACHE)
-    if (NetworkCache::shared().isEnabled()) {
+    if (NetworkCache::singleton().isEnabled()) {
         if (m_cacheEntryForValidation) {
             // 304 Not Modified
             ASSERT(m_response.httpStatusCode() == 304);
@@ -337,7 +337,7 @@ void NetworkResourceLoader::didFinishLoading(ResourceHandle* handle, double fini
 
         bool isPrivate = sessionID().isEphemeral();
         if (hasCacheableRedirect && !isPrivate)
-            NetworkCache::shared().store(originalRequest(), m_response, m_bufferedDataForCache.release());
+            NetworkCache::singleton().store(originalRequest(), m_response, m_bufferedDataForCache.release());
     }
 #endif
 
@@ -474,7 +474,7 @@ void NetworkResourceLoader::didReceiveAuthenticationChallenge(ResourceHandle* ha
         return;
     }
 
-    NetworkProcess::shared().authenticationManager().didReceiveAuthenticationChallenge(m_parameters.webPageID, m_parameters.webFrameID, challenge);
+    NetworkProcess::singleton().authenticationManager().didReceiveAuthenticationChallenge(m_parameters.webPageID, m_parameters.webFrameID, challenge);
 }
 
 void NetworkResourceLoader::didCancelAuthenticationChallenge(ResourceHandle* handle, const AuthenticationChallenge&)
@@ -631,7 +631,7 @@ void NetworkResourceLoader::canAuthenticateAgainstProtectionSpaceAsync(ResourceH
 
     // Handle server trust evaluation at platform-level if requested, for performance reasons.
     if (protectionSpace.authenticationScheme() == ProtectionSpaceAuthenticationSchemeServerTrustEvaluationRequested
-        && !NetworkProcess::shared().canHandleHTTPSServerTrustEvaluation()) {
+        && !NetworkProcess::singleton().canHandleHTTPSServerTrustEvaluation()) {
         continueCanAuthenticateAgainstProtectionSpace(false);
         return;
     }
index 272020ccc9ed58cfffdcc710c2a82b6f8b1ebd63..c1dacc12f314b5770613b27d1484c8ec9c64ea74 100644 (file)
@@ -43,7 +43,7 @@
 
 namespace WebKit {
 
-NetworkCache& NetworkCache::shared()
+NetworkCache& NetworkCache::singleton()
 {
     static NeverDestroyed<NetworkCache> instance;
     return instance;
index 57da55299f371e454a434bef51318a9d82a975f0..583ca01986bcdf51617f8d5293edab5b72ebabbc 100644 (file)
@@ -44,7 +44,7 @@ namespace WebKit {
 class NetworkCache {
     WTF_MAKE_NONCOPYABLE(NetworkCache);
 public:
-    static NetworkCache& shared();
+    static NetworkCache& singleton();
 
     NetworkCache();
 
index 23f1d787f23121aba0f2d6f8cf8e2c6edf3f0de1..76044092cb16a3442c76dbf763b826bd0b30b910 100644 (file)
@@ -64,7 +64,7 @@ void NetworkProcess::platformInitializeNetworkProcessCocoa(const NetworkProcessC
     if (!m_diskCacheDirectory.isNull()) {
         SandboxExtension::consumePermanently(parameters.diskCacheDirectoryExtensionHandle);
 #if ENABLE(NETWORK_CACHE)
-        if (parameters.shouldEnableNetworkCache && NetworkCache::shared().initialize(m_diskCacheDirectory)) {
+        if (parameters.shouldEnableNetworkCache && NetworkCache::singleton().initialize(m_diskCacheDirectory)) {
             RetainPtr<NSURLCache> urlCache(adoptNS([[NSURLCache alloc] initWithMemoryCapacity:0 diskCapacity:0 diskPath:nil]));
             [NSURLCache setSharedURLCache:urlCache.get()];
             return;
@@ -134,8 +134,9 @@ void NetworkProcess::platformSetCacheModel(CacheModel cacheModel)
         pageCacheCapacity, urlCacheMemoryCapacity, urlCacheDiskCapacity);
 
 #if ENABLE(NETWORK_CACHE)
-    if (NetworkCache::shared().isEnabled()) {
-        NetworkCache::shared().setMaximumSize(urlCacheDiskCapacity);
+    auto& networkCache = NetworkCache::singleton();
+    if (networkCache.isEnabled()) {
+        networkCache.setMaximumSize(urlCacheDiskCapacity);
         return;
     }
 #endif
@@ -148,7 +149,7 @@ void NetworkProcess::platformSetCacheModel(CacheModel cacheModel)
 void NetworkProcess::clearDiskCache(std::chrono::system_clock::time_point modifiedSince, std::function<void ()> completionHandler)
 {
 #if ENABLE(NETWORK_CACHE)
-    NetworkCache::shared().clear();
+    NetworkCache::singleton().clear();
 #endif
 
     if (!m_clearCacheDispatchGroup)
index b299a36c35a18829d08a7bc5a3b43bf790c1b7c1..1d7e0527cf415681d6390c4017a300a6d228675f 100644 (file)
@@ -82,14 +82,14 @@ void NetworkProcess::clearCacheForAllOrigins(uint32_t cachesToClear)
     if (resourceCachesToClear == InMemoryResourceCachesOnly)
         return;
 #if ENABLE(NETWORK_CACHE)
-    NetworkCache::shared().clear();
+    NetworkCache::singleton().clear();
 #endif
 }
 
 void NetworkProcess::platformInitializeNetworkProcess(const NetworkProcessCreationParameters& parameters)
 {
 #if ENABLE(SEC_ITEM_SHIM)
-    SecItemShim::shared().initialize(this);
+    SecItemShim::singleton().initialize(this);
 #endif
     platformInitializeNetworkProcessCocoa(parameters);
 }
index 71d063b1d7aa221ba4ba79f0b740a1ed91773272..fac11a4f9e25b72efb73180f2c1f3cd523c04c9e 100644 (file)
@@ -103,7 +103,7 @@ void NetworkProcess::platformInitializeNetworkProcess(const NetworkProcessCreati
     platformInitializeNetworkProcessCocoa(parameters);
 
 #if ENABLE(SEC_ITEM_SHIM)
-    SecItemShim::shared().initialize(this);
+    SecItemShim::singleton().initialize(this);
 #endif
 
     if (!parameters.httpProxy.isNull() || !parameters.httpsProxy.isNull())
index af54b81a02c0453ddb9b7c77b1f9dd14b3ee03b8..b4d41a56c9007a705429c88ff818ee8ca986bbfc 100644 (file)
@@ -67,7 +67,7 @@ RetainPtr<CFDataRef> RemoteNetworkingContext::sourceApplicationAuditData() const
 {
 #if PLATFORM(IOS)
     audit_token_t auditToken;
-    if (!NetworkProcess::shared().parentProcessConnection()->getAuditToken(auditToken))
+    if (!NetworkProcess::singleton().parentProcessConnection()->getAuditToken(auditToken))
         return nullptr;
     return adoptCF(CFDataCreate(0, (const UInt8*)&auditToken, sizeof(auditToken)));
 #else
index 9db81c1f1ad9693275f1d3a14c89417760a82106..d9a8f60f13ffa410436bd97e21ae3a6c24a2af85 100644 (file)
@@ -109,7 +109,7 @@ bool PluginControllerProxy::initialize(const PluginCreationParameters& creationP
     ASSERT(!m_isInitializing);
     m_isInitializing = true; // Cannot use TemporaryChange here, because this object can be deleted before the function returns.
 
-    m_plugin = NetscapePlugin::create(PluginProcess::shared().netscapePluginModule());
+    m_plugin = NetscapePlugin::create(PluginProcess::singleton().netscapePluginModule());
     if (!m_plugin) {
         // This will delete the plug-in controller proxy object.
         m_connection->removePluginControllerProxy(this, 0);
index 57a66a075b27d961349ddeaefbb4c7222cae362e..410700e1d758688e0caa5fcb056581620c83f470 100644 (file)
@@ -48,7 +48,7 @@ using namespace WebCore;
 
 namespace WebKit {
 
-PluginProcess& PluginProcess::shared()
+PluginProcess& PluginProcess::singleton()
 {
     static NeverDestroyed<PluginProcess> pluginProcess;
     return pluginProcess;
@@ -70,8 +70,9 @@ PluginProcess::~PluginProcess()
 void PluginProcess::lowMemoryHandler(bool critical)
 {
     UNUSED_PARAM(critical);
-    if (shared().shouldTerminate())
-        shared().terminate();
+    auto& pluginProcess = PluginProcess::singleton();
+    if (pluginProcess.shouldTerminate())
+        pluginProcess.terminate();
 }
 
 void PluginProcess::initializeProcess(const ChildProcessInitializationParameters& parameters)
index 3568d09aef8f9114c1f1b7fb2f6727947c18f6f4..009dd759e3c914d8ed59b6a0e90abb32503acfdf 100644 (file)
@@ -50,7 +50,7 @@ class PluginProcess : public ChildProcess, private WebCore::AudioHardwareListene
     WTF_MAKE_NONCOPYABLE(PluginProcess);
     friend class NeverDestroyed<PluginProcess>;
 public:
-    static PluginProcess& shared();
+    static PluginProcess& singleton();
 
     void removeWebProcessConnection(WebProcessConnection*);
 
index 3a74c78425a37b5e2fb7d773273e2af8f0ca2c45..0fe35d010ebe23ab2c8b18d03149124915a25752 100644 (file)
@@ -106,12 +106,12 @@ void WebProcessConnection::removePluginControllerProxy(PluginControllerProxy* pl
     m_connection = nullptr;
 
     // This will cause us to be deleted.    
-    PluginProcess::shared().removeWebProcessConnection(this);
+    PluginProcess::singleton().removeWebProcessConnection(this);
 }
 
 void WebProcessConnection::setGlobalException(const String& exceptionString)
 {
-    IPC::Connection* connection = ConnectionStack::shared().current();
+    IPC::Connection* connection = ConnectionStack::singleton().current();
     if (!connection)
         return;
 
@@ -120,7 +120,7 @@ void WebProcessConnection::setGlobalException(const String& exceptionString)
 
 void WebProcessConnection::didReceiveMessage(IPC::Connection& connection, IPC::MessageDecoder& decoder)
 {
-    ConnectionStack::CurrentConnectionPusher currentConnection(ConnectionStack::shared(), &connection);
+    ConnectionStack::CurrentConnectionPusher currentConnection(ConnectionStack::singleton(), &connection);
 
     if (decoder.messageReceiverName() == Messages::WebProcessConnection::messageReceiverName()) {
         didReceiveWebProcessConnectionMessage(connection, decoder);
@@ -142,7 +142,7 @@ void WebProcessConnection::didReceiveMessage(IPC::Connection& connection, IPC::M
 
 void WebProcessConnection::didReceiveSyncMessage(IPC::Connection& connection, IPC::MessageDecoder& decoder, std::unique_ptr<IPC::MessageEncoder>& replyEncoder)
 {
-    ConnectionStack::CurrentConnectionPusher currentConnection(ConnectionStack::shared(), &connection);
+    ConnectionStack::CurrentConnectionPusher currentConnection(ConnectionStack::singleton(), &connection);
 
     uint64_t destinationID = decoder.destinationID();
 
@@ -183,7 +183,7 @@ void WebProcessConnection::destroyPlugin(uint64_t pluginInstanceID, bool asynchr
     reply->send();
 
     // Ensure we don't clamp any timers during destruction
-    ActivityAssertion activityAssertion(PluginProcess::shared().connectionActivity());
+    ActivityAssertion activityAssertion(PluginProcess::singleton().connectionActivity());
 
     PluginControllerProxy* pluginControllerProxy = m_pluginControllers.get(pluginInstanceID);
     
@@ -232,7 +232,7 @@ void WebProcessConnection::createPluginInternal(const PluginCreationParameters&
 void WebProcessConnection::createPlugin(const PluginCreationParameters& creationParameters, PassRefPtr<Messages::WebProcessConnection::CreatePlugin::DelayedReply> reply)
 {
     // Ensure we don't clamp any timers during initialization
-    ActivityAssertion activityAssertion(PluginProcess::shared().connectionActivity());
+    ActivityAssertion activityAssertion(PluginProcess::singleton().connectionActivity());
 
     PluginControllerProxy* pluginControllerProxy = m_pluginControllers.get(creationParameters.pluginInstanceID);
 
index fc587764a2a53a4f24369edcd298d1da84c9f449..b0159294e89f051fe1cc2692145884351824a8d7 100644 (file)
@@ -52,12 +52,12 @@ void PluginControllerProxy::setComplexTextInputState(PluginComplexTextInputState
 
 const MachSendRight& PluginControllerProxy::compositingRenderServerPort()
 {
-    return PluginProcess::shared().compositingRenderServerPort();
+    return PluginProcess::singleton().compositingRenderServerPort();
 }
 
 void PluginControllerProxy::openPluginPreferencePane()
 {
-    PluginProcess::shared().parentProcessConnection()->send(Messages::PluginProcessProxy::OpenPluginPreferencePane(), 0);
+    PluginProcess::singleton().parentProcessConnection()->send(Messages::PluginProcessProxy::OpenPluginPreferencePane(), 0);
 }
 
 void PluginControllerProxy::platformInitialize(const PluginCreationParameters& creationParameters)
@@ -130,7 +130,7 @@ void PluginControllerProxy::updateLayerHostingContext(LayerHostingMode layerHost
 
     switch (layerHostingMode) {
         case LayerHostingMode::InProcess:
-            m_layerHostingContext = LayerHostingContext::createForPort(PluginProcess::shared().compositingRenderServerPort());
+            m_layerHostingContext = LayerHostingContext::createForPort(PluginProcess::singleton().compositingRenderServerPort());
             break;
 #if HAVE(OUT_OF_PROCESS_LAYER_HOSTING)
         case LayerHostingMode::OutOfProcess:
index e8f4eb018efd14052b080c8eed1320f59d543b3e..042d4178b8ef25fc640ad81d7d6206ec399025bd 100644 (file)
@@ -114,7 +114,7 @@ template<typename T> void FullscreenWindowTracker::windowShown(T window)
     
     // If this is the first full screen window to be shown, notify the UI process.
     if (windowSetWasEmpty)
-        PluginProcess::shared().setFullscreenWindowIsShowing(true);
+        PluginProcess::singleton().setFullscreenWindowIsShowing(true);
 }
 
 template<typename T> void FullscreenWindowTracker::windowHidden(T window)
@@ -128,7 +128,7 @@ template<typename T> void FullscreenWindowTracker::windowHidden(T window)
 
     // If this was the last full screen window that was visible, notify the UI process.
     if (m_windows.isEmpty())
-        PluginProcess::shared().setFullscreenWindowIsShowing(false);
+        PluginProcess::singleton().setFullscreenWindowIsShowing(false);
 }
 
 static FullscreenWindowTracker& fullscreenWindowTracker()
@@ -195,7 +195,7 @@ static void carbonWindowHidden(WindowRef window)
 static bool openCFURLRef(CFURLRef url, int32_t& status, CFURLRef* launchedURL)
 {
     String launchedURLString;
-    if (!PluginProcess::shared().openURL(URL(url).string(), status, launchedURLString))
+    if (!PluginProcess::singleton().openURL(URL(url).string(), status, launchedURLString))
         return false;
 
     if (!launchedURLString.isNull() && launchedURL)
@@ -207,7 +207,7 @@ static bool openCFURLRef(CFURLRef url, int32_t& status, CFURLRef* launchedURL)
 
 static void setModal(bool modalWindowIsShowing)
 {
-    PluginProcess::shared().setModalWindowIsShowing(modalWindowIsShowing);
+    PluginProcess::singleton().setModalWindowIsShowing(modalWindowIsShowing);
 }
 
 static unsigned modalCount = 0;
@@ -275,7 +275,7 @@ static void replacedNSConcreteTask_launch(NSTask *self, SEL _cmd)
     for (NSString *argument in self.arguments)
         arguments.uncheckedAppend(argument);
 
-    if (PluginProcess::shared().launchProcess(launchPath, arguments))
+    if (PluginProcess::singleton().launchProcess(launchPath, arguments))
         return;
 
     NSConcreteTask_launch(self, _cmd);
@@ -295,7 +295,7 @@ static NSRunningApplication *replacedNSWorkspace_launchApplicationAtURL_options_
         }
     }
 
-    if (PluginProcess::shared().launchApplicationAtURL(URL(url).string(), arguments)) {
+    if (PluginProcess::singleton().launchApplicationAtURL(URL(url).string(), arguments)) {
         if (error)
             *error = nil;
         return nil;
@@ -308,7 +308,7 @@ static BOOL (*NSWorkspace_openFile)(NSWorkspace *, SEL, NSString *);
 
 static BOOL replacedNSWorkspace_openFile(NSWorkspace *self, SEL _cmd, NSString *fullPath)
 {
-    if (PluginProcess::shared().openFile(fullPath))
+    if (PluginProcess::singleton().openFile(fullPath))
         return true;
 
     return NSWorkspace_openFile(self, _cmd, fullPath);
index 565adf599bf367306219e6e58ea898199d5126cb..fb5397d11ad242f7c3659232828cbaf31e262eaf 100644 (file)
@@ -30,7 +30,7 @@
 
 namespace WebKit {
 
-ConnectionStack& ConnectionStack::shared()
+ConnectionStack& ConnectionStack::singleton()
 {
     static NeverDestroyed<ConnectionStack> connectionStack;
     return connectionStack;
index bd753a0e85b930f5633678471268edbd8fa1ebcd..c5326389448e3ec56d52596c5ed7f0a94d15d7f4 100644 (file)
@@ -36,7 +36,7 @@ namespace WebKit {
 
 class ConnectionStack {
 public:
-    static ConnectionStack& shared();
+    static ConnectionStack& singleton();
 
     IPC::Connection* current()
     {
index dbf0a1f10682695589ea9ffaf3ad5bb55736ab54..1d4ce3f620137d65f1c1f1dc9e30076af5a6c760 100644 (file)
@@ -87,7 +87,7 @@ int ChildProcessMain(int argc, char** argv)
         if (!delegate.getExtraInitializationData(parameters.extraInitializationData))
             return EXIT_FAILURE;
 
-        ChildProcessType::shared().initialize(parameters);
+        ChildProcessType::singleton().initialize(parameters);
     }
 
     delegate.startRunLoop();
index 09986bd7598954f61630d7a985f2a4cf60741b13..fbb32a3950abdcb77aedcc8d2b8aca746b51593b 100644 (file)
@@ -98,7 +98,7 @@ void XPCServiceInitializer(OSObjectPtr<xpc_connection_t> connection, xpc_object_
     voucher_replace_default_voucher();
 #endif
 
-    XPCServiceType::shared().initialize(parameters);
+    XPCServiceType::singleton().initialize(parameters);
 }
 
 } // namespace WebKit
index 824887778d91fe15627463b13bc1697eb7f42229..2fa43fd21b018c0c2f108d45bc38ed0dd2e33699 100644 (file)
@@ -39,7 +39,7 @@ namespace WebKit {
 
 static const char separator = '\t';
 
-WebMemorySampler* WebMemorySampler::shared()
+WebMemorySampler* WebMemorySampler::singleton()
 {
     static WebMemorySampler* sharedMemorySampler;
     if (!sharedMemorySampler)
index ec244105c8fd543a00d0da96ec2ab649195669e4..66f62a2ec8f4fb3ccd291db5b239fc6d5fbd03a1 100644 (file)
@@ -71,7 +71,7 @@ struct WebMemoryStatistics {
 class WebMemorySampler {
     WTF_MAKE_NONCOPYABLE(WebMemorySampler);
 public:
-    static WebMemorySampler* shared();
+    static WebMemorySampler* singleton();
     void start(const double interval = 0);
     void start(const SandboxExtension::Handle&, const String&, const double interval = 0);
     void stop();
index aecc041eec2eda8e347364ac2edc83d63dd7cdcb..efc7b3b8fe002b6a64b1d2bd2d87fc2a41a77baa 100644 (file)
@@ -66,7 +66,7 @@ void ChildProcess::setApplicationIsDaemon()
 
 void ChildProcess::platformInitialize()
 {
-    FloatingPointEnvironment& floatingPointEnvironment = FloatingPointEnvironment::shared(); 
+    FloatingPointEnvironment& floatingPointEnvironment = FloatingPointEnvironment::singleton(); 
     floatingPointEnvironment.enableDenormalSupport(); 
     floatingPointEnvironment.saveMainThreadEnvironment(); 
     [[NSFileManager defaultManager] changeCurrentDirectoryPath:[[NSBundle mainBundle] bundlePath]];
index 58e73f91f7cbb451f24b491f5ed7f9bfedfa9d0f..1158aee6a9094a4724472874e20df988a7bb9f40 100644 (file)
@@ -140,7 +140,7 @@ static void SIGSYSHandler(int signal, siginfo_t* info, void* data)
     if (!ucontext)
         CRASH();
 
-    SeccompBrokerClient* client = &SeccompBrokerClient::shared();
+    SeccompBrokerClient* client = &SeccompBrokerClient::singleton();
 
     if (client->handleIfOpeningOnlineCPUCount(&ucontext->uc_mcontext))
         return;
index a1519549533b882c417984f45d1bb82c90525c9f..ab342246338ffe927cdb9adaa3b1d8e392018514 100644 (file)
@@ -37,7 +37,7 @@ class CookieStorageShim {
     WTF_MAKE_NONCOPYABLE(CookieStorageShim);
     friend class NeverDestroyed<CookieStorageShim>;
 public:
-    static CookieStorageShim& shared();
+    static CookieStorageShim& singleton();
 
     void initialize();
 
index 17b8c72f1b8a1d037d47ac068c44a61bd28d580b..070a841442e7faa5e8ceb88c276110eec872148c 100644 (file)
@@ -61,7 +61,7 @@ static CFDictionaryRef webKitCookieStorageCopyRequestHeaderFieldsForURL(CFHTTPCo
 {
     String cookies;
     URL firstPartyForCookiesURL;
-    if (!WebProcess::shared().networkConnection()->connection()->sendSync(Messages::NetworkConnectionToWebProcess::CookieRequestHeaderFieldValue(SessionID::defaultSessionID(), firstPartyForCookiesURL, inRequestURL), Messages::NetworkConnectionToWebProcess::CookiesForDOM::Reply(cookies), 0))
+    if (!WebProcess::singleton().networkConnection()->connection()->sendSync(Messages::NetworkConnectionToWebProcess::CookieRequestHeaderFieldValue(SessionID::defaultSessionID(), firstPartyForCookiesURL, inRequestURL), Messages::NetworkConnectionToWebProcess::CookiesForDOM::Reply(cookies), 0))
         return 0;
 
     if (cookies.isNull())
@@ -73,7 +73,7 @@ static CFDictionaryRef webKitCookieStorageCopyRequestHeaderFieldsForURL(CFHTTPCo
     return CFDictionaryCreate(0, cookieKeys, cookieValues, 1, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
 }
 
-CookieStorageShim& CookieStorageShim::shared()
+CookieStorageShim& CookieStorageShim::singleton()
 {
     static NeverDestroyed<CookieStorageShim> storage;
     return storage;
index 6c661b13a44c05a2e05064b0b846b3f738162c94..4029d23585572be9c13744ce4fa1ede2199535cd 100644 (file)
@@ -72,7 +72,7 @@ static BlockingResponseMap<SecItemResponseData>& responseMap()
 
 static ChildProcess* sharedProcess;
 
-SecItemShim& SecItemShim::shared()
+SecItemShim& SecItemShim::singleton()
 {
     static SecItemShim* shim;
     static dispatch_once_t once;
index 97c4788b526d4aba28861ad412c5b353873c779d..cb364259844b48529c5b7f1e497997d287c09e4f 100644 (file)
@@ -38,7 +38,7 @@ class SecItemResponseData;
 class SecItemShim : public IPC::Connection::WorkQueueMessageReceiver {
 WTF_MAKE_NONCOPYABLE(SecItemShim);
 public:
-    static SecItemShim& shared();
+    static SecItemShim& singleton();
 
     void initialize(ChildProcess*);
     void initializeConnection(IPC::Connection*);
index cf2cb01fc8115fa5855965c6de0b4c2e7351f590..7b9029420d98fb6cf791aeff9307b2a85d1ac138 100644 (file)
@@ -57,7 +57,7 @@ int ChildProcessMain(int argc, char** argv)
     if (!childMain.parseCommandLine(argc, argv))
         return EXIT_FAILURE;
 
-    ChildProcessType::shared().initialize(childMain.initializationParameters());
+    ChildProcessType::singleton().initialize(childMain.initializationParameters());
     RunLoop::run();
     childMain.platformFinalize();
 
index 2da94dfc20039bf018713ba5adac063357dd07f5..3279dd7a967f8149e516f29b28f94d24b54d5a40 100644 (file)
@@ -36,25 +36,25 @@ void WKTextCheckerSetClient(const WKTextCheckerClientBase* wkClient)
 {
     if (wkClient && wkClient->version)
         return;
-    WebTextChecker::shared()->setClient(wkClient);
+    WebTextChecker::singleton()->setClient(wkClient);
 }
 
 void WKTextCheckerContinuousSpellCheckingEnabledStateChanged(bool enabled)
 {
-    WebTextChecker::shared()->continuousSpellCheckingEnabledStateChanged(enabled);
+    WebTextChecker::singleton()->continuousSpellCheckingEnabledStateChanged(enabled);
 }
 
 void WKTextCheckerGrammarCheckingEnabledStateChanged(bool enabled)
 {
-    WebTextChecker::shared()->grammarCheckingEnabledStateChanged(enabled);
+    WebTextChecker::singleton()->grammarCheckingEnabledStateChanged(enabled);
 }
 
 void WKTextCheckerCheckSpelling(WKPageRef page, bool startBeforeSelection)
 {
-    WebTextChecker::shared()->checkSpelling(toImpl(page), startBeforeSelection);
+    WebTextChecker::singleton()->checkSpelling(toImpl(page), startBeforeSelection);
 }
 
 void WKTextCheckerChangeSpellingToWord(WKPageRef page, WKStringRef word)
 {
-    WebTextChecker::shared()->changeSpellingToWord(toImpl(page), toWTFString(word));
+    WebTextChecker::singleton()->changeSpellingToWord(toImpl(page), toWTFString(word));
 }
index 0a9f1f5b500996c0dce9ba1206ff22b19d632075..89dde3f8d222525a7f0c918961999d51e91d1b59 100644 (file)
@@ -62,7 +62,7 @@ EwkMain::EwkMain()
 {
 }
 
-EwkMain& EwkMain::shared()
+EwkMain& EwkMain::singleton()
 {
     static EwkMain instance;
     return instance;
@@ -209,10 +209,10 @@ using namespace WebKit;
 
 int ewk_init()
 {
-    return EwkMain::shared().initialize();
+    return EwkMain::singleton().initialize();
 }
 
 int ewk_shutdown()
 {
-    return EwkMain::shared().finalize();
+    return EwkMain::singleton().finalize();
 }
index 38023c61884388acb4200d00f405525d44018684..1d4ce1faef0438093f9c365bddfa6669e1514538 100644 (file)
@@ -32,7 +32,7 @@ enum class EFLModuleInitFailure;
 
 class EwkMain {
 public:
-    static EwkMain& shared();
+    static EwkMain& singleton();
     ~EwkMain();
     int initialize();
     int finalize();
index cbf1c0448a629e61354f61f6d61007df971edecf..bf8fa183908dcd0b9b7dae851a66e7f39ec4aa83 100644 (file)
@@ -80,7 +80,7 @@ Eina_Bool ewk_view_smart_class_set(Ewk_View_Smart_Class* api)
 
 Evas_Object* EWKViewCreate(WKContextRef context, WKPageGroupRef pageGroup, Evas* canvas, Evas_Smart* smart)
 {
-    if (!EwkMain::shared().isInitialized()) {
+    if (!EwkMain::singleton().isInitialized()) {
         EINA_LOG_CRIT("EWebKit has not been initialized. You must call ewk_init() before creating view.");
         return nullptr;
     }
index a7d84814604c53b07fcce515155061ccfd315812..91653dce7db9b61aaeb8b3941fd5fed33a4371dd 100644 (file)
@@ -122,7 +122,7 @@ void WebProcessPool::updateProcessSuppressionState()
     if (!m_processSuppressionDisabledForPageCounter.value())
         m_pluginProcessManagerProcessSuppressionDisabledToken = nullptr;
     else if (!m_pluginProcessManagerProcessSuppressionDisabledToken)
-        m_pluginProcessManagerProcessSuppressionDisabledToken = PluginProcessManager::shared().processSuppressionDisabledToken();
+        m_pluginProcessManagerProcessSuppressionDisabledToken = PluginProcessManager::singleton().processSuppressionDisabledToken();
 #endif
 }
 
@@ -140,7 +140,7 @@ void WebProcessPool::platformInitialize()
     registerNotificationObservers();
 
 #if PLATFORM(IOS)
-    WebKit::WebMemoryPressureHandler::shared();
+    WebKit::WebMemoryPressureHandler::singleton();
 #endif
 }
 
index 5dff5463036c37df5597c9be2ad99d389d2e58e1..663877485ebeb1f494ee26bf2bfcfe689dc89748 100644 (file)
@@ -51,7 +51,7 @@ static unsigned pageIdFromRequestPath(const String& path)
     return number;
 }
 
-WebInspectorServer& WebInspectorServer::shared()
+WebInspectorServer& WebInspectorServer::singleton()
 {
     static WebInspectorServer& server = *new WebInspectorServer;
     return server;
index 19675b2b9d48b0cdb3c146c9d9d9ef977d432cb4..13299b16e193f674c0c4fdcc7778e6cf66d9091a 100644 (file)
@@ -41,7 +41,7 @@ class WebInspectorProxy;
 class WebInspectorServer : public WebSocketServer, public WebSocketServerClient {
 public:
     typedef HashMap<unsigned, WebInspectorProxy*> ClientMap;
-    static WebInspectorServer& shared();
+    static WebInspectorServer& singleton();
 
     // Page registry to manage known pages.
     int registerPage(WebInspectorProxy* client);
index 54b3be2fc6d3253161a4c218e6279a46534de43d..d5f33fcc71ad6242a00a5a9d3c2cb1f01c4101ee 100644 (file)
@@ -85,7 +85,7 @@ void NetworkProcessProxy::getLaunchOptions(ProcessLauncher::LaunchOptions& launc
 void NetworkProcessProxy::connectionWillOpen(IPC::Connection& connection)
 {
 #if ENABLE(SEC_ITEM_SHIM)
-    SecItemShimProxy::shared().initializeConnection(connection);
+    SecItemShimProxy::singleton().initializeConnection(connection);
 #else
     UNUSED_PARAM(connection);
 #endif
index ab9b92dce0d02ee0c818f79ccccc6ccfef84d3da..cb61d3628e729ee25e9bab953cb429c118666040 100644 (file)
@@ -35,7 +35,7 @@
 
 namespace WebKit {
 
-PluginProcessManager& PluginProcessManager::shared()
+PluginProcessManager& PluginProcessManager::singleton()
 {
     static NeverDestroyed<PluginProcessManager> pluginProcessManager;
     return pluginProcessManager;
index df32527975994eaf9e3f6072367bf7df9e74af87..f2911c36cb276b1741f62605397d5dd1d1ce842c 100644 (file)
@@ -55,7 +55,7 @@ class PluginProcessManager {
     WTF_MAKE_NONCOPYABLE(PluginProcessManager);
     friend class NeverDestroyed<PluginProcessManager>;
 public:
-    static PluginProcessManager& shared();
+    static PluginProcessManager& singleton();
 
     uint64_t pluginProcessToken(const PluginModuleInfo&, PluginProcessType, PluginProcessSandboxPolicy);
 
index 0f3d9410816ff13f8ae2ae0a41a4a0d90954855e..3a5f001c90649674ddabf4102f82c729ba631212 100644 (file)
@@ -229,7 +229,7 @@ void PluginProcessProxy::didFinishLaunching(ProcessLauncher*, IPC::Connection::I
     m_numPendingConnectionRequests = 0;
 
 #if PLATFORM(COCOA)
-    if (!PluginProcessManager::shared().processSuppressionDisabled())
+    if (!PluginProcessManager::singleton().processSuppressionDisabled())
         setProcessSuppressionEnabled(true);
 #endif
 }
index 3498ed58860f6fd9a6216d6d4a5aa919cc6549a7..e1806031e5778b1201558a05388242a9363a6646 100644 (file)
@@ -56,7 +56,7 @@ public:
             return;
         }
 
-        PluginProcessManager::shared().getSitesWithData(m_plugins.last(), m_webPluginSiteDataManager, m_callbackID);
+        PluginProcessManager::singleton().getSitesWithData(m_plugins.last(), m_webPluginSiteDataManager, m_callbackID);
         m_plugins.removeLast();
     }
 
@@ -94,7 +94,7 @@ public:
             return;
         }
 
-        PluginProcessManager::shared().clearSiteData(m_plugins.last(), m_webPluginSiteDataManager, m_sites, m_flags, m_maxAgeInSeconds, m_callbackID);
+        PluginProcessManager::singleton().clearSiteData(m_plugins.last(), m_webPluginSiteDataManager, m_sites, m_flags, m_maxAgeInSeconds, m_callbackID);
         m_plugins.removeLast();
     }
 
index 319bd3e15c4a601f9704b21673ddc56e8466583e..7920393931e7caf8fc12e2640431ecd953398f58 100644 (file)
@@ -36,7 +36,7 @@ namespace WebKit {
 
 static const unsigned gSchemaVersion = 2;
 
-PluginInfoCache& PluginInfoCache::shared()
+PluginInfoCache& PluginInfoCache::singleton()
 {
     static NeverDestroyed<PluginInfoCache> pluginInfoCache;
     return pluginInfoCache;
index d355b907629be56893a84d1b9ae8896806110631..cab1e0f9b64147b2ff7af4e5b1c766a54703fb4d 100644 (file)
@@ -40,7 +40,7 @@ class PluginInfoCache {
     WTF_MAKE_NONCOPYABLE(PluginInfoCache);
     friend class NeverDestroyed<PluginInfoCache>;
 public:
-    static PluginInfoCache& shared();
+    static PluginInfoCache& singleton();
 
     bool getPluginInfo(const String& pluginPath, PluginModuleInfo&);
     void updatePluginInfo(const String& pluginPath, const PluginModuleInfo&);
index 5f5409fe4a11b58caf0ef00fecc8a4c2138bd46b..3c668719fd3cb57ebae867ebb5ef12da1563b4e4 100644 (file)
@@ -102,11 +102,11 @@ Vector<String> PluginInfoStore::individualPluginPaths()
 bool PluginInfoStore::getPluginInfo(const String& pluginPath, PluginModuleInfo& plugin)
 {
 #if PLATFORM(GTK)
-    if (PluginInfoCache::shared().getPluginInfo(pluginPath, plugin))
+    if (PluginInfoCache::singleton().getPluginInfo(pluginPath, plugin))
         return true;
 
     if (NetscapePluginModule::getPluginInfo(pluginPath, plugin)) {
-        PluginInfoCache::shared().updatePluginInfo(pluginPath, plugin);
+        PluginInfoCache::singleton().updatePluginInfo(pluginPath, plugin);
         return true;
     }
     return false;
index 73eb3569a5bf29eacb20c43d6686c4fb69438674..bfd7ad55d99dae0c6f98d4ae4228d9d4a673f226 100644 (file)
@@ -59,7 +59,7 @@ const unsigned WebInspectorProxy::initialWindowHeight = 650;
 
 class WebInspectorPageGroups {
 public:
-    static WebInspectorPageGroups& shared()
+    static WebInspectorPageGroups& singleton()
     {
         static NeverDestroyed<WebInspectorPageGroups> instance;
         return instance;
@@ -145,7 +145,7 @@ WebInspectorProxy::WebInspectorProxy(WebPageProxy* page)
     , m_remoteInspectionPageId(0)
 #endif
 {
-    m_level = WebInspectorPageGroups::shared().inspectorLevel(m_page->pageGroup());
+    m_level = WebInspectorPageGroups::singleton().inspectorLevel(m_page->pageGroup());
     m_page->process().addMessageReceiver(Messages::WebInspectorProxy::messageReceiverName(), m_page->pageID(), *this);
 }
 
@@ -155,14 +155,14 @@ WebInspectorProxy::~WebInspectorProxy()
 
 WebPageGroup* WebInspectorProxy::inspectorPageGroup() const
 {
-    return WebInspectorPageGroups::shared().inspectorPageGroupForLevel(m_level);
+    return WebInspectorPageGroups::singleton().inspectorPageGroupForLevel(m_level);
 }
 
 void WebInspectorProxy::invalidate()
 {
 #if ENABLE(INSPECTOR_SERVER)
     if (m_remoteInspectionPageId)
-        WebInspectorServer::shared().unregisterPage(m_remoteInspectionPageId);
+        WebInspectorServer::singleton().unregisterPage(m_remoteInspectionPageId);
 #endif
 
     m_page->process().removeMessageReceiver(Messages::WebInspectorProxy::messageReceiverName(), m_page->pageID());
@@ -357,7 +357,7 @@ void WebInspectorProxy::togglePageProfiling()
 
 bool WebInspectorProxy::isInspectorPage(WebPageProxy& page)
 {
-    return WebInspectorPageGroups::shared().isInspectorPageGroup(page.pageGroup());
+    return WebInspectorPageGroups::singleton().isInspectorPageGroup(page.pageGroup());
 }
 
 WebProcessPool& WebInspectorProxy::inspectorProcessPool()
@@ -430,7 +430,7 @@ static void decidePolicyForNavigationAction(WKPageRef, WKFrameRef frameRef, WKFr
 void WebInspectorProxy::enableRemoteInspection()
 {
     if (!m_remoteInspectionPageId)
-        m_remoteInspectionPageId = WebInspectorServer::shared().registerPage(this);
+        m_remoteInspectionPageId = WebInspectorServer::singleton().registerPage(this);
 }
 
 void WebInspectorProxy::remoteFrontendConnected()
@@ -640,7 +640,7 @@ bool WebInspectorProxy::shouldOpenAttached()
 void WebInspectorProxy::sendMessageToRemoteFrontend(const String& message)
 {
     ASSERT(m_remoteInspectionPageId);
-    WebInspectorServer::shared().sendMessageOverConnection(m_remoteInspectionPageId, message);
+    WebInspectorServer::singleton().sendMessageOverConnection(m_remoteInspectionPageId, message);
 }
 #endif
 
index c010fdef1213dd3a1466c2e1b76218675c751883..a341319b22b64e99adc34f693523e62c8a16472e 100644 (file)
@@ -175,7 +175,7 @@ public:
         RefPtr<Messages::WebPageProxy::ExceededDatabaseQuota::DelayedReply> reply;
     };
 
-    static ExceededDatabaseQuotaRecords& shared();
+    static ExceededDatabaseQuotaRecords& singleton();
 
     std::unique_ptr<Record> createRecord(uint64_t frameID, String originIdentifier,
         String databaseName, String displayName, uint64_t currentQuota,
@@ -194,7 +194,7 @@ private:
     std::unique_ptr<Record> m_currentRecord;
 };
 
-ExceededDatabaseQuotaRecords& ExceededDatabaseQuotaRecords::shared()
+ExceededDatabaseQuotaRecords& ExceededDatabaseQuotaRecords::singleton()
 {
     static NeverDestroyed<ExceededDatabaseQuotaRecords> records;
     return records;
@@ -984,7 +984,7 @@ void WebPageProxy::recordNavigationSnapshot(WebBackForwardListItem& item)
         return;
 
 #if PLATFORM(COCOA)
-    ViewSnapshotStore::shared().recordSnapshot(*this, item);
+    ViewSnapshotStore::singleton().recordSnapshot(*this, item);
 #else
     UNUSED_PARAM(item);
 #endif
@@ -1753,7 +1753,7 @@ void WebPageProxy::findPlugin(const String& mimeType, uint32_t processType, cons
         return;
     }
 
-    pluginProcessToken = PluginProcessManager::shared().pluginProcessToken(plugin, static_cast<PluginProcessType>(processType), pluginProcessSandboxPolicy);
+    pluginProcessToken = PluginProcessManager::singleton().pluginProcessToken(plugin, static_cast<PluginProcessType>(processType), pluginProcessSandboxPolicy);
 }
 
 #endif // ENABLE(NETSCAPE_PLUGIN_API)
@@ -4761,7 +4761,7 @@ void WebPageProxy::didReceiveAuthenticationChallengeProxy(uint64_t frameID, Pass
 
 void WebPageProxy::exceededDatabaseQuota(uint64_t frameID, const String& originIdentifier, const String& databaseName, const String& displayName, uint64_t currentQuota, uint64_t currentOriginUsage, uint64_t currentDatabaseUsage, uint64_t expectedUsage, PassRefPtr<Messages::WebPageProxy::ExceededDatabaseQuota::DelayedReply> reply)
 {
-    ExceededDatabaseQuotaRecords& records = ExceededDatabaseQuotaRecords::shared();
+    ExceededDatabaseQuotaRecords& records = ExceededDatabaseQuotaRecords::singleton();
     std::unique_ptr<ExceededDatabaseQuotaRecords::Record> newRecord = records.createRecord(frameID,
         originIdentifier, databaseName, displayName, currentQuota, currentOriginUsage,
         currentDatabaseUsage, expectedUsage, reply);
index 38c19e1ff18495feaf109cefcc884c02c6b0d8a1..9097cb52b20bb6649fa017e33a39d0dfe076084c 100644 (file)
@@ -32,7 +32,7 @@
 
 namespace WebKit {
 
-WebPasteboardProxy& WebPasteboardProxy::shared()
+WebPasteboardProxy& WebPasteboardProxy::singleton()
 {
     static std::once_flag onceFlag;
     static LazyNeverDestroyed<WebPasteboardProxy> proxy;
index 2e4673880031d6ed6ca93c3ef6d6700db58914d4..494aac9f8096874cc055fba8437de52667fa230f 100644 (file)
@@ -46,7 +46,7 @@ class WebPasteboardProxy : public IPC::MessageReceiver {
     WTF_MAKE_NONCOPYABLE(WebPasteboardProxy);
     friend class LazyNeverDestroyed<WebPasteboardProxy>;
 public:
-    static WebPasteboardProxy& shared();
+    static WebPasteboardProxy& singleton();
 
     void addWebProcessProxy(WebProcessProxy&);
 
index 86a6e2054c0ac83020ae0e0eb6c6cc7e3e931057..ba4402ae57f596512f8190b08e72f3930bdafd7b 100644 (file)
@@ -675,10 +675,11 @@ WebProcessProxy& WebProcessPool::createNewWebProcess()
     parameters.memoryCacheDisabled = m_memoryCacheDisabled;
 
 #if ENABLE(SERVICE_CONTROLS)
-    parameters.hasImageServices = ServicesController::shared().hasImageServices();
-    parameters.hasSelectionServices = ServicesController::shared().hasSelectionServices();
-    parameters.hasRichContentServices = ServicesController::shared().hasRichContentServices();
-    ServicesController::shared().refreshExistingServices();
+    auto& serviceController = ServicesController::singleton();
+    parameters.hasImageServices = serviceController.hasImageServices();
+    parameters.hasSelectionServices = serviceController.hasSelectionServices();
+    parameters.hasRichContentServices = serviceController.hasRichContentServices();
+    serviceController.refreshExistingServices();
 #endif
 
     // Add any platform specific parameters
@@ -715,7 +716,7 @@ WebProcessProxy& WebProcessPool::createNewWebProcess()
 
 #if ENABLE(REMOTE_INSPECTOR)
     // Initialize remote inspector connection now that we have a sub-process that is hosting one of our web views.
-    Inspector::RemoteInspector::shared(); 
+    Inspector::RemoteInspector::singleton(); 
 #endif
 
     return process;
@@ -1105,7 +1106,7 @@ void WebProcessPool::startMemorySampler(const double interval)
     
     // For UIProcess
 #if ENABLE(MEMORY_SAMPLER)
-    WebMemorySampler::shared()->start(interval);
+    WebMemorySampler::singleton()->start(interval);
 #endif
     
     // For WebProcess
@@ -1124,7 +1125,7 @@ void WebProcessPool::stopMemorySampler()
     
     // For UIProcess
 #if ENABLE(MEMORY_SAMPLER)
-    WebMemorySampler::shared()->stop();
+    WebMemorySampler::singleton()->stop();
 #endif
 
     sendToAllProcesses(Messages::WebProcess::StopMemorySampler());
index c257a3882ca5dbce256b89c9864fe4be0ea522bb..dd0064804e8074f2367957564a8682a114185fd6 100644 (file)
@@ -99,7 +99,7 @@ WebProcessProxy::WebProcessProxy(WebProcessPool& processPool)
     , m_numberOfTimesSuddenTerminationWasDisabled(0)
     , m_throttler(std::make_unique<ProcessThrottler>(this))
 {
-    WebPasteboardProxy::shared().addWebProcessProxy(*this);
+    WebPasteboardProxy::singleton().addWebProcessProxy(*this);
 
     connect();
 }
@@ -126,7 +126,7 @@ void WebProcessProxy::connectionWillOpen(IPC::Connection& connection)
     ASSERT(this->connection() == &connection);
 
 #if ENABLE(SEC_ITEM_SHIM)
-    SecItemShimProxy::shared().initializeConnection(connection);
+    SecItemShimProxy::singleton().initializeConnection(connection);
 #endif
 
     for (auto& page : m_pageMap.values())
@@ -384,7 +384,7 @@ void WebProcessProxy::getPlugins(bool refresh, Vector<PluginInfo>& plugins, Vect
 #if ENABLE(NETSCAPE_PLUGIN_API)
 void WebProcessProxy::getPluginProcessConnection(uint64_t pluginProcessToken, PassRefPtr<Messages::WebProcessProxy::GetPluginProcessConnection::DelayedReply> reply)
 {
-    PluginProcessManager::shared().getPluginProcessConnection(pluginProcessToken, reply);
+    PluginProcessManager::singleton().getPluginProcessConnection(pluginProcessToken, reply);
 }
 #endif
 
index af459a3b03e5f5b81aeccc04b04e8ece7b28761a..8a85434ea81218450819b75a38ad6f885be6c347 100644 (file)
@@ -33,7 +33,7 @@
 
 namespace WebKit {
 
-WebTextChecker* WebTextChecker::shared()
+WebTextChecker* WebTextChecker::singleton()
 {
     static WebTextChecker* textChecker = adoptRef(new WebTextChecker).leakRef();
     return textChecker;
index 359e81ee53553235e5a52b448cd9f0e016c217ae..7c945c72627a2ffbbfa027bd140a9ac0c25414a6 100644 (file)
@@ -37,7 +37,7 @@ class WebPageProxy;
 
 class WebTextChecker : public API::ObjectImpl<API::Object::Type::TextChecker> {
 public:
-    static WebTextChecker* shared();
+    static WebTextChecker* singleton();
 
     void setClient(const WKTextCheckerClientBase*);
     WebTextCheckerClient& client() { return m_client; }
index 0f1e49b76f67bfe41c1de04c1cae398f9c2b8821..3b4e4a9a197f9b799b0a1455b299cf4efef91d50 100644 (file)
 
 #include "ewk_main_private.h"
 
-#define CRITICAL(...) EINA_LOG_DOM_CRIT(EwkMain::shared().logDomainId(), __VA_ARGS__)
-#define ERR(...) EINA_LOG_DOM_ERR(EwkMain::shared().logDomainId(), __VA_ARGS__)
-#define WARN(...) EINA_LOG_DOM_WARN(EwkMain::shared().logDomainId(), __VA_ARGS__)
-#define INFO(...) EINA_LOG_DOM_INFO(EwkMain::shared().logDomainId(), __VA_ARGS__)
-#define DBG(...) EINA_LOG_DOM_DBG(EwkMain::shared().logDomainId(), __VA_ARGS__)
+#define CRITICAL(...) EINA_LOG_DOM_CRIT(EwkMain::singleton().logDomainId(), __VA_ARGS__)
+#define ERR(...) EINA_LOG_DOM_ERR(EwkMain::singleton().logDomainId(), __VA_ARGS__)
+#define WARN(...) EINA_LOG_DOM_WARN(EwkMain::singleton().logDomainId(), __VA_ARGS__)
+#define INFO(...) EINA_LOG_DOM_INFO(EwkMain::singleton().logDomainId(), __VA_ARGS__)
+#define DBG(...) EINA_LOG_DOM_DBG(EwkMain::singleton().logDomainId(), __VA_ARGS__)
 
 #endif // EwkDebug_h
index b37d09a77ea0cefc206ede9b78be410ba6a8994d..17bd253df97031c4b91404b33eb2586ccb318f39 100644 (file)
@@ -72,7 +72,7 @@ void TextChecker::setContinuousSpellCheckingEnabled(bool isContinuousSpellChecki
     textCheckerState.isContinuousSpellCheckingEnabled = isContinuousSpellCheckingEnabled;
 
     // Notify the client about the setting change.
-    WebTextChecker::shared()->client().setContinuousSpellCheckingEnabled(isContinuousSpellCheckingEnabled);
+    WebTextChecker::singleton()->client().setContinuousSpellCheckingEnabled(isContinuousSpellCheckingEnabled);
 #else
     UNUSED_PARAM(isContinuousSpellCheckingEnabled);
 #endif
@@ -103,7 +103,7 @@ void TextChecker::grammarCheckingEnabledStateChanged(bool)
 int64_t TextChecker::uniqueSpellDocumentTag(WebPageProxy* page)
 {
 #if ENABLE(SPELLCHECK)
-    return WebTextChecker::shared()->client().uniqueSpellDocumentTag(page);
+    return WebTextChecker::singleton()->client().uniqueSpellDocumentTag(page);
 #else
     UNUSED_PARAM(page);
     return 0;
@@ -113,7 +113,7 @@ int64_t TextChecker::uniqueSpellDocumentTag(WebPageProxy* page)
 void TextChecker::closeSpellDocumentWithTag(int64_t tag)
 {
 #if ENABLE(SPELLCHECK)
-    WebTextChecker::shared()->client().closeSpellDocumentWithTag(tag);
+    WebTextChecker::singleton()->client().closeSpellDocumentWithTag(tag);
 #else
     UNUSED_PARAM(tag);
 #endif
@@ -194,7 +194,7 @@ Vector<TextCheckingResult> TextChecker::checkTextOfParagraph(int64_t spellDocume
 void TextChecker::checkSpellingOfString(int64_t spellDocumentTag, StringView text, int32_t& misspellingLocation, int32_t& misspellingLength)
 {
 #if ENABLE(SPELLCHECK)
-    WebTextChecker::shared()->client().checkSpellingOfString(spellDocumentTag, text.toStringWithoutCopying(), misspellingLocation, misspellingLength);
+    WebTextChecker::singleton()->client().checkSpellingOfString(spellDocumentTag, text.toStringWithoutCopying(), misspellingLocation, misspellingLength);
 #else
     UNUSED_PARAM(spellDocumentTag);
     UNUSED_PARAM(text);
@@ -233,7 +233,7 @@ void TextChecker::updateSpellingUIWithGrammarString(int64_t, const String&, cons
 void TextChecker::getGuessesForWord(int64_t spellDocumentTag, const String& word, const String& , Vector<String>& guesses)
 {
 #if ENABLE(SPELLCHECK)
-    WebTextChecker::shared()->client().guessesForWord(spellDocumentTag, word, guesses);
+    WebTextChecker::singleton()->client().guessesForWord(spellDocumentTag, word, guesses);
 #else
     UNUSED_PARAM(spellDocumentTag);
     UNUSED_PARAM(word);
@@ -244,7 +244,7 @@ void TextChecker::getGuessesForWord(int64_t spellDocumentTag, const String& word
 void TextChecker::learnWord(int64_t spellDocumentTag, const String& word)
 {
 #if ENABLE(SPELLCHECK)
-    WebTextChecker::shared()->client().learnWord(spellDocumentTag, word);
+    WebTextChecker::singleton()->client().learnWord(spellDocumentTag, word);
 #else
     UNUSED_PARAM(spellDocumentTag);
     UNUSED_PARAM(word);
@@ -254,7 +254,7 @@ void TextChecker::learnWord(int64_t spellDocumentTag, const String& word)
 void TextChecker::ignoreWord(int64_t spellDocumentTag, const String& word)
 {
 #if ENABLE(SPELLCHECK)
-    WebTextChecker::shared()->client().ignoreWord(spellDocumentTag, word);
+    WebTextChecker::singleton()->client().ignoreWord(spellDocumentTag, word);
 #else
     UNUSED_PARAM(spellDocumentTag);
     UNUSED_PARAM(word);
index b654726c15650ba7cae9c75ab1f59f0a39830434..fffb2fefc8c59f49f040fa6690e5ad2e0c923c00 100644 (file)
@@ -70,7 +70,7 @@ static void initializeInspectorServer()
         } else
             LOG_ERROR("Couldn't parse %s, wrong format? Using 127.0.0.1:2999 instead.", serverAddress.utf8().data());
 
-        if (!WebInspectorServer::shared().listen(bindAddress, port))
+        if (!WebInspectorServer::singleton().listen(bindAddress, port))
             LOG_ERROR("Couldn't start listening on: IP address=%s, port=%d.", bindAddress.utf8().data(), port);
 
         return;
index de194ad89e24df4b126799d1b629a5905c9f287a..4ff824469de0a7b70614841e43afbcb4f94662ea 100644 (file)
@@ -43,7 +43,7 @@ const TextCheckerState& TextChecker::state()
     if (didInitializeState)
         return textCheckerState;
 
-    WebTextCheckerClient& client = WebTextChecker::shared()->client();
+    WebTextCheckerClient& client = WebTextChecker::singleton()->client();
     textCheckerState.isContinuousSpellCheckingEnabled = client.continuousSpellCheckingEnabled();
     textCheckerState.isGrammarCheckingEnabled =  client.grammarCheckingEnabled();
 
@@ -54,7 +54,7 @@ const TextCheckerState& TextChecker::state()
   
 bool TextChecker::isContinuousSpellCheckingAllowed()
 {
-    return WebTextChecker::shared()->client().continuousSpellCheckingAllowed();
+    return WebTextChecker::singleton()->client().continuousSpellCheckingAllowed();
 }
 
 void TextChecker::setContinuousSpellCheckingEnabled(bool isContinuousSpellCheckingEnabled)
@@ -62,7 +62,7 @@ void TextChecker::setContinuousSpellCheckingEnabled(bool isContinuousSpellChecki
     if (state().isContinuousSpellCheckingEnabled == isContinuousSpellCheckingEnabled)
         return;
     textCheckerState.isContinuousSpellCheckingEnabled = isContinuousSpellCheckingEnabled;
-    WebTextChecker::shared()->client().setContinuousSpellCheckingEnabled(isContinuousSpellCheckingEnabled);
+    WebTextChecker::singleton()->client().setContinuousSpellCheckingEnabled(isContinuousSpellCheckingEnabled);
 }
 
 void TextChecker::setGrammarCheckingEnabled(bool isGrammarCheckingEnabled)
@@ -70,7 +70,7 @@ void TextChecker::setGrammarCheckingEnabled(bool isGrammarCheckingEnabled)
     if (state().isGrammarCheckingEnabled == isGrammarCheckingEnabled)
         return;
     textCheckerState.isGrammarCheckingEnabled = isGrammarCheckingEnabled;
-    WebTextChecker::shared()->client().setGrammarCheckingEnabled(isGrammarCheckingEnabled);
+    WebTextChecker::singleton()->client().setGrammarCheckingEnabled(isGrammarCheckingEnabled);
 }
 
 void TextChecker::continuousSpellCheckingEnabledStateChanged(bool enabled)
@@ -85,57 +85,57 @@ void TextChecker::grammarCheckingEnabledStateChanged(bool enabled)
 
 int64_t TextChecker::uniqueSpellDocumentTag(WebPageProxy* page)
 {
-    return WebTextChecker::shared()->client().uniqueSpellDocumentTag(page);
+    return WebTextChecker::singleton()->client().uniqueSpellDocumentTag(page);
 }
 
 void TextChecker::closeSpellDocumentWithTag(int64_t tag)
 {
-    WebTextChecker::shared()->client().closeSpellDocumentWithTag(tag);
+    WebTextChecker::singleton()->client().closeSpellDocumentWithTag(tag);
 }
 
 void TextChecker::checkSpellingOfString(int64_t spellDocumentTag, StringView text, int32_t& misspellingLocation, int32_t& misspellingLength)
 {
-    WebTextChecker::shared()->client().checkSpellingOfString(spellDocumentTag, text.toStringWithoutCopying(), misspellingLocation, misspellingLength);
+    WebTextChecker::singleton()->client().checkSpellingOfString(spellDocumentTag, text.toStringWithoutCopying(), misspellingLocation, misspellingLength);
 }
 
 void TextChecker::checkGrammarOfString(int64_t spellDocumentTag, StringView text, Vector<WebCore::GrammarDetail>& grammarDetails, int32_t& badGrammarLocation, int32_t& badGrammarLength)
 {
-    WebTextChecker::shared()->client().checkGrammarOfString(spellDocumentTag, text.toStringWithoutCopying(), grammarDetails, badGrammarLocation, badGrammarLength);
+    WebTextChecker::singleton()->client().checkGrammarOfString(spellDocumentTag, text.toStringWithoutCopying(), grammarDetails, badGrammarLocation, badGrammarLength);
 }
 
 bool TextChecker::spellingUIIsShowing()
 {
-    return WebTextChecker::shared()->client().spellingUIIsShowing();
+    return WebTextChecker::singleton()->client().spellingUIIsShowing();
 }
 
 void TextChecker::toggleSpellingUIIsShowing()
 {
-    WebTextChecker::shared()->client().toggleSpellingUIIsShowing();
+    WebTextChecker::singleton()->client().toggleSpellingUIIsShowing();
 }
 
 void TextChecker::updateSpellingUIWithMisspelledWord(int64_t spellDocumentTag, const String& misspelledWord)
 {
-    WebTextChecker::shared()->client().updateSpellingUIWithMisspelledWord(spellDocumentTag, misspelledWord);
+    WebTextChecker::singleton()->client().updateSpellingUIWithMisspelledWord(spellDocumentTag, misspelledWord);
 }
 
 void TextChecker::updateSpellingUIWithGrammarString(int64_t spellDocumentTag, const String& badGrammarPhrase, const GrammarDetail& grammarDetail)
 {
-    WebTextChecker::shared()->client().updateSpellingUIWithGrammarString(spellDocumentTag, badGrammarPhrase, grammarDetail);
+    WebTextChecker::singleton()->client().updateSpellingUIWithGrammarString(spellDocumentTag, badGrammarPhrase, grammarDetail);
 }
 
 void TextChecker::getGuessesForWord(int64_t spellDocumentTag, const String& word, const String& /* context */, Vector<String>& guesses)
 {
-    WebTextChecker::shared()->client().guessesForWord(spellDocumentTag, word, guesses);
+    WebTextChecker::singleton()->client().guessesForWord(spellDocumentTag, word, guesses);
 }
 
 void TextChecker::learnWord(int64_t spellDocumentTag, const String& word)
 {
-    WebTextChecker::shared()->client().learnWord(spellDocumentTag, word);
+    WebTextChecker::singleton()->client().learnWord(spellDocumentTag, word);
 }
 
 void TextChecker::ignoreWord(int64_t spellDocumentTag, const String& word)
 {
-    WebTextChecker::shared()->client().ignoreWord(spellDocumentTag, word);
+    WebTextChecker::singleton()->client().ignoreWord(spellDocumentTag, word);
 }
 
 void TextChecker::requestCheckingOfString(PassRefPtr<TextCheckerCompletion>)
index 5ca5ee8f6983f1c61c69dab16e01af8debd1910b..0f9e0c7ff36012f7bb1bc38eb23480a760179896 100644 (file)
@@ -74,7 +74,7 @@ static void initInspectorServer()
         } else
             LOG_ERROR("Couldn't parse %s, wrong format? Use 127.0.0.1:2999 instead.", serverAddress.utf8().data());
 
-        if (!WebInspectorServer::shared().listen(bindAddress, port))
+        if (!WebInspectorServer::singleton().listen(bindAddress, port))
             LOG_ERROR("Couldn't start listening on: IP address=%s, port=%d.", bindAddress.utf8().data(), port);
         return;
     }
index 7910faa59878d5b2d88013a7572167b5113793f3..7c34c3178405c6964575a2c8bdce2a5eb0c152cb 100644 (file)
@@ -35,7 +35,7 @@ namespace WebKit {
 class WebMemoryPressureHandler {
     friend class NeverDestroyed<WebMemoryPressureHandler>;
 public:
-    static WebMemoryPressureHandler& shared();
+    static WebMemoryPressureHandler& singleton();
 
 private:
     WebMemoryPressureHandler();
index bdd2363e0b629464ba9ab489807ce8baf615a980..1bb5d3a154da55930b93a486be0e88fc5169b6bc 100644 (file)
@@ -33,7 +33,7 @@
 
 namespace WebKit {
 
-WebMemoryPressureHandler& WebMemoryPressureHandler::shared()
+WebMemoryPressureHandler& WebMemoryPressureHandler::singleton()
 {
     static NeverDestroyed<WebMemoryPressureHandler> memoryPressureHandler;
     return memoryPressureHandler;
@@ -48,7 +48,7 @@ WebMemoryPressureHandler::WebMemoryPressureHandler()
     dispatch_source_t source = dispatch_source_create(DISPATCH_SOURCE_TYPE_MEMORYSTATUS, 0, DISPATCH_MEMORYSTATUS_PRESSURE_WARN, dispatch_get_main_queue());
     dispatch_set_context(source, this);
     dispatch_source_set_event_handler(source, ^{
-        ViewSnapshotStore::shared().discardSnapshotImages();
+        ViewSnapshotStore::singleton().discardSnapshotImages();
     });
     dispatch_resume(source);
 }
index 1c88aa534425fa1f8da4a26fd61397d48fc81ca5..dc096990cc12b68d7d8e248bd63885572d0cc16f 100644 (file)
@@ -255,7 +255,7 @@ bool PageClientImpl::isViewInWindow()
 
 bool PageClientImpl::isVisuallyIdle()
 {
-    return WindowServerConnection::shared().applicationWindowModificationsHaveStopped() || !isViewVisible();
+    return WindowServerConnection::singleton().applicationWindowModificationsHaveStopped() || !isViewVisible();
 }
 
 LayerHostingMode PageClientImpl::viewLayerHostingMode()
index f3f844f99393219d4f61bf73e035adca4ef53f8b..42039121503c23fc5c3cb76b2d6307113d54524c 100644 (file)
@@ -37,7 +37,7 @@
 
 namespace WebKit {
 
-SecItemShimProxy& SecItemShimProxy::shared()
+SecItemShimProxy& SecItemShimProxy::singleton()
 {
     static SecItemShimProxy* proxy;
     static dispatch_once_t once;
index 3e496240d1dc755161a75ef14572d6630e633f2f..aba3d1632d3a1220ba306b276acd0f9f94485a7a 100644 (file)
@@ -37,7 +37,7 @@ class SecItemRequestData;
 class SecItemShimProxy : public IPC::Connection::WorkQueueMessageReceiver {
 WTF_MAKE_NONCOPYABLE(SecItemShimProxy);
 public:
-    static SecItemShimProxy& shared();
+    static SecItemShimProxy& singleton();
 
     void initializeConnection(IPC::Connection&);
 
index 8ec755ddeccb7b465a13257847a60ec2bc3755a2..3df7aa961ef445f45886e33a9a01610a25bd7141 100644 (file)
@@ -38,7 +38,7 @@ class ServicesController {
     WTF_MAKE_NONCOPYABLE(ServicesController);
     friend class NeverDestroyed<ServicesController>;
 public:
-    static ServicesController& shared();
+    static ServicesController& singleton();
 
     bool hasImageServices() const { return m_hasImageServices; }
     bool hasSelectionServices() const { return m_hasSelectionServices; }
index e82c72d91c904597be46a8801e3b1bdba46ddc17..2dd35c50fd9648f17a710835ed89cc9a5a2fc90c 100644 (file)
@@ -37,7 +37,7 @@
 
 namespace WebKit {
 
-ServicesController& ServicesController::shared()
+ServicesController& ServicesController::singleton()
 {
     static NeverDestroyed<ServicesController> sharedController;
     return sharedController;
index 58093fb4b36463c4060200bd423df4e0e205829c..3dc91f293d5ad311af5d15ac904a310c190a1de8 100644 (file)
@@ -115,7 +115,7 @@ public:
     ViewSnapshotStore();
     ~ViewSnapshotStore();
 
-    static ViewSnapshotStore& shared();
+    static ViewSnapshotStore& singleton();
 
     void recordSnapshot(WebPageProxy&, WebBackForwardListItem&);
 
index 1a8ae0719d2969cb895a757b33d76cca7729e68b..35d1f3548b1e9c6e716ce589a3bc3993e1d63091 100644 (file)
@@ -56,7 +56,7 @@ ViewSnapshotStore::~ViewSnapshotStore()
     discardSnapshotImages();
 }
 
-ViewSnapshotStore& ViewSnapshotStore::shared()
+ViewSnapshotStore& ViewSnapshotStore::singleton()
 {
     static ViewSnapshotStore& store = *new ViewSnapshotStore;
     return store;
@@ -156,7 +156,7 @@ ViewSnapshot::ViewSnapshot(uint32_t slotID, IntSize size, size_t imageSizeInByte
     , m_size(size)
 {
     if (hasImage())
-        ViewSnapshotStore::shared().didAddImageToSnapshot(*this);
+        ViewSnapshotStore::singleton().didAddImageToSnapshot(*this);
 }
 
 ViewSnapshot::~ViewSnapshot()
@@ -178,7 +178,7 @@ void ViewSnapshot::clearImage()
     if (!hasImage())
         return;
 
-    ViewSnapshotStore::shared().willRemoveImageFromSnapshot(*this);
+    ViewSnapshotStore::singleton().willRemoveImageFromSnapshot(*this);
 
 #if USE_IOSURFACE_VIEW_SNAPSHOTS
     m_surface = nullptr;
index dc6495a04fb8f7bfe242f6e203461d82ed3ad415..ddba8a1c6a5955dd096977a849d9ffd5203bdf2f 100644 (file)
@@ -411,7 +411,7 @@ void WebContextMenuProxyMac::setupServicesMenu(const ContextMenuContextData& con
     // If there is no services menu, then the existing services on the system have changed, so refresh that list of services.
     // If <rdar://problem/17954709> is resolved then we can more accurately keep the list up to date without this call.
     if (!m_servicesMenu)
-        ServicesController::shared().refreshExistingServices();
+        ServicesController::singleton().refreshExistingServices();
 }
 
 void WebContextMenuProxyMac::clearServicesMenu()
index 7f02865b87b9f823707728833ec622d3597e221b..838a34fb5c2d44eee5464e57edc70e10adbd3b20 100644 (file)
@@ -30,7 +30,7 @@ namespace WebKit {
 
 class WindowServerConnection {
 public:
-    static WindowServerConnection& shared();
+    static WindowServerConnection& singleton();
 
     bool applicationWindowModificationsHaveStopped() const { return m_applicationWindowModificationsHaveStopped; }
 
index 4a7efe6e54d266776aca820ae863fdf599a2c839..819535c2ac129c8d521218c9755c84b61d44f285 100644 (file)
@@ -43,12 +43,12 @@ void WindowServerConnection::applicationWindowModificationsStopped(bool stopped)
 
 void WindowServerConnection::applicationWindowModificationsStarted(uint32_t, void*, uint32_t, void*, uint32_t)
 {
-    WindowServerConnection::shared().applicationWindowModificationsStopped(false);
+    WindowServerConnection::singleton().applicationWindowModificationsStopped(false);
 }
 
 void WindowServerConnection::applicationWindowModificationsStopped(uint32_t, void*, uint32_t, void*, uint32_t)
 {
-    WindowServerConnection::shared().applicationWindowModificationsStopped(true);
+    WindowServerConnection::singleton().applicationWindowModificationsStopped(true);
 }
 
 void WindowServerConnection::windowServerConnectionStateChanged()
@@ -59,7 +59,7 @@ void WindowServerConnection::windowServerConnectionStateChanged()
 
 #endif
 
-WindowServerConnection& WindowServerConnection::shared()
+WindowServerConnection& WindowServerConnection::singleton()
 {
     static WindowServerConnection& windowServerConnection = *new WindowServerConnection;
     return windowServerConnection;
index 41163d91df5b0a60f25828280c643f04c210e626..f690eb73e8a7df4766739b52f607b97d668f61ba 100644 (file)
@@ -55,7 +55,7 @@ static uint64_t generateServerConnectionIdentifier()
 PassRefPtr<WebIDBServerConnection> WebIDBServerConnection::create(const String& databaseName, const SecurityOrigin& openingOrigin, const SecurityOrigin& mainFrameOrigin)
 {
     RefPtr<WebIDBServerConnection> result = adoptRef(new WebIDBServerConnection(databaseName, openingOrigin, mainFrameOrigin));
-    WebProcess::shared().webToDatabaseProcessConnection()->registerWebIDBServerConnection(*result);
+    WebProcess::singleton().webToDatabaseProcessConnection()->registerWebIDBServerConnection(*result);
     return result.release();
 }
 
@@ -71,7 +71,7 @@ WebIDBServerConnection::WebIDBServerConnection(const String& databaseName, const
 
 WebIDBServerConnection::~WebIDBServerConnection()
 {
-    WebProcess::shared().webToDatabaseProcessConnection()->removeWebIDBServerConnection(*this);
+    WebProcess::singleton().webToDatabaseProcessConnection()->removeWebIDBServerConnection(*this);
 
     for (const auto& it : m_serverRequests)
         it.value->requestAborted();
@@ -705,7 +705,7 @@ void WebIDBServerConnection::cursorIterate(IDBCursorBackend&, const CursorIterat
 
 IPC::Connection* WebIDBServerConnection::messageSenderConnection()
 {
-    return WebProcess::shared().webToDatabaseProcessConnection()->connection();
+    return WebProcess::singleton().webToDatabaseProcessConnection()->connection();
 }
 
 } // namespace WebKit
index 4e92390516d9f8faafda06cb0d83c269b3eead99..42a15762d00473c3d7fa8ecfc847869b8afed291 100644 (file)
@@ -63,7 +63,7 @@ void WebToDatabaseProcessConnection::didReceiveMessage(IPC::Connection& connecti
 
 void WebToDatabaseProcessConnection::didClose(IPC::Connection& connection)
 {
-    WebProcess::shared().webToDatabaseProcessConnectionClosed(this);
+    WebProcess::singleton().webToDatabaseProcessConnectionClosed(this);
 }
 
 void WebToDatabaseProcessConnection::didReceiveInvalidMessage(IPC::Connection&, IPC::StringReference messageReceiverName, IPC::StringReference messageName)
index 45335ed8876a61029a0632a54f516a54cb6b8534..dace573f16a35384635aca75993872bc21cfd1d1 100644 (file)
@@ -40,7 +40,7 @@ namespace WebKit {
 
 void BlobRegistryProxy::registerFileBlobURL(const WebCore::URL& url, PassRefPtr<BlobDataFileReference> file, const String& contentType)
 {
-    ASSERT(WebProcess::shared().usesNetworkProcess());
+    ASSERT(WebProcess::singleton().usesNetworkProcess());
 
     SandboxExtension::Handle extensionHandle;
 
@@ -48,43 +48,43 @@ void BlobRegistryProxy::registerFileBlobURL(const WebCore::URL& url, PassRefPtr<
     if (!file->path().isEmpty())
         SandboxExtension::createHandle(file->path(), SandboxExtension::ReadOnly, extensionHandle);
 
-    WebProcess::shared().networkConnection()->connection()->send(Messages::NetworkConnectionToWebProcess::RegisterFileBlobURL(url, file->path(), extensionHandle, contentType), 0);
+    WebProcess::singleton().networkConnection()->connection()->send(Messages::NetworkConnectionToWebProcess::RegisterFileBlobURL(url, file->path(), extensionHandle, contentType), 0);
 }
 
 void BlobRegistryProxy::registerBlobURL(const URL& url, Vector<BlobPart> blobParts, const String& contentType)
 {
-    ASSERT(WebProcess::shared().usesNetworkProcess());
+    ASSERT(WebProcess::singleton().usesNetworkProcess());
 
-    WebProcess::shared().networkConnection()->connection()->send(Messages::NetworkConnectionToWebProcess::RegisterBlobURL(url, blobParts, contentType), 0);
+    WebProcess::singleton().networkConnection()->connection()->send(Messages::NetworkConnectionToWebProcess::RegisterBlobURL(url, blobParts, contentType), 0);
 }
 
 void BlobRegistryProxy::registerBlobURL(const URL& url, const URL& srcURL)
 {
-    ASSERT(WebProcess::shared().usesNetworkProcess());
+    ASSERT(WebProcess::singleton().usesNetworkProcess());
 
-    WebProcess::shared().networkConnection()->connection()->send(Messages::NetworkConnectionToWebProcess::RegisterBlobURLFromURL(url, srcURL), 0);
+    WebProcess::singleton().networkConnection()->connection()->send(Messages::NetworkConnectionToWebProcess::RegisterBlobURLFromURL(url, srcURL), 0);
 }
 
 void BlobRegistryProxy::unregisterBlobURL(const URL& url)
 {
-    ASSERT(WebProcess::shared().usesNetworkProcess());
+    ASSERT(WebProcess::singleton().usesNetworkProcess());
 
-    WebProcess::shared().networkConnection()->connection()->send(Messages::NetworkConnectionToWebProcess::UnregisterBlobURL(url), 0);
+    WebProcess::singleton().networkConnection()->connection()->send(Messages::NetworkConnectionToWebProcess::UnregisterBlobURL(url), 0);
 }
 
 void BlobRegistryProxy::registerBlobURLForSlice(const URL& url, const URL& srcURL, long long start, long long end)
 {
-    ASSERT(WebProcess::shared().usesNetworkProcess());
+    ASSERT(WebProcess::singleton().usesNetworkProcess());
 
-    WebProcess::shared().networkConnection()->connection()->send(Messages::NetworkConnectionToWebProcess::RegisterBlobURLForSlice(url, srcURL, start, end), 0);
+    WebProcess::singleton().networkConnection()->connection()->send(Messages::NetworkConnectionToWebProcess::RegisterBlobURLForSlice(url, srcURL, start, end), 0);
 }
 
 unsigned long long BlobRegistryProxy::blobSize(const URL& url)
 {
-    ASSERT(WebProcess::shared().usesNetworkProcess());
+    ASSERT(WebProcess::singleton().usesNetworkProcess());
 
     uint64_t resultSize;
-    if (!WebProcess::shared().networkConnection()->connection()->sendSync(Messages::NetworkConnectionToWebProcess::BlobSize(url), Messages::NetworkConnectionToWebProcess::BlobSize::Reply(resultSize), 0))
+    if (!WebProcess::singleton().networkConnection()->connection()->sendSync(Messages::NetworkConnectionToWebProcess::BlobSize(url), Messages::NetworkConnectionToWebProcess::BlobSize::Reply(resultSize), 0))
         return 0;
     return resultSize;
 }
index db2827704478b24e0ae740ff544ecb274660b0d4..31eeed20136311be67aff311eb78c358d32ccdf3 100644 (file)
@@ -48,7 +48,7 @@ using namespace WebKit;
 
 + (instancetype)lookUpFrameFromHandle:(_WKFrameHandle *)handle
 {
-    WebFrame* webFrame = WebProcess::shared().webFrame(handle._frameID);
+    WebFrame* webFrame = WebProcess::singleton().webFrame(handle._frameID);
     if (!webFrame)
         return nil;
 
index 9d88fd0b2f472c6b73e1011c3a5a16bdab6418ea..0ae913b2ca1b3230b8207c8d4981b44e835d5dac 100644 (file)
@@ -163,7 +163,7 @@ static void didInitiateLoadForResource(WKBundlePageRef page, WKBundleFrameRef fr
     message.set(String::fromUTF8("Frame"), toImpl(frame));
     message.set(String::fromUTF8("Identifier"), API::UInt64::create(identifier));
     message.set(String::fromUTF8("Request"), toImpl(request));
-    WebProcess::shared().injectedBundle()->postMessage(String::fromUTF8("WebPage.DidInitiateLoadForResource"), API::Dictionary::create(WTF::move(message)).get());
+    WebProcess::singleton().injectedBundle()->postMessage(String::fromUTF8("WebPage.DidInitiateLoadForResource"), API::Dictionary::create(WTF::move(message)).get());
 }
 
 static WKURLRequestRef willSendRequestForFrame(WKBundlePageRef page, WKBundleFrameRef, uint64_t identifier, WKURLRequestRef wkRequest, WKURLResponseRef wkRedirectResponse, const void* clientInfo)
@@ -188,7 +188,7 @@ static WKURLRequestRef willSendRequestForFrame(WKBundlePageRef page, WKBundleFra
     message.set(String::fromUTF8("Request"), newRequest.get());
     if (!redirectResourceResponse.isNull())
         message.set(String::fromUTF8("RedirectResponse"), toImpl(wkRedirectResponse));
-    WebProcess::shared().injectedBundle()->postMessage(String::fromUTF8("WebPage.DidSendRequestForResource"), API::Dictionary::create(WTF::move(message)).get());
+    WebProcess::singleton().injectedBundle()->postMessage(String::fromUTF8("WebPage.DidSendRequestForResource"), API::Dictionary::create(WTF::move(message)).get());
 
     return toAPI(newRequest.release().leakRef());
 }
@@ -199,7 +199,7 @@ static void didReceiveResponseForResource(WKBundlePageRef page, WKBundleFrameRef
     message.set(String::fromUTF8("Page"), toImpl(page));
     message.set(String::fromUTF8("Identifier"), API::UInt64::create(identifier));
     message.set(String::fromUTF8("Response"), toImpl(response));
-    WebProcess::shared().injectedBundle()->postMessage(String::fromUTF8("WebPage.DidReceiveResponseForResource"), API::Dictionary::create(WTF::move(message)).get());
+    WebProcess::singleton().injectedBundle()->postMessage(String::fromUTF8("WebPage.DidReceiveResponseForResource"), API::Dictionary::create(WTF::move(message)).get());
 }
 
 static void didReceiveContentLengthForResource(WKBundlePageRef page, WKBundleFrameRef, uint64_t identifier, uint64_t length, const void*)
@@ -208,7 +208,7 @@ static void didReceiveContentLengthForResource(WKBundlePageRef page, WKBundleFra
     message.set(String::fromUTF8("Page"), toImpl(page));
     message.set(String::fromUTF8("Identifier"), API::UInt64::create(identifier));
     message.set(String::fromUTF8("ContentLength"), API::UInt64::create(length));
-    WebProcess::shared().injectedBundle()->postMessage(String::fromUTF8("WebPage.DidReceiveContentLengthForResource"), API::Dictionary::create(WTF::move(message)).get());
+    WebProcess::singleton().injectedBundle()->postMessage(String::fromUTF8("WebPage.DidReceiveContentLengthForResource"), API::Dictionary::create(WTF::move(message)).get());
 }
 
 static void didFinishLoadForResource(WKBundlePageRef page, WKBundleFrameRef, uint64_t identifier, const void*)
@@ -216,7 +216,7 @@ static void didFinishLoadForResource(WKBundlePageRef page, WKBundleFrameRef, uin
     API::Dictionary::MapType message;
     message.set(String::fromUTF8("Page"), toImpl(page));
     message.set(String::fromUTF8("Identifier"), API::UInt64::create(identifier));
-    WebProcess::shared().injectedBundle()->postMessage(String::fromUTF8("WebPage.DidFinishLoadForResource"), API::Dictionary::create(WTF::move(message)).get());
+    WebProcess::singleton().injectedBundle()->postMessage(String::fromUTF8("WebPage.DidFinishLoadForResource"), API::Dictionary::create(WTF::move(message)).get());
 }
 
 static void didFailLoadForResource(WKBundlePageRef page, WKBundleFrameRef, uint64_t identifier, WKErrorRef error, const void*)
@@ -225,7 +225,7 @@ static void didFailLoadForResource(WKBundlePageRef page, WKBundleFrameRef, uint6
     message.set(String::fromUTF8("Page"), toImpl(page));
     message.set(String::fromUTF8("Identifier"), API::UInt64::create(identifier));
     message.set(String::fromUTF8("Error"), toImpl(error));
-    WebProcess::shared().injectedBundle()->postMessage(String::fromUTF8("WebPage.DidFailLoadForResource"), API::Dictionary::create(WTF::move(message)).get());
+    WebProcess::singleton().injectedBundle()->postMessage(String::fromUTF8("WebPage.DidFailLoadForResource"), API::Dictionary::create(WTF::move(message)).get());
 }
 
 class PageContextMenuClient final : public API::InjectedBundle::PageContextMenuClient {
@@ -478,7 +478,7 @@ void webkitWebPageDidReceiveMessage(WebKitWebPage* page, const String& messageNa
         messageReply.set("Page", webPage);
         messageReply.set("CallbackID", API::UInt64::create(callbackID));
         messageReply.set("Snapshot", snapshotImage);
-        WebProcess::shared().injectedBundle()->postMessage("WebPage.DidGetSnapshot", API::Dictionary::create(WTF::move(messageReply)).get());
+        WebProcess::singleton().injectedBundle()->postMessage("WebPage.DidGetSnapshot", API::Dictionary::create(WTF::move(messageReply)).get());
     } else
         ASSERT_NOT_REACHED();
 }
index 2fb8f9539ecc83114d26a66a6ac4377766cbf887..b0a27454234693342756e2d4bf7c31f3e367629f 100644 (file)
@@ -402,7 +402,7 @@ static void setUpResourceLoadClient(WKWebProcessPlugInBrowserContextController *
 
 + (instancetype)lookUpBrowsingContextFromHandle:(WKBrowsingContextHandle *)handle
 {
-    WebPage* webPage = WebProcess::shared().webPage(handle.pageID);
+    WebPage* webPage = WebProcess::singleton().webPage(handle.pageID);
     if (!webPage)
         return nil;
 
@@ -413,7 +413,7 @@ static void setUpResourceLoadClient(WKWebProcessPlugInBrowserContextController *
 {
     if (!_remoteObjectRegistry) {
         _remoteObjectRegistry = adoptNS([[_WKRemoteObjectRegistry alloc] _initWithMessageSender:*_page]);
-        WebProcess::shared().addMessageReceiver(Messages::RemoteObjectRegistry::messageReceiverName(), _page->pageID(), [_remoteObjectRegistry remoteObjectRegistry]);
+        WebProcess::singleton().addMessageReceiver(Messages::RemoteObjectRegistry::messageReceiverName(), _page->pageID(), [_remoteObjectRegistry remoteObjectRegistry]);
     }
 
     return _remoteObjectRegistry.get();
index ff0afd9de3b95e8582fe8e2d765bef6bb88c537b..417093ac5313667ae6dc302cdafba0990cd04d6b 100644 (file)
@@ -116,32 +116,34 @@ void InjectedBundle::initializeClient(const WKBundleClientBase* client)
 
 void InjectedBundle::postMessage(const String& messageName, API::Object* messageBody)
 {
-    WebProcess::shared().parentProcessConnection()->send(Messages::WebProcessPool::HandleMessage(messageName, UserData(WebProcess::shared().transformObjectsToHandles(messageBody))), 0);
+    auto& webProcess = WebProcess::singleton();
+    webProcess.parentProcessConnection()->send(Messages::WebProcessPool::HandleMessage(messageName, UserData(webProcess.transformObjectsToHandles(messageBody))), 0);
 }
 
 void InjectedBundle::postSynchronousMessage(const String& messageName, API::Object* messageBody, RefPtr<API::Object>& returnData)
 {
     UserData returnUserData;
 
-    if (!WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebProcessPool::HandleSynchronousMessage(messageName, UserData(WebProcess::shared().transformObjectsToHandles(messageBody))), Messages::WebProcessPool::HandleSynchronousMessage::Reply(returnUserData), 0))
+    auto& webProcess = WebProcess::singleton();
+    if (!webProcess.parentProcessConnection()->sendSync(Messages::WebProcessPool::HandleSynchronousMessage(messageName, UserData(webProcess.transformObjectsToHandles(messageBody))), Messages::WebProcessPool::HandleSynchronousMessage::Reply(returnUserData), 0))
         returnData = nullptr;
     else
-        returnData = WebProcess::shared().transformHandlesToObjects(returnUserData.object());
+        returnData = webProcess.transformHandlesToObjects(returnUserData.object());
 }
 
 WebConnection* InjectedBundle::webConnectionToUIProcess() const
 {
-    return WebProcess::shared().webConnectionToUIProcess();
+    return WebProcess::singleton().webConnectionToUIProcess();
 }
 
 void InjectedBundle::setAlwaysAcceptCookies(bool accept)
 {
-    WebProcess::shared().supplement<WebCookieManager>()->setHTTPCookieAcceptPolicy(accept ? HTTPCookieAcceptPolicyAlways : HTTPCookieAcceptPolicyOnlyFromMainDocumentDomain);
+    WebProcess::singleton().supplement<WebCookieManager>()->setHTTPCookieAcceptPolicy(accept ? HTTPCookieAcceptPolicyAlways : HTTPCookieAcceptPolicyOnlyFromMainDocumentDomain);
 }
 
 void InjectedBundle::setCacheModel(uint32_t cacheModel)
 {
-    WebProcess::shared().setCacheModel(cacheModel);
+    WebProcess::singleton().setCacheModel(cacheModel);
 }
 
 void InjectedBundle::overrideBoolPreferenceForTestRunner(WebPageGroupProxy* pageGroup, const String& preference, bool enabled)
@@ -342,19 +344,19 @@ void InjectedBundle::setAsynchronousSpellCheckingEnabled(WebPageGroupProxy* page
 
 void InjectedBundle::clearAllDatabases()
 {
-    WebProcess::shared().supplement<WebDatabaseManager>()->deleteAllDatabases();
+    WebProcess::singleton().supplement<WebDatabaseManager>()->deleteAllDatabases();
 }
 
 void InjectedBundle::setDatabaseQuota(uint64_t quota)
 {
     // Historically, we've used the following (somewhat non-sensical) string
     // for the databaseIdentifier of local files.
-    WebProcess::shared().supplement<WebDatabaseManager>()->setQuotaForOrigin("file__0", quota);
+    WebProcess::singleton().supplement<WebDatabaseManager>()->setQuotaForOrigin("file__0", quota);
 }
 
 void InjectedBundle::clearApplicationCache()
 {
-    WebProcess::shared().supplement<WebApplicationCacheManager>()->deleteAllEntries();
+    WebProcess::singleton().supplement<WebApplicationCacheManager>()->deleteAllEntries();
 }
 
 void InjectedBundle::clearApplicationCacheForOrigin(const String& originString)
@@ -365,7 +367,7 @@ void InjectedBundle::clearApplicationCacheForOrigin(const String& originString)
 
 void InjectedBundle::setAppCacheMaximumSize(uint64_t size)
 {
-    WebProcess::shared().supplement<WebApplicationCacheManager>()->setAppCacheMaximumSize(size);
+    WebProcess::singleton().supplement<WebApplicationCacheManager>()->setAppCacheMaximumSize(size);
 }
 
 uint64_t InjectedBundle::appCacheUsageForOrigin(const String& originString)
@@ -586,7 +588,7 @@ uint64_t InjectedBundle::webNotificationID(JSContextRef jsContext, JSValueRef js
     WebCore::Notification* notification = JSNotification::toWrapped(toJS(toJS(jsContext), jsNotification));
     if (!notification)
         return 0;
-    return WebProcess::shared().supplement<WebNotificationManager>()->notificationIDForTesting(notification);
+    return WebProcess::singleton().supplement<WebNotificationManager>()->notificationIDForTesting(notification);
 #else
     UNUSED_PARAM(jsContext);
     UNUSED_PARAM(jsNotification);
index a94c79c3377f60deb8822e476da5b59db2c91da4..8370cc4e7629aa46fb021af9f0374570d695dcf4 100644 (file)
@@ -56,7 +56,7 @@ NetworkProcessConnection::~NetworkProcessConnection()
 void NetworkProcessConnection::didReceiveMessage(IPC::Connection& connection, IPC::MessageDecoder& decoder)
 {
     if (decoder.messageReceiverName() == Messages::WebResourceLoader::messageReceiverName()) {
-        if (WebResourceLoader* webResourceLoader = WebProcess::shared().webResourceLoadScheduler().webResourceLoaderForIdentifier(decoder.destinationID()))
+        if (WebResourceLoader* webResourceLoader = WebProcess::singleton().webResourceLoadScheduler().webResourceLoaderForIdentifier(decoder.destinationID()))
             webResourceLoader->didReceiveWebResourceLoaderMessage(connection, decoder);
         
         return;
@@ -73,7 +73,7 @@ void NetworkProcessConnection::didReceiveSyncMessage(IPC::Connection&, IPC::Mess
 void NetworkProcessConnection::didClose(IPC::Connection&)
 {
     // The NetworkProcess probably crashed.
-    WebProcess::shared().networkProcessConnectionClosed(this);
+    WebProcess::singleton().networkProcessConnectionClosed(this);
 }
 
 void NetworkProcessConnection::didReceiveInvalidMessage(IPC::Connection&, IPC::StringReference, IPC::StringReference)
index 434790a8c2e65af737c340d64a4c71b4ec9f5bac..80245fb6bfe0faeffb58f3f97361f7a29f9e5182 100644 (file)
@@ -180,7 +180,7 @@ void WebResourceLoadScheduler::scheduleLoad(ResourceLoader* resourceLoader, Cach
 
     ASSERT((loadParameters.webPageID && loadParameters.webFrameID) || loadParameters.clientCredentialPolicy == DoNotAskClientForAnyCredentials);
 
-    if (!WebProcess::shared().networkConnection()->connection()->send(Messages::NetworkConnectionToWebProcess::ScheduleResourceLoad(loadParameters), 0)) {
+    if (!WebProcess::singleton().networkConnection()->connection()->send(Messages::NetworkConnectionToWebProcess::ScheduleResourceLoad(loadParameters), 0)) {
         // We probably failed to schedule this load with the NetworkProcess because it had crashed.
         // This load will never succeed so we will schedule it to fail asynchronously.
         scheduleInternallyFailedLoad(resourceLoader);
@@ -226,7 +226,7 @@ void WebResourceLoadScheduler::remove(ResourceLoader* resourceLoader)
     if (!loader)
         return;
 
-    WebProcess::shared().networkConnection()->connection()->send(Messages::NetworkConnectionToWebProcess::RemoveLoadIdentifier(identifier), 0);
+    WebProcess::singleton().networkConnection()->connection()->send(Messages::NetworkConnectionToWebProcess::RemoveLoadIdentifier(identifier), 0);
 
     // It's possible that this WebResourceLoader might be just about to message back to the NetworkProcess (e.g. ContinueWillSendRequest)
     // but there's no point in doing so anymore.
@@ -236,7 +236,7 @@ void WebResourceLoadScheduler::remove(ResourceLoader* resourceLoader)
 void WebResourceLoadScheduler::setDefersLoading(ResourceLoader* resourceLoader, bool defers)
 {
     ResourceLoadIdentifier identifier = resourceLoader->identifier();
-    WebProcess::shared().networkConnection()->connection()->send(Messages::NetworkConnectionToWebProcess::SetDefersLoading(identifier, defers), 0);
+    WebProcess::singleton().networkConnection()->connection()->send(Messages::NetworkConnectionToWebProcess::SetDefersLoading(identifier, defers), 0);
 }
 
 void WebResourceLoadScheduler::crossOriginRedirectReceived(ResourceLoader*, const URL&)
@@ -254,7 +254,7 @@ void WebResourceLoadScheduler::servePendingRequests(ResourceLoadPriority minimum
     if (m_suspendPendingRequestsCount)
         return;
 
-    WebProcess::shared().networkConnection()->connection()->send(Messages::NetworkConnectionToWebProcess::ServePendingRequests(minimumPriority), 0);
+    WebProcess::singleton().networkConnection()->connection()->send(Messages::NetworkConnectionToWebProcess::ServePendingRequests(minimumPriority), 0);
 }
 
 void WebResourceLoadScheduler::suspendPendingRequests()
@@ -270,7 +270,7 @@ void WebResourceLoadScheduler::resumePendingRequests()
 
 void WebResourceLoadScheduler::setSerialLoadingEnabled(bool enabled)
 {
-    WebProcess::shared().networkConnection()->connection()->sendSync(Messages::NetworkConnectionToWebProcess::SetSerialLoadingEnabled(enabled), Messages::NetworkConnectionToWebProcess::SetSerialLoadingEnabled::Reply(), 0);
+    WebProcess::singleton().networkConnection()->connection()->sendSync(Messages::NetworkConnectionToWebProcess::SetSerialLoadingEnabled(enabled), Messages::NetworkConnectionToWebProcess::SetSerialLoadingEnabled::Reply(), 0);
 }
 
 void WebResourceLoadScheduler::networkProcessCrashed()
index 6d668d5844cd5bada40955feb30d96b8323ae13a..89d178ba323e225c042d11e4e030c18d27e7971d 100644 (file)
@@ -61,7 +61,7 @@ WebResourceLoader::~WebResourceLoader()
 
 IPC::Connection* WebResourceLoader::messageSenderConnection()
 {
-    return WebProcess::shared().networkConnection()->connection();
+    return WebProcess::singleton().networkConnection()->connection();
 }
 
 uint64_t WebResourceLoader::messageSenderDestinationID()
index 6098a17ce019cd0bcb2faeb7d872ea7180044529..3a99dd88cbf20250d7d3a9cdf53c269c43f7e9f3 100644 (file)
@@ -126,7 +126,7 @@ NotificationClient::Permission NotificationPermissionRequestManager::permissionL
     if (!m_page->corePage()->settings().notificationsEnabled())
         return NotificationClient::PermissionDenied;
     
-    return WebProcess::shared().supplement<WebNotificationManager>()->policyForOrigin(securityOrigin);
+    return WebProcess::singleton().supplement<WebNotificationManager>()->policyForOrigin(securityOrigin);
 #else
     UNUSED_PARAM(securityOrigin);
     return NotificationClient::PermissionDenied;
@@ -136,7 +136,7 @@ NotificationClient::Permission NotificationPermissionRequestManager::permissionL
 void NotificationPermissionRequestManager::setPermissionLevelForTesting(const String& originString, bool allowed)
 {
 #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
-    WebProcess::shared().supplement<WebNotificationManager>()->didUpdateNotificationDecision(originString, allowed);
+    WebProcess::singleton().supplement<WebNotificationManager>()->didUpdateNotificationDecision(originString, allowed);
 #else
     UNUSED_PARAM(originString);
     UNUSED_PARAM(allowed);
@@ -146,7 +146,7 @@ void NotificationPermissionRequestManager::setPermissionLevelForTesting(const St
 void NotificationPermissionRequestManager::removeAllPermissionsForTesting()
 {
 #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
-    WebProcess::shared().supplement<WebNotificationManager>()->removeAllPermissionsForTesting();
+    WebProcess::singleton().supplement<WebNotificationManager>()->removeAllPermissionsForTesting();
 #endif
 }
 
@@ -162,7 +162,7 @@ void NotificationPermissionRequestManager::didReceiveNotificationPermissionDecis
 
     m_originToIDMap.remove(origin);
 
-    WebProcess::shared().supplement<WebNotificationManager>()->didUpdateNotificationDecision(origin->toString(), allowed);
+    WebProcess::singleton().supplement<WebNotificationManager>()->didUpdateNotificationDecision(origin->toString(), allowed);
 
 #if ENABLE(LEGACY_NOTIFICATIONS)
     RefPtr<WebCore::VoidCallback> voidCallback = m_idToVoidCallbackMap.take(requestID);
index 80f4436b89040cc9a161abd48e016c657be189d3..04efbf79502b5ada3a7261459117847ed7d52f6f 100644 (file)
@@ -1662,7 +1662,8 @@ void PDFPlugin::writeItemsToPasteboard(NSString *pasteboardName, NSArray *items,
         pasteboardTypes.append(type);
 
     uint64_t newChangeCount;
-    WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebPasteboardProxy::SetPasteboardTypes(pasteboardName, pasteboardTypes),
+    auto& webProcess = WebProcess::singleton();
+    webProcess.parentProcessConnection()->sendSync(Messages::WebPasteboardProxy::SetPasteboardTypes(pasteboardName, pasteboardTypes),
         Messages::WebPasteboardProxy::SetPasteboardTypes::Reply(newChangeCount), 0);
 
     for (NSUInteger i = 0, count = items.count; i < count; ++i) {
@@ -1677,7 +1678,7 @@ void PDFPlugin::writeItemsToPasteboard(NSString *pasteboardName, NSArray *items,
 
         if ([type isEqualToString:NSStringPboardType] || [type isEqualToString:NSPasteboardTypeString]) {
             RetainPtr<NSString> plainTextString = adoptNS([[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]);
-            WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebPasteboardProxy::SetPasteboardStringForType(pasteboardName, type, plainTextString.get()), Messages::WebPasteboardProxy::SetPasteboardStringForType::Reply(newChangeCount), 0);
+            webProcess.parentProcessConnection()->sendSync(Messages::WebPasteboardProxy::SetPasteboardStringForType(pasteboardName, type, plainTextString.get()), Messages::WebPasteboardProxy::SetPasteboardStringForType::Reply(newChangeCount), 0);
         } else {
             RefPtr<SharedBuffer> buffer = SharedBuffer::wrapNSData(data);
 
@@ -1688,7 +1689,7 @@ void PDFPlugin::writeItemsToPasteboard(NSString *pasteboardName, NSArray *items,
             RefPtr<SharedMemory> sharedMemory = SharedMemory::create(buffer->size());
             memcpy(sharedMemory->data(), buffer->data(), buffer->size());
             sharedMemory->createHandle(handle, SharedMemory::ReadOnly);
-            WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebPasteboardProxy::SetPasteboardBufferForType(pasteboardName, type, handle, buffer->size()), Messages::WebPasteboardProxy::SetPasteboardBufferForType::Reply(newChangeCount), 0);
+            webProcess.parentProcessConnection()->sendSync(Messages::WebPasteboardProxy::SetPasteboardBufferForType(pasteboardName, type, handle, buffer->size()), Messages::WebPasteboardProxy::SetPasteboardBufferForType::Reply(newChangeCount), 0);
         }
     }
 }
index d8bb99045bd57c79b4acd643185e2a590d04e640..c354b224468656a98406dfcf4f9d2e0043b05713 100644 (file)
@@ -70,7 +70,7 @@ PluginProcessConnection* PluginProcessConnectionManager::getPluginProcessConnect
 
     IPC::Attachment encodedConnectionIdentifier;
     bool supportsAsynchronousInitialization;
-    if (!WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebProcessProxy::GetPluginProcessConnection(pluginProcessToken),
+    if (!WebProcess::singleton().parentProcessConnection()->sendSync(Messages::WebProcessProxy::GetPluginProcessConnection(pluginProcessToken),
                                                      Messages::WebProcessProxy::GetPluginProcessConnection::Reply(encodedConnectionIdentifier, supportsAsynchronousInitialization), 0))
         return 0;
 
index 095dcbdc7019c59a19c5cec298959572fa81e23d..dd7f92959943c09ab79bb9b8b621fd6ae6ef5cf2 100644 (file)
@@ -86,7 +86,7 @@ void PluginProxy::pluginProcessCrashed()
 bool PluginProxy::initialize(const Parameters& parameters)
 {
     ASSERT(!m_connection);
-    m_connection = WebProcess::shared().pluginProcessConnectionManager().getPluginProcessConnection(m_pluginProcessToken);
+    m_connection = WebProcess::singleton().pluginProcessConnectionManager().getPluginProcessConnection(m_pluginProcessToken);
     
     if (!m_connection)
         return false;
index 107607ad6bcc938dd7ba799869cad64cb3601ebd..1864233d569a29a2cb2925b2f2a825c8db16e202 100644 (file)
@@ -1532,7 +1532,7 @@ void PluginView::setComplexTextInputState(PluginComplexTextInputState pluginComp
 
 const MachSendRight& PluginView::compositingRenderServerPort()
 {
-    return WebProcess::shared().compositingRenderServerPort();
+    return WebProcess::singleton().compositingRenderServerPort();
 }
 
 void PluginView::openPluginPreferencePane()
@@ -1814,7 +1814,7 @@ void PluginView::pluginDidReceiveUserInteraction()
     String pluginOrigin = plugInImageElement.loadedUrl().host();
     String mimeType = plugInImageElement.loadedMimeType();
 
-    WebProcess::shared().plugInDidReceiveUserInteraction(pageOrigin, pluginOrigin, mimeType, plugInImageElement.document().page()->sessionID());
+    WebProcess::singleton().plugInDidReceiveUserInteraction(pageOrigin, pluginOrigin, mimeType, plugInImageElement.document().page()->sessionID());
 }
 
 bool PluginView::shouldCreateTransientPaintingSnapshot() const
index 3a3c5966e6e4581d33b25cafa9823aa11f60979e..a680881c2da179d1c1dce31ce925c914e042deda 100644 (file)
@@ -54,12 +54,12 @@ RemoteScrollingCoordinator::RemoteScrollingCoordinator(WebPage* page)
     : AsyncScrollingCoordinator(page->corePage())
     , m_webPage(page)
 {
-    WebProcess::shared().addMessageReceiver(Messages::RemoteScrollingCoordinator::messageReceiverName(), m_webPage->pageID(), *this);
+    WebProcess::singleton().addMessageReceiver(Messages::RemoteScrollingCoordinator::messageReceiverName(), m_webPage->pageID(), *this);
 }
 
 RemoteScrollingCoordinator::~RemoteScrollingCoordinator()
 {
-    WebProcess::shared().removeMessageReceiver(Messages::RemoteScrollingCoordinator::messageReceiverName(), m_webPage->pageID());
+    WebProcess::singleton().removeMessageReceiver(Messages::RemoteScrollingCoordinator::messageReceiverName(), m_webPage->pageID());
 }
 
 void RemoteScrollingCoordinator::scheduleTreeStateCommit()
index 76b09aed1b84a9ff3e206c32061a4ef7edcdb069..e218516308877df21452ff9b3ac1abfc256fc0ff 100644 (file)
@@ -71,24 +71,24 @@ StorageAreaMap::StorageAreaMap(StorageNamespaceImpl* storageNamespace, PassRefPt
     switch (m_storageType) {
     case WebCore::LocalStorage:
         if (SecurityOrigin* topLevelOrigin = storageNamespace->topLevelOrigin())
-            WebProcess::shared().parentProcessConnection()->send(Messages::StorageManager::CreateTransientLocalStorageMap(m_storageMapID, storageNamespace->storageNamespaceID(), SecurityOriginData::fromSecurityOrigin(topLevelOrigin), SecurityOriginData::fromSecurityOrigin(m_securityOrigin.get())), 0);
+            WebProcess::singleton().parentProcessConnection()->send(Messages::StorageManager::CreateTransientLocalStorageMap(m_storageMapID, storageNamespace->storageNamespaceID(), SecurityOriginData::fromSecurityOrigin(topLevelOrigin), SecurityOriginData::fromSecurityOrigin(m_securityOrigin.get())), 0);
         else
-            WebProcess::shared().parentProcessConnection()->send(Messages::StorageManager::CreateLocalStorageMap(m_storageMapID, storageNamespace->storageNamespaceID(), SecurityOriginData::fromSecurityOrigin(m_securityOrigin.get())), 0);
+            WebProcess::singleton().parentProcessConnection()->send(Messages::StorageManager::CreateLocalStorageMap(m_storageMapID, storageNamespace->storageNamespaceID(), SecurityOriginData::fromSecurityOrigin(m_securityOrigin.get())), 0);
 
         break;
 
     case WebCore::SessionStorage:
-        WebProcess::shared().parentProcessConnection()->send(Messages::StorageManager::CreateSessionStorageMap(m_storageMapID, storageNamespace->storageNamespaceID(), SecurityOriginData::fromSecurityOrigin(m_securityOrigin.get())), 0);
+        WebProcess::singleton().parentProcessConnection()->send(Messages::StorageManager::CreateSessionStorageMap(m_storageMapID, storageNamespace->storageNamespaceID(), SecurityOriginData::fromSecurityOrigin(m_securityOrigin.get())), 0);
         break;
     }
 
-    WebProcess::shared().addMessageReceiver(Messages::StorageAreaMap::messageReceiverName(), m_storageMapID, *this);
+    WebProcess::singleton().addMessageReceiver(Messages::StorageAreaMap::messageReceiverName(), m_storageMapID, *this);
 }
 
 StorageAreaMap::~StorageAreaMap()
 {
-    WebProcess::shared().parentProcessConnection()->send(Messages::StorageManager::DestroyStorageMap(m_storageMapID), 0);
-    WebProcess::shared().removeMessageReceiver(Messages::StorageAreaMap::messageReceiverName(), m_storageMapID);
+    WebProcess::singleton().parentProcessConnection()->send(Messages::StorageManager::DestroyStorageMap(m_storageMapID), 0);
+    WebProcess::singleton().removeMessageReceiver(Messages::StorageAreaMap::messageReceiverName(), m_storageMapID);
 }
 
 unsigned StorageAreaMap::length()
@@ -129,7 +129,7 @@ void StorageAreaMap::setItem(Frame* sourceFrame, StorageAreaImpl* sourceArea, co
 
     m_pendingValueChanges.add(key);
 
-    WebProcess::shared().parentProcessConnection()->send(Messages::StorageManager::SetItem(m_storageMapID, sourceArea->storageAreaID(), m_currentSeed, key, value, sourceFrame->document()->url()), 0);
+    WebProcess::singleton().parentProcessConnection()->send(Messages::StorageManager::SetItem(m_storageMapID, sourceArea->storageAreaID(), m_currentSeed, key, value, sourceFrame->document()->url()), 0);
 }
 
 void StorageAreaMap::removeItem(WebCore::Frame* sourceFrame, StorageAreaImpl* sourceArea, const String& key)
@@ -145,7 +145,7 @@ void StorageAreaMap::removeItem(WebCore::Frame* sourceFrame, StorageAreaImpl* so
 
     m_pendingValueChanges.add(key);
 
-    WebProcess::shared().parentProcessConnection()->send(Messages::StorageManager::RemoveItem(m_storageMapID, sourceArea->storageAreaID(), m_currentSeed, key, sourceFrame->document()->url()), 0);
+    WebProcess::singleton().parentProcessConnection()->send(Messages::StorageManager::RemoveItem(m_storageMapID, sourceArea->storageAreaID(), m_currentSeed, key, sourceFrame->document()->url()), 0);
 }
 
 void StorageAreaMap::clear(WebCore::Frame* sourceFrame, StorageAreaImpl* sourceArea)
@@ -154,7 +154,7 @@ void StorageAreaMap::clear(WebCore::Frame* sourceFrame, StorageAreaImpl* sourceA
 
     m_hasPendingClear = true;
     m_storageMap = StorageMap::create(m_quotaInBytes);
-    WebProcess::shared().parentProcessConnection()->send(Messages::StorageManager::Clear(m_storageMapID, sourceArea->storageAreaID(), m_currentSeed, sourceFrame->document()->url()), 0);
+    WebProcess::singleton().parentProcessConnection()->send(Messages::StorageManager::Clear(m_storageMapID, sourceArea->storageAreaID(), m_currentSeed, sourceFrame->document()->url()), 0);
 }
 
 bool StorageAreaMap::contains(const String& key)
@@ -183,7 +183,7 @@ void StorageAreaMap::loadValuesIfNeeded()
     // FIXME: This should use a special sendSync flag to indicate that we don't want to process incoming messages while waiting for a reply.
     // (This flag does not yet exist). Since loadValuesIfNeeded() ends up being called from within JavaScript code, processing incoming synchronous messages
     // could lead to weird reentrency bugs otherwise.
-    WebProcess::shared().parentProcessConnection()->sendSync(Messages::StorageManager::GetValues(m_storageMapID, m_currentSeed), Messages::StorageManager::GetValues::Reply(values), 0);
+    WebProcess::singleton().parentProcessConnection()->sendSync(Messages::StorageManager::GetValues(m_storageMapID, m_currentSeed), Messages::StorageManager::GetValues::Reply(values), 0);
 
     m_storageMap = StorageMap::create(m_quotaInBytes);
     m_storageMap->importItems(values);
@@ -316,7 +316,7 @@ void StorageAreaMap::dispatchSessionStorageEvent(uint64_t sourceStorageAreaID, c
 
     // Namespace IDs for session storage namespaces are equivalent to web page IDs
     // so we can get the right page here.
-    WebPage* webPage = WebProcess::shared().webPage(m_storageNamespaceID);
+    WebPage* webPage = WebProcess::singleton().webPage(m_storageNamespaceID);
     if (!webPage)
         return;
 
@@ -350,7 +350,7 @@ void StorageAreaMap::dispatchLocalStorageEvent(uint64_t sourceStorageAreaID, con
 
     Vector<RefPtr<Frame>> frames;
 
-    PageGroup& pageGroup = *WebProcess::shared().webPageGroup(m_storageNamespaceID)->corePageGroup();
+    PageGroup& pageGroup = *WebProcess::singleton().webPageGroup(m_storageNamespaceID)->corePageGroup();
     const HashSet<Page*>& pages = pageGroup.pages();
     for (HashSet<Page*>::const_iterator it = pages.begin(), end = pages.end(); it != end; ++it) {
         for (Frame* frame = &(*it)->mainFrame(); frame; frame = frame->tree().traverseNext()) {
index 4fcf86e859093b723e79037c0bffc9306d7742c2..23603330f5819b6ae0e802f070a8195013ef7d46 100644 (file)
@@ -70,14 +70,14 @@ WebUserContentController::WebUserContentController(uint64_t identifier)
     : m_identifier(identifier)
     , m_userContentController(*UserContentController::create())
 {
-    WebProcess::shared().addMessageReceiver(Messages::WebUserContentController::messageReceiverName(), m_identifier, *this);
+    WebProcess::singleton().addMessageReceiver(Messages::WebUserContentController::messageReceiverName(), m_identifier, *this);
 }
 
 WebUserContentController::~WebUserContentController()
 {
     ASSERT(userContentControllers().contains(m_identifier));
 
-    WebProcess::shared().removeMessageReceiver(Messages::WebUserContentController::messageReceiverName(), m_identifier);
+    WebProcess::singleton().removeMessageReceiver(Messages::WebUserContentController::messageReceiverName(), m_identifier);
 
     userContentControllers().remove(m_identifier);
 }
@@ -133,7 +133,7 @@ public:
         if (!webPage)
             return;
 
-        WebProcess::shared().parentProcessConnection()->send(Messages::WebUserContentControllerProxy::DidPostMessage(webPage->pageID(), webFrame->frameID(), m_identifier, IPC::DataReference(value->data())), m_controller->identifier());
+        WebProcess::singleton().parentProcessConnection()->send(Messages::WebUserContentControllerProxy::DidPostMessage(webPage->pageID(), webFrame->frameID(), m_identifier, IPC::DataReference(value->data())), m_controller->identifier());
     }
 
     WebCore::UserMessageHandlerDescriptor& descriptor() { return *m_descriptor; }
index 1d136e4f13c015c135a76b309520275c41820ea8..aa7d4fb0c16aec71c1964e684b94f879797d86cd 100644 (file)
@@ -38,17 +38,17 @@ namespace WebKit {
 
 void WebBatteryClient::startUpdating()
 {
-    WebProcess::shared().supplement<WebBatteryManager>()->registerWebPage(m_page);
+    WebProcess::singleton().supplement<WebBatteryManager>()->registerWebPage(m_page);
 }
 
 void WebBatteryClient::stopUpdating()
 {
-    WebProcess::shared().supplement<WebBatteryManager>()->unregisterWebPage(m_page);
+    WebProcess::singleton().supplement<WebBatteryManager>()->unregisterWebPage(m_page);
 }
 
 void WebBatteryClient::batteryControllerDestroyed()
 {
-    WebProcess::shared().supplement<WebBatteryManager>()->unregisterWebPage(m_page);
+    WebProcess::singleton().supplement<WebBatteryManager>()->unregisterWebPage(m_page);
     delete this;
 }
 
index ea5a398d8cd13be1bf7f8f2668591137dc537942..f2a01be265b6eecb1ae3eed7de9dae49c08dd9a7 100644 (file)
@@ -135,7 +135,7 @@ FloatRect WebChromeClient::windowRect()
 
     FloatRect newWindowFrame;
 
-    if (!WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebPageProxy::GetWindowFrame(), Messages::WebPageProxy::GetWindowFrame::Reply(newWindowFrame), m_page->pageID()))
+    if (!WebProcess::singleton().parentProcessConnection()->sendSync(Messages::WebPageProxy::GetWindowFrame(), Messages::WebPageProxy::GetWindowFrame::Reply(newWindowFrame), m_page->pageID()))
         return FloatRect();
 
     return newWindowFrame;
@@ -192,7 +192,7 @@ void WebChromeClient::focusedFrameChanged(Frame* frame)
 {
     WebFrame* webFrame = frame ? WebFrame::fromCoreFrame(*frame) : nullptr;
 
-    WebProcess::shared().parentProcessConnection()->send(Messages::WebPageProxy::FocusedFrameChanged(webFrame ? webFrame->frameID() : 0), m_page->pageID());
+    WebProcess::singleton().parentProcessConnection()->send(Messages::WebPageProxy::FocusedFrameChanged(webFrame ? webFrame->frameID() : 0), m_page->pageID());
 }
 
 Page* WebChromeClient::createWindow(Frame* frame, const FrameLoadRequest& request, const WindowFeatures& windowFeatures, const NavigationAction& navigationAction)
@@ -213,14 +213,15 @@ Page* WebChromeClient::createWindow(Frame* frame, const FrameLoadRequest& reques
 
     uint64_t newPageID = 0;
     WebPageCreationParameters parameters;
-    if (!WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebPageProxy::CreateNewPage(webFrame->frameID(), request.resourceRequest(), windowFeatures, navigationActionData), Messages::WebPageProxy::CreateNewPage::Reply(newPageID, parameters), m_page->pageID()))
-        return 0;
+    auto& webProcess = WebProcess::singleton();
+    if (!webProcess.parentProcessConnection()->sendSync(Messages::WebPageProxy::CreateNewPage(webFrame->frameID(), request.resourceRequest(), windowFeatures, navigationActionData), Messages::WebPageProxy::CreateNewPage::Reply(newPageID, parameters), m_page->pageID()))
+        return nullptr;
 
     if (!newPageID)
-        return 0;
+        return nullptr;
 
-    WebProcess::shared().createWebPage(newPageID, parameters);
-    return WebProcess::shared().webPage(newPageID)->corePage();
+    webProcess.createWebPage(newPageID, parameters);
+    return webProcess.webPage(newPageID)->corePage();
 }
 
 void WebChromeClient::show()
@@ -250,7 +251,7 @@ bool WebChromeClient::toolbarsVisible()
         return toolbarsVisibility == API::InjectedBundle::PageUIClient::UIElementVisibility::Visible;
     
     bool toolbarsAreVisible = true;
-    if (!WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebPageProxy::GetToolbarsAreVisible(), Messages::WebPageProxy::GetToolbarsAreVisible::Reply(toolbarsAreVisible), m_page->pageID()))
+    if (!WebProcess::singleton().parentProcessConnection()->sendSync(Messages::WebPageProxy::GetToolbarsAreVisible(), Messages::WebPageProxy::GetToolbarsAreVisible::Reply(toolbarsAreVisible), m_page->pageID()))
         return true;
 
     return toolbarsAreVisible;
@@ -268,7 +269,7 @@ bool WebChromeClient::statusbarVisible()
         return statusbarVisibility == API::InjectedBundle::PageUIClient::UIElementVisibility::Visible;
 
     bool statusBarIsVisible = true;
-    if (!WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebPageProxy::GetStatusBarIsVisible(), Messages::WebPageProxy::GetStatusBarIsVisible::Reply(statusBarIsVisible), m_page->pageID()))
+    if (!WebProcess::singleton().parentProcessConnection()->sendSync(Messages::WebPageProxy::GetStatusBarIsVisible(), Messages::WebPageProxy::GetStatusBarIsVisible::Reply(statusBarIsVisible), m_page->pageID()))
         return true;
 
     return statusBarIsVisible;
@@ -297,7 +298,7 @@ bool WebChromeClient::menubarVisible()
         return menubarVisibility == API::InjectedBundle::PageUIClient::UIElementVisibility::Visible;
     
     bool menuBarIsVisible = true;
-    if (!WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebPageProxy::GetMenuBarIsVisible(), Messages::WebPageProxy::GetMenuBarIsVisible::Reply(menuBarIsVisible), m_page->pageID()))
+    if (!WebProcess::singleton().parentProcessConnection()->sendSync(Messages::WebPageProxy::GetMenuBarIsVisible(), Messages::WebPageProxy::GetMenuBarIsVisible::Reply(menuBarIsVisible), m_page->pageID()))
         return true;
 
     return menuBarIsVisible;
@@ -331,7 +332,7 @@ bool WebChromeClient::runBeforeUnloadConfirmPanel(const String& message, Frame*
     if (WebPage::synchronousMessagesShouldSpinRunLoop())
         syncSendFlags |= IPC::SpinRunLoopWhileWaitingForReply;
     
-    if (!WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebPageProxy::RunBeforeUnloadConfirmPanel(message, webFrame->frameID()), Messages::WebPageProxy::RunBeforeUnloadConfirmPanel::Reply(shouldClose), m_page->pageID(), std::chrono::milliseconds::max(), syncSendFlags))
+    if (!WebProcess::singleton().parentProcessConnection()->sendSync(Messages::WebPageProxy::RunBeforeUnloadConfirmPanel(message, webFrame->frameID()), Messages::WebPageProxy::RunBeforeUnloadConfirmPanel::Reply(shouldClose), m_page->pageID(), std::chrono::milliseconds::max(), syncSendFlags))
         return false;
 
     return shouldClose;
@@ -367,7 +368,7 @@ void WebChromeClient::runJavaScriptAlert(Frame* frame, const String& alertText)
     unsigned syncSendFlags = IPC::InformPlatformProcessWillSuspend;
     if (WebPage::synchronousMessagesShouldSpinRunLoop())
         syncSendFlags |= IPC::SpinRunLoopWhileWaitingForReply;
-    WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebPageProxy::RunJavaScriptAlert(webFrame->frameID(), alertText), Messages::WebPageProxy::RunJavaScriptAlert::Reply(), m_page->pageID(), std::chrono::milliseconds::max(), syncSendFlags);
+    WebProcess::singleton().parentProcessConnection()->sendSync(Messages::WebPageProxy::RunJavaScriptAlert(webFrame->frameID(), alertText), Messages::WebPageProxy::RunJavaScriptAlert::Reply(), m_page->pageID(), std::chrono::milliseconds::max(), syncSendFlags);
 }
 
 bool WebChromeClient::runJavaScriptConfirm(Frame* frame, const String& message)
@@ -382,7 +383,7 @@ bool WebChromeClient::runJavaScriptConfirm(Frame* frame, const String& message)
     if (WebPage::synchronousMessagesShouldSpinRunLoop())
         syncSendFlags |= IPC::SpinRunLoopWhileWaitingForReply;
     bool result = false;
-    if (!WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebPageProxy::RunJavaScriptConfirm(webFrame->frameID(), message), Messages::WebPageProxy::RunJavaScriptConfirm::Reply(result), m_page->pageID(), std::chrono::milliseconds::max(), syncSendFlags))
+    if (!WebProcess::singleton().parentProcessConnection()->sendSync(Messages::WebPageProxy::RunJavaScriptConfirm(webFrame->frameID(), message), Messages::WebPageProxy::RunJavaScriptConfirm::Reply(result), m_page->pageID(), std::chrono::milliseconds::max(), syncSendFlags))
         return false;
 
     return result;
@@ -400,7 +401,7 @@ bool WebChromeClient::runJavaScriptPrompt(Frame* frame, const String& message, c
     if (WebPage::synchronousMessagesShouldSpinRunLoop())
         syncSendFlags |= IPC::SpinRunLoopWhileWaitingForReply;
     
-    if (!WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebPageProxy::RunJavaScriptPrompt(webFrame->frameID(), message, defaultValue), Messages::WebPageProxy::RunJavaScriptPrompt::Reply(result), m_page->pageID(), std::chrono::milliseconds::max(), syncSendFlags))
+    if (!WebProcess::singleton().parentProcessConnection()->sendSync(Messages::WebPageProxy::RunJavaScriptPrompt(webFrame->frameID(), message, defaultValue), Messages::WebPageProxy::RunJavaScriptPrompt::Reply(result), m_page->pageID(), std::chrono::milliseconds::max(), syncSendFlags))
         return false;
 
     return !result.isNull();
@@ -417,7 +418,7 @@ void WebChromeClient::setStatusbarText(const String& statusbarText)
 bool WebChromeClient::shouldInterruptJavaScript()
 {
     bool shouldInterrupt = false;
-    if (!WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebPageProxy::ShouldInterruptJavaScript(), Messages::WebPageProxy::ShouldInterruptJavaScript::Reply(shouldInterrupt), m_page->pageID()))
+    if (!WebProcess::singleton().parentProcessConnection()->sendSync(Messages::WebPageProxy::ShouldInterruptJavaScript(), Messages::WebPageProxy::ShouldInterruptJavaScript::Reply(shouldInterrupt), m_page->pageID()))
         return false;
 
     return shouldInterrupt;
@@ -601,7 +602,7 @@ void WebChromeClient::mouseDidMoveOverElement(const HitTestResult& hitTestResult
 
     // Notify the UIProcess.
     WebHitTestResult::Data webHitTestResultData(hitTestResult);
-    m_page->send(Messages::WebPageProxy::MouseDidMoveOverElement(webHitTestResultData, modifierFlags, UserData(WebProcess::shared().transformObjectsToHandles(userData.get()).get())));
+    m_page->send(Messages::WebPageProxy::MouseDidMoveOverElement(webHitTestResultData, modifierFlags, UserData(WebProcess::singleton().transformObjectsToHandles(userData.get()).get())));
 }
 
 void WebChromeClient::didBeginTrackingPotentialLongMousePress(const IntPoint& mouseDownPosition, const HitTestResult& hitTestResult)
@@ -613,7 +614,7 @@ void WebChromeClient::didBeginTrackingPotentialLongMousePress(const IntPoint& mo
     
     // Notify the UIProcess.
     WebHitTestResult::Data webHitTestResultData(hitTestResult);
-    m_page->send(Messages::WebPageProxy::DidBeginTrackingPotentialLongMousePress(mouseDownPosition, webHitTestResultData, UserData(WebProcess::shared().transformObjectsToHandles(userData.get()).get())));
+    m_page->send(Messages::WebPageProxy::DidBeginTrackingPotentialLongMousePress(mouseDownPosition, webHitTestResultData, UserData(WebProcess::singleton().transformObjectsToHandles(userData.get()).get())));
 }
 
 void WebChromeClient::didRecognizeLongMousePress()
@@ -624,7 +625,7 @@ void WebChromeClient::didRecognizeLongMousePress()
     m_page->injectedBundleUIClient().didRecognizeLongMousePress(m_page, userData);
 
     // Notify the UIProcess.
-    m_page->send(Messages::WebPageProxy::DidRecognizeLongMousePress(UserData(WebProcess::shared().transformObjectsToHandles(userData.get()).get())));
+    m_page->send(Messages::WebPageProxy::DidRecognizeLongMousePress(UserData(WebProcess::singleton().transformObjectsToHandles(userData.get()).get())));
 }
 
 void WebChromeClient::didCancelTrackingPotentialLongMousePress()
@@ -635,7 +636,7 @@ void WebChromeClient::didCancelTrackingPotentialLongMousePress()
     m_page->injectedBundleUIClient().didCancelTrackingPotentialLongMousePress(m_page, userData);
 
     // Notify the UIProcess.
-    m_page->send(Messages::WebPageProxy::DidCancelTrackingPotentialLongMousePress(UserData(WebProcess::shared().transformObjectsToHandles(userData.get()).get())));
+    m_page->send(Messages::WebPageProxy::DidCancelTrackingPotentialLongMousePress(UserData(WebProcess::singleton().transformObjectsToHandles(userData.get()).get())));
 }
 
 void WebChromeClient::setToolTip(const String& toolTip, TextDirection)
@@ -661,7 +662,7 @@ void WebChromeClient::print(Frame* frame)
     // the print operation is finished unexpectely and the web process crashes, see https://bugs.webkit.org/show_bug.cgi?id=126979.
     // The PrinterListGtk class gets the list of printers in the constructor so we just need to ensure there's an instance alive
     // during the synchronous print operation.
-    RefPtr<PrinterListGtk> printerList = PrinterListGtk::shared();
+    RefPtr<PrinterListGtk> printerList = PrinterListGtk::singleton();
 #endif
 
     unsigned syncSendFlags = IPC::InformPlatformProcessWillSuspend;
@@ -690,7 +691,7 @@ void WebChromeClient::exceededDatabaseQuota(Frame* frame, const String& database
         if (WebPage::synchronousMessagesShouldSpinRunLoop())
             syncSendFlags |= IPC::SpinRunLoopWhileWaitingForReply;
         
-        WebProcess::shared().parentProcessConnection()->sendSync(
+        WebProcess::singleton().parentProcessConnection()->sendSync(
             Messages::WebPageProxy::ExceededDatabaseQuota(webFrame->frameID(), origin->databaseIdentifier(), databaseName, details.displayName(), currentQuota, currentOriginUsage, details.currentUsage(), details.expectedUsage()),
             Messages::WebPageProxy::ExceededDatabaseQuota::Reply(newQuota), m_page->pageID(), std::chrono::milliseconds::max(), syncSendFlags);
     }
@@ -718,7 +719,7 @@ void WebChromeClient::reachedApplicationCacheOriginQuota(SecurityOrigin* origin,
         return;
 
     uint64_t newQuota = 0;
-    WebProcess::shared().parentProcessConnection()->sendSync(
+    WebProcess::singleton().parentProcessConnection()->sendSync(
         Messages::WebPageProxy::ReachedApplicationCacheOriginQuota(origin->databaseIdentifier(), currentQuota, totalBytesNeeded),
         Messages::WebPageProxy::ReachedApplicationCacheOriginQuota::Reply(newQuota), m_page->pageID(), std::chrono::milliseconds::max(), syncSendFlags);
 
@@ -1053,7 +1054,7 @@ void WebChromeClient::setPageActivityState(PageActivityState::Flags activityStat
 bool WebChromeClient::wrapCryptoKey(const Vector<uint8_t>& key, Vector<uint8_t>& wrappedKey) const
 {
     bool succeeded;
-    if (!WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebPageProxy::WrapCryptoKey(key), Messages::WebPageProxy::WrapCryptoKey::Reply(succeeded, wrappedKey), m_page->pageID()))
+    if (!WebProcess::singleton().parentProcessConnection()->sendSync(Messages::WebPageProxy::WrapCryptoKey(key), Messages::WebPageProxy::WrapCryptoKey::Reply(succeeded, wrappedKey), m_page->pageID()))
         return false;
     return succeeded;
 }
@@ -1061,7 +1062,7 @@ bool WebChromeClient::wrapCryptoKey(const Vector<uint8_t>& key, Vector<uint8_t>&
 bool WebChromeClient::unwrapCryptoKey(const Vector<uint8_t>& wrappedKey, Vector<uint8_t>& key) const
 {
     bool succeeded;
-    if (!WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebPageProxy::UnwrapCryptoKey(wrappedKey), Messages::WebPageProxy::UnwrapCryptoKey::Reply(succeeded, key), m_page->pageID()))
+    if (!WebProcess::singleton().parentProcessConnection()->sendSync(Messages::WebPageProxy::UnwrapCryptoKey(wrappedKey), Messages::WebPageProxy::UnwrapCryptoKey::Reply(succeeded, key), m_page->pageID()))
         return false;
     return succeeded;
 }
@@ -1082,7 +1083,7 @@ void WebChromeClient::handleSelectionServiceClick(WebCore::FrameSelection& selec
 
 bool WebChromeClient::hasRelevantSelectionServices(bool isTextOnly) const
 {
-    return (isTextOnly && WebProcess::shared().hasSelectionServices()) || WebProcess::shared().hasRichContentServices();
+    return (isTextOnly && WebProcess::singleton().hasSelectionServices()) || WebProcess::singleton().hasRichContentServices();
 }
 #endif
 
index b779182162dfa8c2e44606cd1b2afc4e5456fe1e..15854aec0b9b1ea4db89a2605c89396879e62bb5 100644 (file)
@@ -43,7 +43,7 @@ WebColorChooser::WebColorChooser(WebPage* page, ColorChooserClient* client, cons
     , m_page(page)
 {
     m_page->setActiveColorChooser(this);
-    WebProcess::shared().parentProcessConnection()->send(Messages::WebPageProxy::ShowColorPicker(initialColor, client->elementRectRelativeToRootView()), m_page->pageID());
+    WebProcess::singleton().parentProcessConnection()->send(Messages::WebPageProxy::ShowColorPicker(initialColor, client->elementRectRelativeToRootView()), m_page->pageID());
 }
 
 WebColorChooser::~WebColorChooser()
@@ -75,7 +75,7 @@ void WebColorChooser::reattachColorChooser(const Color& color)
     m_page->setActiveColorChooser(this);
 
     ASSERT(m_colorChooserClient);
-    WebProcess::shared().parentProcessConnection()->send(Messages::WebPageProxy::ShowColorPicker(color, m_colorChooserClient->elementRectRelativeToRootView()), m_page->pageID());
+    WebProcess::singleton().parentProcessConnection()->send(Messages::WebPageProxy::ShowColorPicker(color, m_colorChooserClient->elementRectRelativeToRootView()), m_page->pageID());
 }
 
 void WebColorChooser::setSelectedColor(const Color& color)
@@ -86,7 +86,7 @@ void WebColorChooser::setSelectedColor(const Color& color)
     if (m_page->activeColorChooser() != this)
         return;
 
-    WebProcess::shared().parentProcessConnection()->send(Messages::WebPageProxy::SetColorPickerColor(color), m_page->pageID());
+    WebProcess::singleton().parentProcessConnection()->send(Messages::WebPageProxy::SetColorPickerColor(color), m_page->pageID());
 }
 
 void WebColorChooser::endChooser()
@@ -94,7 +94,7 @@ void WebColorChooser::endChooser()
     if (!m_page)
         return;
 
-    WebProcess::shared().parentProcessConnection()->send(Messages::WebPageProxy::EndColorPicker(), m_page->pageID());
+    WebProcess::singleton().parentProcessConnection()->send(Messages::WebPageProxy::EndColorPicker(), m_page->pageID());
 }
 
 } // namespace WebKit
index 526ac573aeb7f893f096dbb31bb690145881f486..34afbbadfdb4d986f5f7ca3dcdda4703ffe7926f 100644 (file)
@@ -88,7 +88,7 @@ bool WebEditorClient::isSelectTrailingWhitespaceEnabled()
 
 bool WebEditorClient::isContinuousSpellCheckingEnabled()
 {
-    return WebProcess::shared().textCheckerState().isContinuousSpellCheckingEnabled;
+    return WebProcess::singleton().textCheckerState().isContinuousSpellCheckingEnabled;
 }
 
 void WebEditorClient::toggleContinuousSpellChecking()
@@ -98,7 +98,7 @@ void WebEditorClient::toggleContinuousSpellChecking()
 
 bool WebEditorClient::isGrammarCheckingEnabled()
 {
-    return WebProcess::shared().textCheckerState().isGrammarCheckingEnabled;
+    return WebProcess::singleton().textCheckerState().isGrammarCheckingEnabled;
 }
 
 void WebEditorClient::toggleGrammarChecking()
diff --git