| 1 | /* |
| 2 | * Copyright (C) 2010, 2013 Apple Inc. All rights reserved. |
| 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 | * 1. Redistributions of source code must retain the above copyright |
| 8 | * notice, this list of conditions and the following disclaimer. |
| 9 | * 2. Redistributions in binary form must reproduce the above copyright |
| 10 | * notice, this list of conditions and the following disclaimer in the |
| 11 | * documentation and/or other materials provided with the distribution. |
| 12 | * |
| 13 | * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' |
| 14 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, |
| 15 | * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
| 16 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS |
| 17 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
| 18 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
| 19 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
| 20 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
| 21 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
| 22 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF |
| 23 | * THE POSSIBILITY OF SUCH DAMAGE. |
| 24 | */ |
| 25 | |
| 26 | #pragma once |
| 27 | |
| 28 | #include <pal/LogMacros.h> |
| 29 | #include <wtf/Assertions.h> |
| 30 | #include <wtf/text/WTFString.h> |
| 31 | |
| 32 | #if !LOG_DISABLED || !RELEASE_LOG_DISABLED |
| 33 | |
| 34 | #ifndef LOG_CHANNEL_PREFIX |
| 35 | #define LOG_CHANNEL_PREFIX WebKit2Log |
| 36 | #endif |
| 37 | |
| 38 | #ifdef __cplusplus |
| 39 | extern "C" { |
| 40 | #endif |
| 41 | |
| 42 | #define WEBKIT2_LOG_CHANNELS(M) \ |
| 43 | M(AdClickAttribution) \ |
| 44 | M(Automation) \ |
| 45 | M(AutomationInteractions) \ |
| 46 | M(ActivityState) \ |
| 47 | M(BackForward) \ |
| 48 | M(CacheStorage) \ |
| 49 | M(ContentObservation) \ |
| 50 | M(ContextMenu) \ |
| 51 | M(DiskPersistency) \ |
| 52 | M(DragAndDrop) \ |
| 53 | M(Fullscreen) \ |
| 54 | M(Gamepad) \ |
| 55 | M(IconDatabase) \ |
| 56 | M(IndexedDB) \ |
| 57 | M(IPC) \ |
| 58 | M(KeyHandling) \ |
| 59 | M(Layers) \ |
| 60 | M(Layout) \ |
| 61 | M(Loading) \ |
| 62 | M(LocalStorageDatabaseTracker) \ |
| 63 | M(MouseHandling) \ |
| 64 | M(Network) \ |
| 65 | M(NetworkCache) \ |
| 66 | M(NetworkCacheSpeculativePreloading) \ |
| 67 | M(NetworkCacheStorage) \ |
| 68 | M(NetworkScheduling) \ |
| 69 | M(NetworkSession) \ |
| 70 | M(PerformanceLogging) \ |
| 71 | M(Plugins) \ |
| 72 | M(Printing) \ |
| 73 | M(Process) \ |
| 74 | M(ProcessSuspension) \ |
| 75 | M(ProcessSwapping) \ |
| 76 | M(ProximityNetworking) \ |
| 77 | M(RemoteLayerTree) \ |
| 78 | M(Resize) \ |
| 79 | M(ResourceLoadStatistics) \ |
| 80 | M(ResourceLoadStatisticsDebug) \ |
| 81 | M(Scrolling) \ |
| 82 | M(Selection) \ |
| 83 | M(ServiceWorker) \ |
| 84 | M(SessionState) \ |
| 85 | M(StorageAPI) \ |
| 86 | M(TextInput) \ |
| 87 | M(ViewGestures) \ |
| 88 | M(ViewState) \ |
| 89 | M(ViewportSizing) \ |
| 90 | M(VirtualMemory) \ |
| 91 | M(VisibleRects) \ |
| 92 | M(WebGL) \ |
| 93 | M(WebRTC) \ |
| 94 | |
| 95 | WEBKIT2_LOG_CHANNELS(DECLARE_LOG_CHANNEL) |
| 96 | |
| 97 | #undef DECLARE_LOG_CHANNEL |
| 98 | |
| 99 | namespace WebKit { |
| 100 | WTFLogChannel* getLogChannel(const String&); |
| 101 | } // namespace WebKit |
| 102 | |
| 103 | #ifdef __cplusplus |
| 104 | } |
| 105 | #endif |
| 106 | |
| 107 | #endif // !LOG_DISABLED || !RELEASE_LOG_DISABLED |
| 108 | |
| 109 | |