| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 #include "sky/engine/wtf/text/AtomicString.h" | 34 #include "sky/engine/wtf/text/AtomicString.h" |
| 35 #include "sky/engine/wtf/text/WTFString.h" | 35 #include "sky/engine/wtf/text/WTFString.h" |
| 36 | 36 |
| 37 namespace blink { | 37 namespace blink { |
| 38 | 38 |
| 39 class ExceptionState; | 39 class ExceptionState; |
| 40 | 40 |
| 41 class CustomElementException { | 41 class CustomElementException { |
| 42 public: | 42 public: |
| 43 enum Reason { | 43 enum Reason { |
| 44 CannotRegisterFromExtension, | |
| 45 ConstructorPropertyNotConfigurable, | 44 ConstructorPropertyNotConfigurable, |
| 46 ContextDestroyedCheckingPrototype, | 45 ContextDestroyedCheckingPrototype, |
| 47 ContextDestroyedCreatingCallbacks, | 46 ContextDestroyedCreatingCallbacks, |
| 48 ContextDestroyedRegisteringDefinition, | 47 ContextDestroyedRegisteringDefinition, |
| 49 ExtendsIsInvalidName, | 48 ExtendsIsInvalidName, |
| 50 ExtendsIsCustomElementName, | 49 ExtendsIsCustomElementName, |
| 51 InvalidName, | 50 InvalidName, |
| 52 PrototypeInUse, | 51 PrototypeInUse, |
| 53 PrototypeNotAnObject, | 52 PrototypeNotAnObject, |
| 54 TypeAlreadyRegistered | 53 TypeAlreadyRegistered |
| 55 }; | 54 }; |
| 56 | 55 |
| 57 static void throwException(Reason, const AtomicString& type, ExceptionState&
); | 56 static void throwException(Reason, const AtomicString& type, ExceptionState&
); |
| 58 | 57 |
| 59 private: | 58 private: |
| 60 CustomElementException(); | 59 CustomElementException(); |
| 61 | 60 |
| 62 static String preamble(const AtomicString& type); | 61 static String preamble(const AtomicString& type); |
| 63 }; | 62 }; |
| 64 | 63 |
| 65 } | 64 } |
| 66 | 65 |
| 67 #endif // SKY_ENGINE_CORE_DOM_CUSTOM_CUSTOMELEMENTEXCEPTION_H_ | 66 #endif // SKY_ENGINE_CORE_DOM_CUSTOM_CUSTOMELEMENTEXCEPTION_H_ |
| OLD | NEW |