| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "config.h" | 5 #include "config.h" |
| 6 #include "core/events/ApplicationCacheErrorEvent.h" | 6 #include "core/events/ApplicationCacheErrorEvent.h" |
| 7 | 7 |
| 8 namespace blink { | 8 namespace blink { |
| 9 | 9 |
| 10 static const String& errorReasonToString(blink::WebApplicationCacheHost::ErrorRe
ason reason) | 10 static const String& errorReasonToString(blink::WebApplicationCacheHost::ErrorRe
ason reason) |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 return emptyString(); | 40 return emptyString(); |
| 41 } | 41 } |
| 42 | 42 |
| 43 ApplicationCacheErrorEventInit::ApplicationCacheErrorEventInit() | 43 ApplicationCacheErrorEventInit::ApplicationCacheErrorEventInit() |
| 44 : status(0) | 44 : status(0) |
| 45 { | 45 { |
| 46 } | 46 } |
| 47 | 47 |
| 48 ApplicationCacheErrorEvent::ApplicationCacheErrorEvent() | 48 ApplicationCacheErrorEvent::ApplicationCacheErrorEvent() |
| 49 { | 49 { |
| 50 ScriptWrappable::init(this); | |
| 51 } | 50 } |
| 52 | 51 |
| 53 ApplicationCacheErrorEvent::ApplicationCacheErrorEvent(blink::WebApplicationCach
eHost::ErrorReason reason, const String& url, int status, const String& message) | 52 ApplicationCacheErrorEvent::ApplicationCacheErrorEvent(blink::WebApplicationCach
eHost::ErrorReason reason, const String& url, int status, const String& message) |
| 54 : Event(EventTypeNames::error, false, false) | 53 : Event(EventTypeNames::error, false, false) |
| 55 , m_reason(errorReasonToString(reason)) | 54 , m_reason(errorReasonToString(reason)) |
| 56 , m_url(url) | 55 , m_url(url) |
| 57 , m_status(status) | 56 , m_status(status) |
| 58 , m_message(message) | 57 , m_message(message) |
| 59 { | 58 { |
| 60 ScriptWrappable::init(this); | |
| 61 } | 59 } |
| 62 | 60 |
| 63 ApplicationCacheErrorEvent::ApplicationCacheErrorEvent(const AtomicString& event
Type, const ApplicationCacheErrorEventInit& initializer) | 61 ApplicationCacheErrorEvent::ApplicationCacheErrorEvent(const AtomicString& event
Type, const ApplicationCacheErrorEventInit& initializer) |
| 64 : Event(eventType, initializer) | 62 : Event(eventType, initializer) |
| 65 , m_reason(initializer.reason) | 63 , m_reason(initializer.reason) |
| 66 , m_url(initializer.url) | 64 , m_url(initializer.url) |
| 67 , m_status(initializer.status) | 65 , m_status(initializer.status) |
| 68 , m_message(initializer.message) | 66 , m_message(initializer.message) |
| 69 { | 67 { |
| 70 ScriptWrappable::init(this); | |
| 71 } | 68 } |
| 72 | 69 |
| 73 ApplicationCacheErrorEvent::~ApplicationCacheErrorEvent() | 70 ApplicationCacheErrorEvent::~ApplicationCacheErrorEvent() |
| 74 { | 71 { |
| 75 } | 72 } |
| 76 | 73 |
| 77 void ApplicationCacheErrorEvent::trace(Visitor* visitor) | 74 void ApplicationCacheErrorEvent::trace(Visitor* visitor) |
| 78 { | 75 { |
| 79 Event::trace(visitor); | 76 Event::trace(visitor); |
| 80 } | 77 } |
| 81 | 78 |
| 82 } // namespace blink | 79 } // namespace blink |
| OLD | NEW |