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

Side by Side Diff: third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.h

Issue 2567913002: Rename ActiveDOMObject to SuspendableObject (Closed)
Patch Set: Created 4 years 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) 2003, 2006, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2003, 2006, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2005, 2006 Alexey Proskuryakov <ap@nypop.com> 3 * Copyright (C) 2005, 2006 Alexey Proskuryakov <ap@nypop.com>
4 * Copyright (C) 2011 Google Inc. All rights reserved. 4 * Copyright (C) 2011 Google Inc. All rights reserved.
5 * Copyright (C) 2012 Intel Corporation 5 * Copyright (C) 2012 Intel Corporation
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public 8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
11 * 11 *
12 * This library is distributed in the hope that it will be useful, 12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details. 15 * Lesser General Public License for more details.
16 * 16 *
17 * You should have received a copy of the GNU Lesser General Public 17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software 18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
20 * MA 02110-1301 USA 20 * MA 02110-1301 USA
21 */ 21 */
22 22
23 #ifndef XMLHttpRequest_h 23 #ifndef XMLHttpRequest_h
24 #define XMLHttpRequest_h 24 #define XMLHttpRequest_h
25 25
26 #include "bindings/core/v8/ActiveScriptWrappable.h" 26 #include "bindings/core/v8/ActiveScriptWrappable.h"
27 #include "bindings/core/v8/ScriptString.h" 27 #include "bindings/core/v8/ScriptString.h"
28 #include "bindings/core/v8/ScriptWrappable.h" 28 #include "bindings/core/v8/ScriptWrappable.h"
29 #include "bindings/core/v8/TraceWrapperMember.h" 29 #include "bindings/core/v8/TraceWrapperMember.h"
30 #include "core/dom/ActiveDOMObject.h"
31 #include "core/dom/DocumentParserClient.h" 30 #include "core/dom/DocumentParserClient.h"
31 #include "core/dom/SuspendableObject.h"
32 #include "core/loader/ThreadableLoaderClient.h" 32 #include "core/loader/ThreadableLoaderClient.h"
33 #include "core/xmlhttprequest/XMLHttpRequestEventTarget.h" 33 #include "core/xmlhttprequest/XMLHttpRequestEventTarget.h"
34 #include "core/xmlhttprequest/XMLHttpRequestProgressEventThrottle.h" 34 #include "core/xmlhttprequest/XMLHttpRequestProgressEventThrottle.h"
35 #include "platform/heap/Handle.h" 35 #include "platform/heap/Handle.h"
36 #include "platform/network/EncodedFormData.h" 36 #include "platform/network/EncodedFormData.h"
37 #include "platform/network/HTTPHeaderMap.h" 37 #include "platform/network/HTTPHeaderMap.h"
38 #include "platform/network/ResourceResponse.h" 38 #include "platform/network/ResourceResponse.h"
39 #include "platform/weborigin/KURL.h" 39 #include "platform/weborigin/KURL.h"
40 #include "platform/weborigin/SecurityOrigin.h" 40 #include "platform/weborigin/SecurityOrigin.h"
41 #include "wtf/Forward.h" 41 #include "wtf/Forward.h"
(...skipping 22 matching lines...) Expand all
64 class ThreadableLoader; 64 class ThreadableLoader;
65 class WebDataConsumerHandle; 65 class WebDataConsumerHandle;
66 class XMLHttpRequestUpload; 66 class XMLHttpRequestUpload;
67 67
68 typedef int ExceptionCode; 68 typedef int ExceptionCode;
69 69
70 class XMLHttpRequest final : public XMLHttpRequestEventTarget, 70 class XMLHttpRequest final : public XMLHttpRequestEventTarget,
71 private ThreadableLoaderClient, 71 private ThreadableLoaderClient,
72 public DocumentParserClient, 72 public DocumentParserClient,
73 public ActiveScriptWrappable, 73 public ActiveScriptWrappable,
74 public ActiveDOMObject { 74 public SuspendableObject {
75 DEFINE_WRAPPERTYPEINFO(); 75 DEFINE_WRAPPERTYPEINFO();
76 USING_GARBAGE_COLLECTED_MIXIN(XMLHttpRequest); 76 USING_GARBAGE_COLLECTED_MIXIN(XMLHttpRequest);
77 77
78 public: 78 public:
79 static XMLHttpRequest* create(ScriptState*); 79 static XMLHttpRequest* create(ScriptState*);
80 static XMLHttpRequest* create(ExecutionContext*); 80 static XMLHttpRequest* create(ExecutionContext*);
81 ~XMLHttpRequest() override; 81 ~XMLHttpRequest() override;
82 82
83 // These exact numeric values are important because JS expects them. 83 // These exact numeric values are important because JS expects them.
84 enum State { 84 enum State {
85 kUnsent = 0, 85 kUnsent = 0,
86 kOpened = 1, 86 kOpened = 1,
87 kHeadersReceived = 2, 87 kHeadersReceived = 2,
88 kLoading = 3, 88 kLoading = 3,
89 kDone = 4 89 kDone = 4
90 }; 90 };
91 91
92 enum ResponseTypeCode { 92 enum ResponseTypeCode {
93 ResponseTypeDefault, 93 ResponseTypeDefault,
94 ResponseTypeText, 94 ResponseTypeText,
95 ResponseTypeJSON, 95 ResponseTypeJSON,
96 ResponseTypeDocument, 96 ResponseTypeDocument,
97 ResponseTypeBlob, 97 ResponseTypeBlob,
98 ResponseTypeArrayBuffer, 98 ResponseTypeArrayBuffer,
99 }; 99 };
100 100
101 // ActiveDOMObject 101 // SuspendableObject
102 void contextDestroyed() override; 102 void contextDestroyed() override;
103 ExecutionContext* getExecutionContext() const override; 103 ExecutionContext* getExecutionContext() const override;
104 void suspend() override; 104 void suspend() override;
105 void resume() override; 105 void resume() override;
106 106
107 // ScriptWrappable 107 // ScriptWrappable
108 bool hasPendingActivity() const final; 108 bool hasPendingActivity() const final;
109 109
110 // XMLHttpRequestEventTarget 110 // XMLHttpRequestEventTarget
111 const AtomicString& interfaceName() const override; 111 const AtomicString& interfaceName() const override;
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 bool m_downloadingToFile; 337 bool m_downloadingToFile;
338 bool m_responseTextOverflow; 338 bool m_responseTextOverflow;
339 bool m_sendFlag; 339 bool m_sendFlag;
340 }; 340 };
341 341
342 std::ostream& operator<<(std::ostream&, const XMLHttpRequest*); 342 std::ostream& operator<<(std::ostream&, const XMLHttpRequest*);
343 343
344 } // namespace blink 344 } // namespace blink
345 345
346 #endif // XMLHttpRequest_h 346 #endif // XMLHttpRequest_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698