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 #ifndef ApplicationCacheErrorEvent_h | 5 #ifndef ApplicationCacheErrorEvent_h |
6 #define ApplicationCacheErrorEvent_h | 6 #define ApplicationCacheErrorEvent_h |
7 | 7 |
8 #include "core/events/ApplicationCacheErrorEventInit.h" | 8 #include "core/events/ApplicationCacheErrorEventInit.h" |
9 #include "core/events/Event.h" | 9 #include "core/events/Event.h" |
10 #include "core/loader/appcache/ApplicationCacheHost.h" | 10 #include "core/loader/appcache/ApplicationCacheHost.h" |
11 #include "public/platform/WebApplicationCacheHostClient.h" | 11 #include "public/platform/WebApplicationCacheHostClient.h" |
12 | 12 |
13 namespace blink { | 13 namespace blink { |
14 | 14 |
15 class ApplicationCacheErrorEvent final : public Event { | 15 class ApplicationCacheErrorEvent final : public Event { |
16 DEFINE_WRAPPERTYPEINFO(); | 16 DEFINE_WRAPPERTYPEINFO(); |
17 public: | 17 public: |
18 virtual ~ApplicationCacheErrorEvent(); | 18 virtual ~ApplicationCacheErrorEvent(); |
19 | 19 |
20 static PassRefPtrWillBeRawPtr<ApplicationCacheErrorEvent> create() | 20 static PassRefPtrWillBeRawPtr<ApplicationCacheErrorEvent> create() |
21 { | 21 { |
22 return adoptRefWillBeNoop(new ApplicationCacheErrorEvent); | 22 return adoptRefWillBeNoop(new ApplicationCacheErrorEvent); |
23 } | 23 } |
24 | 24 |
25 static PassRefPtrWillBeRawPtr<ApplicationCacheErrorEvent> create(blink::WebA
pplicationCacheHost::ErrorReason reason, const String& url, int status, const St
ring& message) | 25 static PassRefPtrWillBeRawPtr<ApplicationCacheErrorEvent> create(WebApplicat
ionCacheHost::ErrorReason reason, const String& url, int status, const String& m
essage) |
26 { | 26 { |
27 return adoptRefWillBeNoop(new ApplicationCacheErrorEvent(reason, url, st
atus, message)); | 27 return adoptRefWillBeNoop(new ApplicationCacheErrorEvent(reason, url, st
atus, message)); |
28 } | 28 } |
29 | 29 |
30 static PassRefPtrWillBeRawPtr<ApplicationCacheErrorEvent> create(const Atomi
cString& eventType, const ApplicationCacheErrorEventInit& initializer) | 30 static PassRefPtrWillBeRawPtr<ApplicationCacheErrorEvent> create(const Atomi
cString& eventType, const ApplicationCacheErrorEventInit& initializer) |
31 { | 31 { |
32 return adoptRefWillBeNoop(new ApplicationCacheErrorEvent(eventType, init
ializer)); | 32 return adoptRefWillBeNoop(new ApplicationCacheErrorEvent(eventType, init
ializer)); |
33 } | 33 } |
34 | 34 |
35 const String& reason() const { return m_reason; } | 35 const String& reason() const { return m_reason; } |
36 const String& url() const { return m_url; } | 36 const String& url() const { return m_url; } |
37 int status() const { return m_status; } | 37 int status() const { return m_status; } |
38 const String& message() const { return m_message; } | 38 const String& message() const { return m_message; } |
39 | 39 |
40 virtual const AtomicString& interfaceName() const override { return EventNam
es::ApplicationCacheErrorEvent; } | 40 virtual const AtomicString& interfaceName() const override { return EventNam
es::ApplicationCacheErrorEvent; } |
41 | 41 |
42 DECLARE_VIRTUAL_TRACE(); | 42 DECLARE_VIRTUAL_TRACE(); |
43 | 43 |
44 private: | 44 private: |
45 ApplicationCacheErrorEvent(); | 45 ApplicationCacheErrorEvent(); |
46 ApplicationCacheErrorEvent(blink::WebApplicationCacheHost::ErrorReason, cons
t String& url, int status, const String& message); | 46 ApplicationCacheErrorEvent(WebApplicationCacheHost::ErrorReason, const Strin
g& url, int status, const String& message); |
47 ApplicationCacheErrorEvent(const AtomicString& eventType, const ApplicationC
acheErrorEventInit& initializer); | 47 ApplicationCacheErrorEvent(const AtomicString& eventType, const ApplicationC
acheErrorEventInit& initializer); |
48 | 48 |
49 String m_reason; | 49 String m_reason; |
50 String m_url; | 50 String m_url; |
51 int m_status; | 51 int m_status; |
52 String m_message; | 52 String m_message; |
53 }; | 53 }; |
54 | 54 |
55 } // namespace blink | 55 } // namespace blink |
56 | 56 |
57 #endif // ApplicationCacheErrorEvent_h | 57 #endif // ApplicationCacheErrorEvent_h |
OLD | NEW |