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

Side by Side Diff: content/browser/manifest/manifest_manager_host.h

Issue 2496653002: Part 2 of base::IDMap refactor to eliminate IDMapOwnPointer/IDMapExternalPointer modes (Closed)
Patch Set: typedefs => using statements, update comments in base/id_map.h Created 4 years 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
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_BROWSER_MANIFEST_MANIFEST_MANAGER_HOST_H_ 5 #ifndef CONTENT_BROWSER_MANIFEST_MANIFEST_MANAGER_HOST_H_
6 #define CONTENT_BROWSER_MANIFEST_MANIFEST_MANAGER_HOST_H_ 6 #define CONTENT_BROWSER_MANIFEST_MANIFEST_MANAGER_HOST_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/callback_forward.h" 10 #include "base/callback_forward.h"
(...skipping 21 matching lines...) Expand all
32 // Calls the given callback with the manifest associated with the 32 // Calls the given callback with the manifest associated with the
33 // given RenderFrameHost. If the frame has no manifest or if getting it failed 33 // given RenderFrameHost. If the frame has no manifest or if getting it failed
34 // the callback will have an empty manifest. 34 // the callback will have an empty manifest.
35 void GetManifest(RenderFrameHost*, const GetManifestCallback&); 35 void GetManifest(RenderFrameHost*, const GetManifestCallback&);
36 36
37 // WebContentsObserver 37 // WebContentsObserver
38 bool OnMessageReceived(const IPC::Message&, RenderFrameHost*) override; 38 bool OnMessageReceived(const IPC::Message&, RenderFrameHost*) override;
39 void RenderFrameDeleted(RenderFrameHost*) override; 39 void RenderFrameDeleted(RenderFrameHost*) override;
40 40
41 private: 41 private:
42 using GetCallbackMap = IDMap<GetManifestCallback, IDMapOwnPointer>; 42 using GetCallbackMap = IDMap<std::unique_ptr<GetManifestCallback>>;
43 43
44 void OnRequestManifestResponse( 44 void OnRequestManifestResponse(
45 RenderFrameHost*, int request_id, const GURL&, const Manifest&); 45 RenderFrameHost*, int request_id, const GURL&, const Manifest&);
46 46
47 // Returns the CallbackMap associated with the given RenderFrameHost, or null. 47 // Returns the CallbackMap associated with the given RenderFrameHost, or null.
48 GetCallbackMap* GetCallbackMapForFrame(RenderFrameHost*); 48 GetCallbackMap* GetCallbackMapForFrame(RenderFrameHost*);
49 49
50 base::hash_map<RenderFrameHost*, std::unique_ptr<GetCallbackMap>> 50 base::hash_map<RenderFrameHost*, std::unique_ptr<GetCallbackMap>>
51 pending_get_callbacks_; 51 pending_get_callbacks_;
52 52
53 DISALLOW_COPY_AND_ASSIGN(ManifestManagerHost); 53 DISALLOW_COPY_AND_ASSIGN(ManifestManagerHost);
54 }; 54 };
55 55
56 } // namespace content 56 } // namespace content
57 57
58 #endif // CONTENT_BROWSER_MANIFEST_MANIFEST_MANAGER_HOST_H_ 58 #endif // CONTENT_BROWSER_MANIFEST_MANIFEST_MANAGER_HOST_H_
OLDNEW
« no previous file with comments | « content/browser/gpu/gpu_process_host_ui_shim.cc ('k') | content/browser/permissions/permission_service_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698