ddkilzer@apple.com | 8b32f3f | 2009-04-27 23:06:46 +0000 | [diff] [blame] | 1 | /* |
aestes@apple.com | ed8cafe | 2017-05-16 06:06:58 +0000 | [diff] [blame] | 2 | * Copyright (C) 2009-2017 Apple Inc. All rights reserved. |
ddkilzer@apple.com | 8b32f3f | 2009-04-27 23:06:46 +0000 | [diff] [blame] | 3 | * |
| 4 | * Redistribution and use in source and binary forms, with or without |
| 5 | * modification, are permitted provided that the following conditions |
| 6 | * are met: |
| 7 | * |
| 8 | * 1. Redistributions of source code must retain the above copyright |
| 9 | * notice, this list of conditions and the following disclaimer. |
| 10 | * 2. Redistributions in binary form must reproduce the above copyright |
| 11 | * notice, this list of conditions and the following disclaimer in the |
| 12 | * documentation and/or other materials provided with the distribution. |
| 13 | * |
| 14 | * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY |
| 15 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
| 16 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
| 17 | * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY |
| 18 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
| 19 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
| 20 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
| 21 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
| 23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 24 | */ |
| 25 | |
aestes@apple.com | ed8cafe | 2017-05-16 06:06:58 +0000 | [diff] [blame] | 26 | #pragma once |
ddkilzer@apple.com | 8b32f3f | 2009-04-27 23:06:46 +0000 | [diff] [blame] | 27 | |
cdumez@apple.com | b35e2be | 2016-03-04 06:00:02 +0000 | [diff] [blame] | 28 | #include <wtf/Forward.h> |
| 29 | |
ddkilzer@apple.com | 8b32f3f | 2009-04-27 23:06:46 +0000 | [diff] [blame] | 30 | namespace WebCore { |
| 31 | |
aestes@apple.com | ed8cafe | 2017-05-16 06:06:58 +0000 | [diff] [blame] | 32 | WEBCORE_EXPORT void setPresentingApplicationPID(int); |
| 33 | WEBCORE_EXPORT int presentingApplicationPID(); |
| 34 | |
rniwa@webkit.org | 568c834 | 2017-12-12 06:30:34 +0000 | [diff] [blame] | 35 | #if PLATFORM(WIN) |
| 36 | inline bool isInWebProcess() { return false; } |
jbedard@apple.com | e1c948c | 2018-07-03 16:50:57 +0000 | [diff] [blame] | 37 | #elif !PLATFORM(COCOA) |
| 38 | inline bool isInWebProcess() { return true; } |
rniwa@webkit.org | 568c834 | 2017-12-12 06:30:34 +0000 | [diff] [blame] | 39 | #endif |
| 40 | |
aestes@apple.com | ed8cafe | 2017-05-16 06:06:58 +0000 | [diff] [blame] | 41 | #if PLATFORM(COCOA) |
| 42 | |
jbedard@apple.com | e1c948c | 2018-07-03 16:50:57 +0000 | [diff] [blame] | 43 | bool isInWebProcess(); |
achristensen@apple.com | 66b119e | 2019-10-04 19:33:00 +0000 | [diff] [blame] | 44 | bool isInNetworkProcess(); |
jbedard@apple.com | e1c948c | 2018-07-03 16:50:57 +0000 | [diff] [blame] | 45 | |
achristensen@apple.com | 84fc952 | 2018-08-01 03:57:07 +0000 | [diff] [blame] | 46 | WEBCORE_EXPORT void setApplicationSDKVersion(uint32_t); |
commit-queue@webkit.org | c9914a4 | 2019-08-09 20:20:49 +0000 | [diff] [blame] | 47 | WEBCORE_EXPORT uint32_t applicationSDKVersion(); |
achristensen@apple.com | 84fc952 | 2018-08-01 03:57:07 +0000 | [diff] [blame] | 48 | |
cdumez@apple.com | b35e2be | 2016-03-04 06:00:02 +0000 | [diff] [blame] | 49 | WEBCORE_EXPORT void setApplicationBundleIdentifier(const String&); |
pvollan@apple.com | 8ee789b | 2020-01-06 16:03:44 +0000 | [diff] [blame] | 50 | WEBCORE_EXPORT String applicationBundleIdentifier(); |
ddkilzer@apple.com | 8b32f3f | 2009-04-27 23:06:46 +0000 | [diff] [blame] | 51 | |
cdumez@apple.com | 0b0e88f | 2016-03-06 03:28:54 +0000 | [diff] [blame] | 52 | #if PLATFORM(MAC) |
| 53 | |
| 54 | namespace MacApplication { |
| 55 | |
| 56 | WEBCORE_EXPORT bool isAOLInstantMessenger(); |
| 57 | WEBCORE_EXPORT bool isAdobeInstaller(); |
| 58 | WEBCORE_EXPORT bool isAperture(); |
| 59 | WEBCORE_EXPORT bool isAppleMail(); |
| 60 | WEBCORE_EXPORT bool isIBooks(); |
| 61 | WEBCORE_EXPORT bool isITunes(); |
| 62 | WEBCORE_EXPORT bool isMicrosoftMessenger(); |
| 63 | WEBCORE_EXPORT bool isMicrosoftMyDay(); |
| 64 | WEBCORE_EXPORT bool isMicrosoftOutlook(); |
| 65 | bool isQuickenEssentials(); |
| 66 | WEBCORE_EXPORT bool isSafari(); |
| 67 | bool isSolidStateNetworksDownloader(); |
| 68 | WEBCORE_EXPORT bool isVersions(); |
| 69 | WEBCORE_EXPORT bool isHRBlock(); |
cdumez@apple.com | b76ce7b | 2017-02-21 23:25:49 +0000 | [diff] [blame] | 70 | WEBCORE_EXPORT bool isIAdProducer(); |
commit-queue@webkit.org | d5f0db9 | 2019-11-04 18:20:56 +0000 | [diff] [blame] | 71 | WEBCORE_EXPORT bool isEpsonSoftwareUpdater(); |
cdumez@apple.com | 0b0e88f | 2016-03-06 03:28:54 +0000 | [diff] [blame] | 72 | |
| 73 | } // MacApplication |
| 74 | |
| 75 | #endif // PLATFORM(MAC) |
| 76 | |
ap@apple.com | 1e847592 | 2018-10-18 21:38:50 +0000 | [diff] [blame] | 77 | #if PLATFORM(IOS_FAMILY) |
cdumez@apple.com | 0b0e88f | 2016-03-06 03:28:54 +0000 | [diff] [blame] | 78 | |
| 79 | namespace IOSApplication { |
| 80 | |
| 81 | WEBCORE_EXPORT bool isMobileMail(); |
wenson_hsieh@apple.com | 4cbbea3 | 2019-08-27 14:59:32 +0000 | [diff] [blame] | 82 | WEBCORE_EXPORT bool isMailCompositionService(); |
cdumez@apple.com | 0b0e88f | 2016-03-06 03:28:54 +0000 | [diff] [blame] | 83 | WEBCORE_EXPORT bool isMobileSafari(); |
jiewen_tan@apple.com | 19b3fc1 | 2019-09-03 18:56:10 +0000 | [diff] [blame] | 84 | WEBCORE_EXPORT bool isSafariViewService(); |
commit-queue@webkit.org | c9914a4 | 2019-08-09 20:20:49 +0000 | [diff] [blame] | 85 | WEBCORE_EXPORT bool isIMDb(); |
achristensen@apple.com | 6204565 | 2016-07-19 02:02:37 +0000 | [diff] [blame] | 86 | WEBCORE_EXPORT bool isWebBookmarksD(); |
dbates@webkit.org | 4830e01 | 2018-09-28 23:02:41 +0000 | [diff] [blame] | 87 | WEBCORE_EXPORT bool isDumpRenderTree(); |
cdumez@apple.com | 0b0e88f | 2016-03-06 03:28:54 +0000 | [diff] [blame] | 88 | bool isMobileStore(); |
ddkilzer@apple.com | 84e2058 | 2018-04-28 05:53:03 +0000 | [diff] [blame] | 89 | bool isSpringBoard(); |
cdumez@apple.com | 0b0e88f | 2016-03-06 03:28:54 +0000 | [diff] [blame] | 90 | WEBCORE_EXPORT bool isWebProcess(); |
antti@apple.com | 1aad67b | 2018-10-31 15:08:26 +0000 | [diff] [blame] | 91 | WEBCORE_EXPORT bool isIBooks(); |
commit-queue@webkit.org | 8e6a869 | 2017-07-16 21:36:54 +0000 | [diff] [blame] | 92 | bool isIBooksStorytime(); |
wilander@apple.com | 4827ffc | 2016-06-23 16:35:17 +0000 | [diff] [blame] | 93 | WEBCORE_EXPORT bool isTheSecretSocietyHiddenMystery(); |
dbates@webkit.org | 2e7f9fc | 2018-01-17 19:09:21 +0000 | [diff] [blame] | 94 | WEBCORE_EXPORT bool isCardiogram(); |
dbates@webkit.org | 05bd87b | 2018-02-05 20:46:46 +0000 | [diff] [blame] | 95 | WEBCORE_EXPORT bool isNike(); |
achristensen@apple.com | 84fc952 | 2018-08-01 03:57:07 +0000 | [diff] [blame] | 96 | bool isMoviStarPlus(); |
timothy_horton@apple.com | 35b2999 | 2019-01-11 23:30:07 +0000 | [diff] [blame] | 97 | WEBCORE_EXPORT bool isFirefox(); |
wenson_hsieh@apple.com | 5e1df60 | 2019-04-13 03:54:10 +0000 | [diff] [blame] | 98 | WEBCORE_EXPORT bool isAppleApplication(); |
dbates@webkit.org | 57ed60e | 2019-06-21 00:49:14 +0000 | [diff] [blame] | 99 | WEBCORE_EXPORT bool isEvernote(); |
antti@apple.com | 6731255 | 2019-09-11 17:29:25 +0000 | [diff] [blame] | 100 | WEBCORE_EXPORT bool isEventbrite(); |
wenson_hsieh@apple.com | 8738a42 | 2019-09-25 16:01:38 +0000 | [diff] [blame] | 101 | WEBCORE_EXPORT bool isDataActivation(); |
cdumez@apple.com | 0b0e88f | 2016-03-06 03:28:54 +0000 | [diff] [blame] | 102 | |
| 103 | } // IOSApplication |
| 104 | |
ap@apple.com | 1e847592 | 2018-10-18 21:38:50 +0000 | [diff] [blame] | 105 | #endif // PLATFORM(IOS_FAMILY) |
cdumez@apple.com | 0b0e88f | 2016-03-06 03:28:54 +0000 | [diff] [blame] | 106 | |
achristensen@apple.com | 66b119e | 2019-10-04 19:33:00 +0000 | [diff] [blame] | 107 | #else |
| 108 | |
| 109 | inline bool isInNetworkProcess() { return false; } |
| 110 | |
cdumez@apple.com | 0b0e88f | 2016-03-06 03:28:54 +0000 | [diff] [blame] | 111 | #endif // PLATFORM(COCOA) |
| 112 | |
aestes@apple.com | ed8cafe | 2017-05-16 06:06:58 +0000 | [diff] [blame] | 113 | } // namespace WebCore |