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

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

Issue 1320563003: Oilpan: avoid using WeakPtr<> for heap residing objects. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: revert unrelated unit test addition 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 | Annotate | Revision Log
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 public: 22 public:
23 class MODULES_EXPORT ScopedFetcher { 23 class MODULES_EXPORT ScopedFetcher : public WillBeGarbageCollectedMixin {
24 public: 24 public:
25 virtual ~ScopedFetcher(); 25 virtual ~ScopedFetcher();
26 26
27 virtual ScriptPromise fetch(ScriptState*, const RequestInfo&, const Dict ionary&, ExceptionState&) = 0; 27 virtual ScriptPromise fetch(ScriptState*, const RequestInfo&, const Dict ionary&, ExceptionState&) = 0;
28 28
29 static WeakPtr<ScopedFetcher> from(DOMWindow&); 29 static WeakPtrWillBeRawPtr<ScopedFetcher> from(DOMWindow&);
30 static WeakPtr<ScopedFetcher> from(WorkerGlobalScope&); 30 static WeakPtrWillBeRawPtr<ScopedFetcher> from(WorkerGlobalScope&);
31 31
32 DECLARE_VIRTUAL_TRACE(); 32 DECLARE_VIRTUAL_TRACE();
33 }; 33 };
34 34
35 static ScriptPromise fetch(ScriptState*, DOMWindow&, const RequestInfo&, con st Dictionary&, ExceptionState&); 35 static ScriptPromise fetch(ScriptState*, DOMWindow&, const RequestInfo&, con st Dictionary&, ExceptionState&);
36 static ScriptPromise fetch(ScriptState*, WorkerGlobalScope&, const RequestIn fo&, const Dictionary&, ExceptionState&); 36 static ScriptPromise fetch(ScriptState*, WorkerGlobalScope&, const RequestIn fo&, const Dictionary&, ExceptionState&);
37 }; 37 };
38 38
39 } // namespace blink 39 } // namespace blink
40 40
41 #endif // GlobalFetch_h 41 #endif // GlobalFetch_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698