| /* | |
| * Copyright 2015 Google Inc. All Rights Reserved. | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software | |
| * distributed under the License is distributed on an "AS IS" BASIS, | |
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| * See the License for the specific language governing permissions and | |
| * limitations under the License. | |
| */ | |
| // Custom interface to access debugging functionalities. | |
| // TODO: provide link to design doc. | |
| [ | |
| Conditional=ENABLE_DEBUG_CONSOLE | |
| ] interface DebugHub { | |
| const long LOG_INFO = 0; | |
| const long LOG_WARNING = 1; | |
| const long LOG_ERROR = 2; | |
| const long LOG_ERROR_REPORT = 3; | |
| const long LOG_FATAL = 4; | |
| const long DEBUG_CONSOLE_OFF = 0; | |
| const long DEBUG_CONSOLE_HUD = 1; | |
| const long DEBUG_CONSOLE_ON = 2; | |
| readonly attribute Debugger debugger; | |
| void setLogMessageCallback(LogMessageCallback cb); | |
| DOMString getConsoleValueNames(); | |
| DOMString getConsoleValue(DOMString name); | |
| long getDebugConsoleMode(); | |
| DOMString getCommandChannels(); | |
| DOMString getCommandChannelShortHelp(DOMString command); | |
| DOMString getCommandChannelLongHelp(DOMString command); | |
| void sendCommand(DOMString channel, DOMString message); | |
| }; | |
| callback LogMessageCallback = void(long severity, DOMString file, long line, | |
| long message_start, DOMString message); |