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

Side by Side Diff: Source/core/loader/ManifestLoader.h

Issue 295063002: [NotLanded] Implement the fetching algorithm of the Web Manifest. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: apply Nate's comments Created 6 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef ManifestLoader_h
6 #define ManifestLoader_h
7
8 #include "core/fetch/ResourceClient.h"
9 #include "core/fetch/ResourceOwner.h"
10 #include "core/frame/LocalFrame.h"
11
12 namespace blink {
13
14 class Document;
15
16 // The ManifestLoader is a class that fetches and parses a WebManifest and
17 // informs the passed ManifestLoaderClient upon completion (success or failure).
18 // The lifetime of the object is managed by itself. When ::LoadManifest() is
19 // called an instance of the object is created and as soon as the processing
20 // is finished, the object will destroy itself.
21 // The call should make sure that the ManifestLoaderClient passed to
22 // ::LoadManifest() is not destroyed before getting a result.
23 class ManifestLoader FINAL : public ResourceOwner<Resource, ResourceClient> {
24 public:
25 static void loadManifest(PassRefPtr<LocalFrame>);
26
27 // This is public so we can use OwnPtr<>(this) in various methods.
28 virtual ~ManifestLoader();
29
30 protected:
31 // ResourceClient
32 virtual void notifyFinished(Resource*) OVERRIDE;
33
34 explicit ManifestLoader(PassRefPtr<LocalFrame>);
35
36 void startLoading();
37
38 private:
39 RefPtr<LocalFrame> m_frame;
Nate Chapin 2014/08/25 20:43:12 Should ManifestLoader be able to keep the frame al
mlamouri (slow - plz ping) 2014/08/26 17:25:23 I tend to prefer to keep the frame alive but as yo
40 };
41
42 } // namespace blink
43
44 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698