Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / Source / platform / Logging.cpp
blobf10e5a624372055473c6d189697ba7fc22dde7bc
1 /*
2 * Copyright (C) 2003, 2006 Apple Computer, Inc. All rights reserved.
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.
13 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 #include "config.h"
27 #include "platform/Logging.h"
29 #include "wtf/text/WTFString.h"
31 #if !LOG_DISABLED
33 namespace blink {
35 WTFLogChannel LogNotYetImplemented = { WTFLogChannelOff };
37 WTFLogChannel LogFrames = { WTFLogChannelOff };
38 WTFLogChannel LogLoading = { WTFLogChannelOff };
39 WTFLogChannel LogPopupBlocking = { WTFLogChannelOff };
40 WTFLogChannel LogEvents = { WTFLogChannelOff };
42 WTFLogChannel LogEditing = { WTFLogChannelOff };
43 WTFLogChannel LogLiveConnect = { WTFLogChannelOff };
44 WTFLogChannel LogIconDatabase = { WTFLogChannelOff };
45 WTFLogChannel LogSQLDatabase = { WTFLogChannelOff };
47 WTFLogChannel LogSpellingAndGrammar = { WTFLogChannelOff };
48 WTFLogChannel LogBackForward = { WTFLogChannelOff };
49 WTFLogChannel LogHistory = { WTFLogChannelOff };
51 WTFLogChannel LogPlatformLeaks = { WTFLogChannelOff };
52 WTFLogChannel LogResourceLoading = { WTFLogChannelOff };
54 WTFLogChannel LogNetwork = { WTFLogChannelOff };
55 WTFLogChannel LogFTP = { WTFLogChannelOff };
56 WTFLogChannel LogThreading = { WTFLogChannelOff };
57 WTFLogChannel LogStorageAPI = { WTFLogChannelOff };
59 WTFLogChannel LogMedia = { WTFLogChannelOff };
60 WTFLogChannel LogPlugins = { WTFLogChannelOff };
61 WTFLogChannel LogArchives = { WTFLogChannelOff };
62 WTFLogChannel LogProgress = { WTFLogChannelOff };
64 WTFLogChannel LogFileAPI = { WTFLogChannelOff };
66 WTFLogChannel LogWebAudio = { WTFLogChannelOff };
67 WTFLogChannel LogCompositing = { WTFLogChannelOff };
68 WTFLogChannel LogGamepad = { WTFLogChannelOff };
70 WTFLogChannel LogScriptedAnimationController = { WTFLogChannelOff };
71 WTFLogChannel LogTimers = { WTFLogChannelOff };
73 WTFLogChannel* getChannelFromName(const String& channelName)
75 if (!(channelName.length() >= 2))
76 return 0;
78 if (equalIgnoringCase(channelName, String("BackForward")))
79 return &LogBackForward;
81 if (equalIgnoringCase(channelName, String("Editing")))
82 return &LogEditing;
84 if (equalIgnoringCase(channelName, String("Events")))
85 return &LogEvents;
87 if (equalIgnoringCase(channelName, String("Frames")))
88 return &LogFrames;
90 if (equalIgnoringCase(channelName, String("FTP")))
91 return &LogFTP;
93 if (equalIgnoringCase(channelName, String("History")))
94 return &LogHistory;
96 if (equalIgnoringCase(channelName, String("IconDatabase")))
97 return &LogIconDatabase;
99 if (equalIgnoringCase(channelName, String("Loading")))
100 return &LogLoading;
102 if (equalIgnoringCase(channelName, String("Media")))
103 return &LogMedia;
105 if (equalIgnoringCase(channelName, String("Network")))
106 return &LogNetwork;
108 if (equalIgnoringCase(channelName, String("NotYetImplemented")))
109 return &LogNotYetImplemented;
111 if (equalIgnoringCase(channelName, String("PlatformLeaks")))
112 return &LogPlatformLeaks;
114 if (equalIgnoringCase(channelName, String("ResourceLoading")))
115 return &LogResourceLoading;
117 if (equalIgnoringCase(channelName, String("Plugins")))
118 return &LogPlugins;
120 if (equalIgnoringCase(channelName, String("PopupBlocking")))
121 return &LogPopupBlocking;
123 if (equalIgnoringCase(channelName, String("Progress")))
124 return &LogProgress;
126 if (equalIgnoringCase(channelName, String("SpellingAndGrammar")))
127 return &LogSpellingAndGrammar;
129 if (equalIgnoringCase(channelName, String("SQLDatabase")))
130 return &LogSQLDatabase;
132 if (equalIgnoringCase(channelName, String("StorageAPI")))
133 return &LogStorageAPI;
135 if (equalIgnoringCase(channelName, String("LiveConnect")))
136 return &LogLiveConnect;
138 if (equalIgnoringCase(channelName, String("Threading")))
139 return &LogThreading;
141 if (equalIgnoringCase(channelName, String("FileAPI")))
142 return &LogFileAPI;
144 if (equalIgnoringCase(channelName, String("WebAudio")))
145 return &LogWebAudio;
147 if (equalIgnoringCase(channelName, String("Compositing")))
148 return &LogCompositing;
150 if (equalIgnoringCase(channelName, String("Gamepad")))
151 return &LogGamepad;
153 if (equalIgnoringCase(channelName, String("ScriptedAnimationController")))
154 return &LogScriptedAnimationController;
156 if (equalIgnoringCase(channelName, String("Timers")))
157 return &LogTimers;
159 return 0;
164 #endif // !LOG_DISABLED