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 22 matching lines...) Expand all Loading... |
33 typedef base::Callback<void(const Manifest&)> GetManifestCallback; | 33 typedef base::Callback<void(const Manifest&)> GetManifestCallback; |
34 | 34 |
35 explicit ManifestManager(RenderFrame* render_frame); | 35 explicit ManifestManager(RenderFrame* render_frame); |
36 virtual ~ManifestManager(); | 36 virtual ~ManifestManager(); |
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 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 43 virtual bool OnMessageReceived(const IPC::Message& message) override; |
44 virtual void DidChangeManifest() OVERRIDE; | 44 virtual void DidChangeManifest() override; |
45 | 45 |
46 private: | 46 private: |
47 enum ResolveState { | 47 enum ResolveState { |
48 ResolveStateSuccess, | 48 ResolveStateSuccess, |
49 ResolveStateFailure | 49 ResolveStateFailure |
50 }; | 50 }; |
51 | 51 |
52 // Called when receiving a ManifestManagerMsg_RequestManifest from the browser | 52 // Called when receiving a ManifestManagerMsg_RequestManifest from the browser |
53 // process. | 53 // process. |
54 void OnRequestManifest(int request_id); | 54 void OnRequestManifest(int request_id); |
(...skipping 20 matching lines...) Expand all Loading... |
75 Manifest manifest_; | 75 Manifest manifest_; |
76 | 76 |
77 std::list<GetManifestCallback> pending_callbacks_; | 77 std::list<GetManifestCallback> pending_callbacks_; |
78 | 78 |
79 DISALLOW_COPY_AND_ASSIGN(ManifestManager); | 79 DISALLOW_COPY_AND_ASSIGN(ManifestManager); |
80 }; | 80 }; |
81 | 81 |
82 } // namespace content | 82 } // namespace content |
83 | 83 |
84 #endif // CONTENT_RENDERER_MANIFEST_MANIFEST_MANAGER_H_ | 84 #endif // CONTENT_RENDERER_MANIFEST_MANIFEST_MANAGER_H_ |
OLD | NEW |