Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(181)

Side by Side Diff: third_party/WebKit/Source/core/page/EventSource.h

Issue 1274063003: [Loader] Make ThreadableLoader non-RefCounted and be managed by OwnPtr (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Reflect comments. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009, 2012 Ericsson AB. All rights reserved. 2 * Copyright (C) 2009, 2012 Ericsson AB. All rights reserved.
3 * Copyright (C) 2010 Apple Inc. All rights reserved. 3 * Copyright (C) 2010 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 23 matching lines...) Expand all
34 34
35 #include "core/dom/ContextLifecycleObserver.h" 35 #include "core/dom/ContextLifecycleObserver.h"
36 #include "core/events/EventTarget.h" 36 #include "core/events/EventTarget.h"
37 #include "core/loader/ThreadableLoader.h" 37 #include "core/loader/ThreadableLoader.h"
38 #include "core/loader/ThreadableLoaderClient.h" 38 #include "core/loader/ThreadableLoaderClient.h"
39 #include "core/page/EventSourceParser.h" 39 #include "core/page/EventSourceParser.h"
40 #include "platform/Timer.h" 40 #include "platform/Timer.h"
41 #include "platform/heap/Handle.h" 41 #include "platform/heap/Handle.h"
42 #include "platform/weborigin/KURL.h" 42 #include "platform/weborigin/KURL.h"
43 #include "wtf/Forward.h" 43 #include "wtf/Forward.h"
44 #include "wtf/RefPtr.h" 44 #include "wtf/OwnPtr.h"
45 45
46 namespace blink { 46 namespace blink {
47 47
48 class EventSourceInit; 48 class EventSourceInit;
49 class ExceptionState; 49 class ExceptionState;
50 class ResourceResponse; 50 class ResourceResponse;
51 51
52 class CORE_EXPORT EventSource final : public RefCountedGarbageCollectedEventTarg etWithInlineData<EventSource>, private ThreadableLoaderClient, public ContextLif ecycleObserver, public EventSourceParser::Client { 52 class CORE_EXPORT EventSource final : public RefCountedGarbageCollectedEventTarg etWithInlineData<EventSource>, private ThreadableLoaderClient, public ContextLif ecycleObserver, public EventSourceParser::Client {
53 DEFINE_WRAPPERTYPEINFO(); 53 DEFINE_WRAPPERTYPEINFO();
54 REFCOUNTED_GARBAGE_COLLECTED_EVENT_TARGET(EventSource); 54 REFCOUNTED_GARBAGE_COLLECTED_EVENT_TARGET(EventSource);
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 void networkRequestEnded(); 107 void networkRequestEnded();
108 void scheduleReconnect(); 108 void scheduleReconnect();
109 void connectTimerFired(Timer<EventSource>*); 109 void connectTimerFired(Timer<EventSource>*);
110 void abortConnectionAttempt(); 110 void abortConnectionAttempt();
111 111
112 KURL m_url; 112 KURL m_url;
113 bool m_withCredentials; 113 bool m_withCredentials;
114 State m_state; 114 State m_state;
115 115
116 Member<EventSourceParser> m_parser; 116 Member<EventSourceParser> m_parser;
117 RefPtr<ThreadableLoader> m_loader; 117 OwnPtr<ThreadableLoader> m_loader;
118 Timer<EventSource> m_connectTimer; 118 Timer<EventSource> m_connectTimer;
119 119
120 unsigned long long m_reconnectDelay; 120 unsigned long long m_reconnectDelay;
121 String m_eventStreamOrigin; 121 String m_eventStreamOrigin;
122 }; 122 };
123 123
124 } // namespace blink 124 } // namespace blink
125 125
126 #endif // EventSource_h 126 #endif // EventSource_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698