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

Side by Side Diff: Source/modules/fetch/GlobalFetch.h

Issue 1315743003: [part 1] Make classes and structures in modules/ fast-allocated. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 3 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
« no previous file with comments | « Source/modules/fetch/FetchRequestData.h ('k') | Source/modules/filesystem/DOMFilePath.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 GlobalFetch_h 5 #ifndef GlobalFetch_h
6 #define GlobalFetch_h 6 #define GlobalFetch_h
7 7
8 #include "bindings/core/v8/ScriptPromise.h" 8 #include "bindings/core/v8/ScriptPromise.h"
9 #include "modules/ModulesExport.h" 9 #include "modules/ModulesExport.h"
10 #include "modules/fetch/Request.h" 10 #include "modules/fetch/Request.h"
11 #include "wtf/WeakPtr.h" 11 #include "wtf/WeakPtr.h"
12 12
13 namespace blink { 13 namespace blink {
14 14
15 class Dictionary; 15 class Dictionary;
16 class DOMWindow; 16 class DOMWindow;
17 class ExceptionState; 17 class ExceptionState;
18 class ScriptState; 18 class ScriptState;
19 class WorkerGlobalScope; 19 class WorkerGlobalScope;
20 20
21 class GlobalFetch { 21 class GlobalFetch {
22 STATIC_ONLY(GlobalFetch);
22 public: 23 public:
23 class MODULES_EXPORT ScopedFetcher : public WillBeGarbageCollectedMixin { 24 class MODULES_EXPORT ScopedFetcher : public WillBeGarbageCollectedMixin {
24 public: 25 public:
25 virtual ~ScopedFetcher(); 26 virtual ~ScopedFetcher();
26 27
27 virtual ScriptPromise fetch(ScriptState*, const RequestInfo&, const Dict ionary&, ExceptionState&) = 0; 28 virtual ScriptPromise fetch(ScriptState*, const RequestInfo&, const Dict ionary&, ExceptionState&) = 0;
28 29
29 static WeakPtrWillBeRawPtr<ScopedFetcher> from(DOMWindow&); 30 static WeakPtrWillBeRawPtr<ScopedFetcher> from(DOMWindow&);
30 static WeakPtrWillBeRawPtr<ScopedFetcher> from(WorkerGlobalScope&); 31 static WeakPtrWillBeRawPtr<ScopedFetcher> from(WorkerGlobalScope&);
31 32
32 DECLARE_VIRTUAL_TRACE(); 33 DECLARE_VIRTUAL_TRACE();
33 }; 34 };
34 35
35 static ScriptPromise fetch(ScriptState*, DOMWindow&, const RequestInfo&, con st Dictionary&, ExceptionState&); 36 static ScriptPromise fetch(ScriptState*, DOMWindow&, const RequestInfo&, con st Dictionary&, ExceptionState&);
36 static ScriptPromise fetch(ScriptState*, WorkerGlobalScope&, const RequestIn fo&, const Dictionary&, ExceptionState&); 37 static ScriptPromise fetch(ScriptState*, WorkerGlobalScope&, const RequestIn fo&, const Dictionary&, ExceptionState&);
37 }; 38 };
38 39
39 } // namespace blink 40 } // namespace blink
40 41
41 #endif // GlobalFetch_h 42 #endif // GlobalFetch_h
OLDNEW
« no previous file with comments | « Source/modules/fetch/FetchRequestData.h ('k') | Source/modules/filesystem/DOMFilePath.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698