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 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 return adoptRefWillBeNoop(new AutocompleteErrorEvent(reason)); | 43 return adoptRefWillBeNoop(new AutocompleteErrorEvent(reason)); |
44 } | 44 } |
45 | 45 |
46 static PassRefPtrWillBeRawPtr<AutocompleteErrorEvent> create(const AtomicStr
ing& eventType, const AutocompleteErrorEventInit& initializer) | 46 static PassRefPtrWillBeRawPtr<AutocompleteErrorEvent> create(const AtomicStr
ing& eventType, const AutocompleteErrorEventInit& initializer) |
47 { | 47 { |
48 return adoptRefWillBeNoop(new AutocompleteErrorEvent(eventType, initiali
zer)); | 48 return adoptRefWillBeNoop(new AutocompleteErrorEvent(eventType, initiali
zer)); |
49 } | 49 } |
50 | 50 |
51 const String& reason() const { return m_reason; } | 51 const String& reason() const { return m_reason; } |
52 | 52 |
53 virtual const AtomicString& interfaceName() const override { return EventNam
es::AutocompleteErrorEvent; } | 53 const AtomicString& interfaceName() const override { return EventNames::Auto
completeErrorEvent; } |
54 | 54 |
55 DEFINE_INLINE_VIRTUAL_TRACE() { Event::trace(visitor); } | 55 DEFINE_INLINE_VIRTUAL_TRACE() { Event::trace(visitor); } |
56 | 56 |
57 private: | 57 private: |
58 AutocompleteErrorEvent() { } | 58 AutocompleteErrorEvent() { } |
59 | 59 |
60 AutocompleteErrorEvent(const String& reason) | 60 AutocompleteErrorEvent(const String& reason) |
61 : Event(EventTypeNames::autocompleteerror, true, false) | 61 : Event(EventTypeNames::autocompleteerror, true, false) |
62 , m_reason(reason) { } | 62 , m_reason(reason) { } |
63 | 63 |
64 AutocompleteErrorEvent(const AtomicString& eventType, const AutocompleteErro
rEventInit& initializer) | 64 AutocompleteErrorEvent(const AtomicString& eventType, const AutocompleteErro
rEventInit& initializer) |
65 : Event(eventType, initializer) | 65 : Event(eventType, initializer) |
66 { | 66 { |
67 if (initializer.hasReason()) | 67 if (initializer.hasReason()) |
68 m_reason = initializer.reason(); | 68 m_reason = initializer.reason(); |
69 } | 69 } |
70 | 70 |
71 String m_reason; | 71 String m_reason; |
72 }; | 72 }; |
73 | 73 |
74 } // namespace blink | 74 } // namespace blink |
75 | 75 |
76 #endif // AutocompleteErrorEvent_h | 76 #endif // AutocompleteErrorEvent_h |
OLD | NEW |