OLD | NEW |
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 CONTENT_RENDERER_MANIFEST_MANIFEST_MANAGER_H_ | 5 #ifndef CONTENT_RENDERER_MANIFEST_MANIFEST_MANAGER_H_ |
6 #define CONTENT_RENDERER_MANIFEST_MANIFEST_MANAGER_H_ | 6 #define CONTENT_RENDERER_MANIFEST_MANIFEST_MANAGER_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 | 9 |
10 #include "base/callback_forward.h" | 10 #include "base/callback_forward.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 explicit ManifestManager(RenderFrame* render_frame); | 35 explicit ManifestManager(RenderFrame* render_frame); |
36 ~ManifestManager() override; | 36 ~ManifestManager() override; |
37 | 37 |
38 // Will call the given |callback| with the Manifest associated with the | 38 // Will call the given |callback| with the Manifest associated with the |
39 // RenderFrame if any. Will pass an empty Manifest in case of error. | 39 // RenderFrame if any. Will pass an empty Manifest in case of error. |
40 void GetManifest(const GetManifestCallback& callback); | 40 void GetManifest(const GetManifestCallback& callback); |
41 | 41 |
42 // RenderFrameObserver implementation. | 42 // RenderFrameObserver implementation. |
43 bool OnMessageReceived(const IPC::Message& message) override; | 43 bool OnMessageReceived(const IPC::Message& message) override; |
44 void DidChangeManifest() override; | 44 void DidChangeManifest() override; |
| 45 void DidCommitProvisionalLoad(bool is_new_navigation) override; |
45 | 46 |
46 private: | 47 private: |
47 enum ResolveState { | 48 enum ResolveState { |
48 ResolveStateSuccess, | 49 ResolveStateSuccess, |
49 ResolveStateFailure | 50 ResolveStateFailure |
50 }; | 51 }; |
51 | 52 |
52 // Called when receiving a ManifestManagerMsg_RequestManifest from the browser | 53 // Called when receiving a ManifestManagerMsg_RequestManifest from the browser |
53 // process. | 54 // process. |
54 void OnRequestManifest(int request_id); | 55 void OnRequestManifest(int request_id); |
(...skipping 20 matching lines...) Expand all Loading... |
75 Manifest manifest_; | 76 Manifest manifest_; |
76 | 77 |
77 std::list<GetManifestCallback> pending_callbacks_; | 78 std::list<GetManifestCallback> pending_callbacks_; |
78 | 79 |
79 DISALLOW_COPY_AND_ASSIGN(ManifestManager); | 80 DISALLOW_COPY_AND_ASSIGN(ManifestManager); |
80 }; | 81 }; |
81 | 82 |
82 } // namespace content | 83 } // namespace content |
83 | 84 |
84 #endif // CONTENT_RENDERER_MANIFEST_MANIFEST_MANAGER_H_ | 85 #endif // CONTENT_RENDERER_MANIFEST_MANIFEST_MANAGER_H_ |
OLD | NEW |