<rdar://problem/
16735665> and https://bugs.webkit.org/show_bug.cgi?id=132410
Reviewed by Tim Horton.
Add a lightweight class that lazily polls the appropriate APIs for whether or not appropriate services
are installed and usable on the system:
* UIProcess/mac/ServicesController.h: Added.
(WebKit::ServicesController::imageServicesExist):
(WebKit::ServicesController::selectionServicesExist):
* UIProcess/mac/ServicesController.mm: Added.
(WebKit::ServicesController::shared):
(WebKit::ServicesController::ServicesController):
(WebKit::ServicesController::refreshExistingServices):
(WebKit::ServicesController::refreshExistingServicesTimerFired):
Add "image services exist" and "selection services exist" parameters:
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/WebContext.cpp:
(WebKit::WebContext::createNewWebProcess):
(WebKit::WebContext::refreshExistingServices): Called when the context menu proxy realizes that
services no longer exist.
* UIProcess/WebContext.h:
Each WebProcess hangs on to its own copy of the flags for whether or not the services exist:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess):
(WebKit::WebProcess::initializeWebProcess):
(WebKit::WebProcess::setEnabledServices):
* WebProcess/WebProcess.h:
(WebKit::WebProcess::imageServicesExist):
(WebKit::WebProcess::selectionServicesExist):
* UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::WebContextMenuProxyMac::setupServicesMenu): If the menu creation failed, the set of services
on the system must have changed. So ask the WebContext to refresh them.
* WebProcess/WebPage/SelectionOverlayController.cpp:
(WebKit::SelectionOverlayController::selectionRectsDidChange): If services don't exist, don't create an
overlay (and destroy any existing overlay!)
* WebProcess/WebPage/mac/SelectionOverlayControllerMac.mm:
(WebKit::SelectionOverlayController::drawRect): If services don't exist, don't draw, and destroy the overlay.
* WebProcess/WebProcess.messages.in:
* WebKit2.xcodeproj/project.pbxproj:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@168074
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2014-04-30 Brady Eidson <beidson@apple.com>
+
+ If there are no services available, do not show the service controls UI
+ <rdar://problem/16735665> and https://bugs.webkit.org/show_bug.cgi?id=132410
+
+ Reviewed by Tim Horton.
+
+ Add a lightweight class that lazily polls the appropriate APIs for whether or not appropriate services
+ are installed and usable on the system:
+ * UIProcess/mac/ServicesController.h: Added.
+ (WebKit::ServicesController::imageServicesExist):
+ (WebKit::ServicesController::selectionServicesExist):
+ * UIProcess/mac/ServicesController.mm: Added.
+ (WebKit::ServicesController::shared):
+ (WebKit::ServicesController::ServicesController):
+ (WebKit::ServicesController::refreshExistingServices):
+ (WebKit::ServicesController::refreshExistingServicesTimerFired):
+
+ Add "image services exist" and "selection services exist" parameters:
+ * Shared/WebProcessCreationParameters.cpp:
+ (WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
+ (WebKit::WebProcessCreationParameters::encode):
+ (WebKit::WebProcessCreationParameters::decode):
+ * Shared/WebProcessCreationParameters.h:
+
+ * UIProcess/WebContext.cpp:
+ (WebKit::WebContext::createNewWebProcess):
+ (WebKit::WebContext::refreshExistingServices): Called when the context menu proxy realizes that
+ services no longer exist.
+ * UIProcess/WebContext.h:
+
+ Each WebProcess hangs on to its own copy of the flags for whether or not the services exist:
+ * WebProcess/WebProcess.cpp:
+ (WebKit::WebProcess::WebProcess):
+ (WebKit::WebProcess::initializeWebProcess):
+ (WebKit::WebProcess::setEnabledServices):
+ * WebProcess/WebProcess.h:
+ (WebKit::WebProcess::imageServicesExist):
+ (WebKit::WebProcess::selectionServicesExist):
+
+ * UIProcess/mac/WebContextMenuProxyMac.mm:
+ (WebKit::WebContextMenuProxyMac::setupServicesMenu): If the menu creation failed, the set of services
+ on the system must have changed. So ask the WebContext to refresh them.
+
+ * WebProcess/WebPage/SelectionOverlayController.cpp:
+ (WebKit::SelectionOverlayController::selectionRectsDidChange): If services don't exist, don't create an
+ overlay (and destroy any existing overlay!)
+
+ * WebProcess/WebPage/mac/SelectionOverlayControllerMac.mm:
+ (WebKit::SelectionOverlayController::drawRect): If services don't exist, don't draw, and destroy the overlay.
+
+ * WebProcess/WebProcess.messages.in:
+ * WebKit2.xcodeproj/project.pbxproj:
+
2014-04-30 Gavin Barraclough <baraclough@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=132415
, usesNetworkProcess(false)
#endif
, memoryCacheDisabled(false)
+#if ENABLE(SERVICE_CONTROLS)
+ , hasImageServices(false)
+ , hasSelectionServices(false)
+#endif
{
}
encoder << plugInAutoStartOriginHashes;
encoder << plugInAutoStartOrigins;
encoder << memoryCacheDisabled;
+
+#if ENABLE(SERVICE_CONTROLS)
+ encoder << hasImageServices;
+ encoder << hasSelectionServices;
+#endif
}
bool WebProcessCreationParameters::decode(IPC::ArgumentDecoder& decoder, WebProcessCreationParameters& parameters)
if (!decoder.decode(parameters.memoryCacheDisabled))
return false;
+#if ENABLE(SERVICE_CONTROLS)
+ if (!decoder.decode(parameters.hasImageServices))
+ return false;
+ if (!decoder.decode(parameters.hasSelectionServices))
+ return false;
+#endif
+
return true;
}
Vector<String> plugInAutoStartOrigins;
bool memoryCacheDisabled;
+
+#if ENABLE(SERVICE_CONTROLS)
+ bool hasImageServices;
+ bool hasSelectionServices;
+#endif
};
} // namespace WebKit
#include "NetworkProcessProxy.h"
#endif
+#if ENABLE(SERVICE_CONTROLS)
+#include "ServicesController.h"
+#endif
+
#if ENABLE(CUSTOM_PROTOCOLS)
#include "CustomProtocolManagerMessages.h"
#endif
parameters.memoryCacheDisabled = m_memoryCacheDisabled;
+#if ENABLE(SERVICE_CONTROLS)
+ parameters.hasImageServices = ServicesController::shared().hasImageServices();
+ parameters.hasSelectionServices = ServicesController::shared().hasSelectionServices();
+ ServicesController::shared().refreshExistingServices(this);
+#endif
+
// Add any platform specific parameters
platformInitializeWebProcess(parameters);
request->completedRequest(requestID, statisticsData);
}
+
+#if ENABLE(SERVICE_CONTROLS)
+void WebContext::refreshExistingServices()
+{
+ ServicesController::shared().refreshExistingServices(this);
+}
+#endif
+
void WebContext::garbageCollectJavaScriptObjects()
{
void setMemoryCacheDisabled(bool);
+#if ENABLE(SERVICE_CONTROLS)
+ void refreshExistingServices();
+#endif
+
private:
void platformInitialize();
#endif
void didGetStatistics(const StatisticsData&, uint64_t callbackID);
-
+
// Implemented in generated WebContextMessageReceiver.cpp
void didReceiveWebContextMessage(IPC::Connection*, IPC::MessageDecoder&);
void didReceiveSyncWebContextMessage(IPC::Connection*, IPC::MessageDecoder&, std::unique_ptr<IPC::MessageEncoder>&);
--- /dev/null
+/*
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef ServicesController_h
+#define ServicesController_h
+
+#if ENABLE(SERVICE_CONTROLS)
+
+#include <wtf/HashSet.h>
+#include <wtf/Noncopyable.h>
+#include <wtf/RefPtr.h>
+#include <wtf/RunLoop.h>
+
+namespace WebKit {
+
+class WebContext;
+
+class ServicesController {
+ WTF_MAKE_NONCOPYABLE(ServicesController);
+ friend class NeverDestroyed<ServicesController>;
+public:
+ static ServicesController& shared();
+
+ bool hasImageServices() const { return m_hasImageServices; }
+ bool hasSelectionServices() const { return m_hasSelectionServices; }
+
+ void refreshExistingServices(WebContext*);
+
+private:
+ ServicesController();
+
+ void refreshExistingServicesTimerFired();
+
+ RunLoop::Timer<ServicesController> m_refreshExistingServicesTimer;
+
+ bool m_hasImageServices;
+ bool m_hasSelectionServices;
+
+ HashSet<RefPtr<WebContext>> m_contextsToNotify;
+};
+
+} // namespace WebKit
+
+#endif // ENABLE(SERVICE_CONTROLS)
+#endif // ServicesController_h
--- /dev/null
+/*
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "config.h"
+#import "ServicesController.h"
+
+#if ENABLE(SERVICE_CONTROLS)
+
+#import "WebContext.h"
+#import "WebProcessMessages.h"
+#import <wtf/NeverDestroyed.h>
+
+#if __has_include(<AppKit/NSSharingService_Private.h>)
+#import <AppKit/NSSharingService_Private.h>
+#else
+typedef enum {
+ NSSharingServicePickerStyleMenu = 0,
+ NSSharingServicePickerStyleRollover = 1,
+ NSSharingServicePickerStyleTextSelection = 2,
+ NSSharingServicePickerStyleDataDetector = 3
+} NSSharingServicePickerStyle;
+
+@interface NSSharingServicePicker (Details)
+@property NSSharingServicePickerStyle style;
+- (NSMenu *)menu;
+@end
+#endif
+
+namespace WebKit {
+
+ServicesController& ServicesController::shared()
+{
+ static NeverDestroyed<ServicesController> sharedController;
+ return sharedController;
+}
+
+ServicesController::ServicesController()
+ : m_refreshExistingServicesTimer(RunLoop::main(), this, &ServicesController::refreshExistingServicesTimerFired)
+ , m_hasImageServices(false)
+ , m_hasSelectionServices(false)
+{
+ m_refreshExistingServicesTimer.startOneShot(0);
+}
+
+void ServicesController::refreshExistingServices(WebContext* context)
+{
+ ASSERT(context);
+
+ m_contextsToNotify.add(context);
+ m_refreshExistingServicesTimer.startOneShot(0);
+}
+
+void ServicesController::refreshExistingServicesTimerFired()
+{
+ static NeverDestroyed<NSImage *> image([[NSImage alloc] init]);
+ RetainPtr<NSSharingServicePicker> picker = adoptNS([[NSSharingServicePicker alloc] initWithItems:@[ image ]]);
+ [picker setStyle:NSSharingServicePickerStyleRollover];
+
+ bool hasImageServices = picker.get().menu;
+
+ static NeverDestroyed<NSAttributedString *> attributedString([[NSAttributedString alloc] initWithString:@"a"]);
+ picker = adoptNS([[NSSharingServicePicker alloc] initWithItems:@[ attributedString ]]);
+ [picker setStyle:NSSharingServicePickerStyleTextSelection];
+
+ bool hasSelectionServices = picker.get().menu;
+
+ bool notifyContexts = (hasImageServices != m_hasImageServices) || (hasSelectionServices != m_hasSelectionServices);
+ m_hasSelectionServices = hasSelectionServices;
+ m_hasImageServices = hasImageServices;
+
+ if (notifyContexts) {
+ for (const RefPtr<WebContext>& context : m_contextsToNotify)
+ context->sendToAllProcesses(Messages::WebProcess::SetEnabledServices(m_hasImageServices, m_hasSelectionServices));
+ }
+
+ m_contextsToNotify.clear();
+}
+
+} // namespace WebKit
+
+#endif // ENABLE(SERVICE_CONTROLS)
#import "PageClientImpl.h"
#import "ShareableBitmap.h"
#import "StringUtilities.h"
+#import "WebContext.h"
#import "WebContextMenuItemData.h"
+#import "WebProcessProxy.h"
#import "WKView.h"
#import <WebCore/GraphicsContext.h>
#import <WebCore/IntRect.h>
[[WKSharingServicePickerDelegate sharedSharingServicePickerDelegate] setIncludeEditorServices:includeEditorServices];
m_servicesMenu = [picker menu];
+
+ // If there is no services menu, then the existing services on the system have changed.
+ // Ask the UIProcess to refresh that list of services.
+ // If <rdar://problem/16776831> is resolved then we can more accurately keep the list up to date without this call.
+ if (!m_servicesMenu)
+ m_page->process().context().refreshExistingServices();
}
void WebContextMenuProxyMac::clearServicesMenu()
513A164C1630A9BF005D7D22 /* NetworkConnectionToWebProcess.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 513A16491630A9BF005D7D22 /* NetworkConnectionToWebProcess.cpp */; };
513A164D1630A9BF005D7D22 /* NetworkConnectionToWebProcess.h in Headers */ = {isa = PBXBuildFile; fileRef = 513A164A1630A9BF005D7D22 /* NetworkConnectionToWebProcess.h */; };
514BDED316C98EDD00E4E25E /* StatisticsRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 514BDED216C98EDD00E4E25E /* StatisticsRequest.h */; };
+ 514D9F5719119D35000063A7 /* ServicesController.h in Headers */ = {isa = PBXBuildFile; fileRef = 514D9F5519119D35000063A7 /* ServicesController.h */; };
+ 514D9F5819119D35000063A7 /* ServicesController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 514D9F5619119D35000063A7 /* ServicesController.mm */; };
5153569C1291B1D2000749DC /* WebPageContextMenuClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5153569A1291B1D2000749DC /* WebPageContextMenuClient.cpp */; };
5153569D1291B1D2000749DC /* WebPageContextMenuClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 5153569B1291B1D2000749DC /* WebPageContextMenuClient.h */; };
51578B831209ECEF00A37C4A /* APIData.h in Headers */ = {isa = PBXBuildFile; fileRef = 51578B821209ECEF00A37C4A /* APIData.h */; };
513A164A1630A9BF005D7D22 /* NetworkConnectionToWebProcess.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NetworkConnectionToWebProcess.h; path = NetworkProcess/NetworkConnectionToWebProcess.h; sourceTree = "<group>"; };
513A164B1630A9BF005D7D22 /* NetworkConnectionToWebProcess.messages.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = NetworkConnectionToWebProcess.messages.in; path = NetworkProcess/NetworkConnectionToWebProcess.messages.in; sourceTree = "<group>"; };
514BDED216C98EDD00E4E25E /* StatisticsRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StatisticsRequest.h; sourceTree = "<group>"; };
+ 514D9F5519119D35000063A7 /* ServicesController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ServicesController.h; sourceTree = "<group>"; };
+ 514D9F5619119D35000063A7 /* ServicesController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ServicesController.mm; sourceTree = "<group>"; };
5153569A1291B1D2000749DC /* WebPageContextMenuClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebPageContextMenuClient.cpp; sourceTree = "<group>"; };
5153569B1291B1D2000749DC /* WebPageContextMenuClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebPageContextMenuClient.h; sourceTree = "<group>"; };
51578B821209ECEF00A37C4A /* APIData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APIData.h; sourceTree = "<group>"; };
E18E6909169B563F009B6670 /* SecItemShimProxy.cpp */,
E18E690A169B563F009B6670 /* SecItemShimProxy.h */,
E18E690D169B57DF009B6670 /* SecItemShimProxy.messages.in */,
+ 514D9F5519119D35000063A7 /* ServicesController.h */,
+ 514D9F5619119D35000063A7 /* ServicesController.mm */,
1AA417ED12C00D87002BE67B /* TextCheckerMac.mm */,
1AF05D8514688348008B1E81 /* TiledCoreAnimationDrawingAreaProxy.h */,
1AF05D8414688348008B1E81 /* TiledCoreAnimationDrawingAreaProxy.mm */,
BC032DAB10F437D10058C15A /* Connection.h in Headers */,
5136183E163126DA00A99DDE /* ConnectionStack.h in Headers */,
1AC1415118AC47EE006C602C /* WKWebViewConfigurationPrivate.h in Headers */,
+ 514D9F5719119D35000063A7 /* ServicesController.h in Headers */,
CDC3830C17212282008A2FC3 /* CookieStorageShimLibrary.h in Headers */,
515E7730184015800007203F /* UniqueIDBDatabase.h in Headers */,
B878B615133428DC006888E9 /* CorrectionPanel.h in Headers */,
BC111A5D112F4FBB00337BAB /* WebDragClient.cpp in Sources */,
C574A37712E6099D002DFE98 /* WebDragClientMac.mm in Sources */,
BCA0EFA012332642007D3CFB /* WebEditCommandProxy.cpp in Sources */,
+ 514D9F5819119D35000063A7 /* ServicesController.mm in Sources */,
BC111A5E112F4FBB00337BAB /* WebEditorClient.cpp in Sources */,
C5237F6012441CA300780472 /* WebEditorClientMac.mm in Sources */,
BC575613126E0138006F0F12 /* APIError.cpp in Sources */,
#if ENABLE(SERVICE_CONTROLS)
#include "WebPage.h"
+#include "WebProcess.h"
#include <WebCore/NotImplemented.h>
using namespace WebCore;
m_currentSelectionRects = rects;
- if (m_currentSelectionRects.isEmpty())
- destroyOverlay();
- else
+ if (WebProcess::shared().hasSelectionServices() && !m_currentSelectionRects.isEmpty())
createOverlayIfNeeded();
+ else
+ destroyOverlay();
+
#else
UNUSED_PARAM(rects);
#endif
#if ENABLE(SERVICE_CONTROLS)
+#import "WebProcess.h"
#import <WebCore/FrameView.h>
#import <WebCore/GraphicsContext.h>
#import <WebCore/MainFrame.h>
if (m_currentSelectionRects.isEmpty())
return;
+ if (!WebProcess::shared().hasSelectionServices()) {
+ destroyOverlay();
+ return;
+ }
+
if (!m_currentHighlight) {
Vector<CGRect> cgRects;
cgRects.reserveCapacity(m_currentSelectionRects.size());
#if ENABLE(NETSCAPE_PLUGIN_API)
, m_pluginProcessConnectionManager(PluginProcessConnectionManager::create())
#endif
+#if ENABLE(SERVICE_CONTROLS)
+ , m_hasImageServices(false)
+ , m_hasSelectionServices(false)
+#endif
, m_nonVisibleProcessCleanupTimer(this, &WebProcess::nonVisibleProcessCleanupTimerFired)
{
// Initialize our platform strategies.
m_plugInAutoStartOrigins.add(parameters.plugInAutoStartOrigins[i]);
setMemoryCacheDisabled(parameters.memoryCacheDisabled);
+
+#if ENABLE(SERVICE_CONTROLS)
+ setEnabledServices(parameters.hasImageServices, parameters.hasSelectionServices);
+#endif
}
#if ENABLE(NETWORK_PROCESS)
memoryCache()->setDisabled(disabled);
}
+#if ENABLE(SERVICE_CONTROLS)
+void WebProcess::setEnabledServices(bool hasImageServices, bool hasSelectionServices)
+{
+ m_hasImageServices = hasImageServices;
+ m_hasSelectionServices = hasSelectionServices;
+}
+#endif
+
} // namespace WebKit
RefPtr<API::Object> apiObjectByConvertingFromHandles(API::Object*);
+#if ENABLE(SERVICE_CONTROLS)
+ bool hasImageServices() const { return m_hasImageServices; }
+ bool hasSelectionServices() const { return m_hasSelectionServices; }
+#endif
+
private:
WebProcess();
void setMemoryCacheDisabled(bool);
+#if ENABLE(SERVICE_CONTROLS)
+ void setEnabledServices(bool hasImageServices, bool hasSelectionServices);
+#endif
+
void postInjectedBundleMessage(const IPC::DataReference& messageData);
void setInjectedBundleParameter(const String& key, const IPC::DataReference&);
RefPtr<PluginProcessConnectionManager> m_pluginProcessConnectionManager;
#endif
+#if ENABLE(SERVICE_CONTROLS)
+ bool m_hasImageServices;
+ bool m_hasSelectionServices;
+#endif
+
HashSet<uint64_t> m_pagesInWindows;
WebCore::Timer<WebProcess> m_nonVisibleProcessCleanupTimer;
};
#endif
SetMemoryCacheDisabled(bool disabled);
+
+#if ENABLE(SERVICE_CONTROLS)
+ SetEnabledServices(bool hasImageServices, bool hasSelectionServices)
+#endif
}