OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
642 /** | 642 /** |
643 * @enum {string} | 643 * @enum {string} |
644 */ | 644 */ |
645 ConsoleModel.ConsoleMessage.MessageLevel = { | 645 ConsoleModel.ConsoleMessage.MessageLevel = { |
646 Verbose: 'verbose', | 646 Verbose: 'verbose', |
647 Info: 'info', | 647 Info: 'info', |
648 Warning: 'warning', | 648 Warning: 'warning', |
649 Error: 'error' | 649 Error: 'error' |
650 }; | 650 }; |
651 | 651 |
652 /** | |
653 * @param {!ConsoleModel.ConsoleMessage.MessageLevel} level | |
654 * @return {number} | |
655 */ | |
656 ConsoleModel.ConsoleMessage.MessageLevel.ordinal = function(level) { | |
657 if (level === ConsoleModel.ConsoleMessage.MessageLevel.Verbose) | |
658 return 0; | |
659 if (level === ConsoleModel.ConsoleMessage.MessageLevel.Info) | |
660 return 1; | |
661 if (level === ConsoleModel.ConsoleMessage.MessageLevel.Warning) | |
662 return 2; | |
663 return 3; | |
664 }; | |
665 | |
666 ConsoleModel.ConsoleModel._events = Symbol('ConsoleModel.ConsoleModel.events'); | 652 ConsoleModel.ConsoleModel._events = Symbol('ConsoleModel.ConsoleModel.events'); |
667 | 653 |
668 /** | 654 /** |
669 * @type {!ConsoleModel.ConsoleModel} | 655 * @type {!ConsoleModel.ConsoleModel} |
670 */ | 656 */ |
671 ConsoleModel.consoleModel; | 657 ConsoleModel.consoleModel; |
OLD | NEW |