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

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

Issue 2435863004: Remove stl_util's deletion function use from content/. (Closed)
Patch Set: minus service worker Created 4 years, 2 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
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>
9
8 #include "base/callback_forward.h" 10 #include "base/callback_forward.h"
9 #include "base/id_map.h" 11 #include "base/id_map.h"
10 #include "base/macros.h" 12 #include "base/macros.h"
11 #include "content/public/browser/web_contents_observer.h" 13 #include "content/public/browser/web_contents_observer.h"
12 14
13 namespace content { 15 namespace content {
14 16
15 class RenderFrameHost; 17 class RenderFrameHost;
16 class WebContents; 18 class WebContents;
17 struct Manifest; 19 struct Manifest;
(...skipping 13 matching lines...) Expand all
31 // 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
32 // the callback will have an empty manifest. 34 // the callback will have an empty manifest.
33 void GetManifest(RenderFrameHost*, const GetManifestCallback&); 35 void GetManifest(RenderFrameHost*, const GetManifestCallback&);
34 36
35 // WebContentsObserver 37 // WebContentsObserver
36 bool OnMessageReceived(const IPC::Message&, RenderFrameHost*) override; 38 bool OnMessageReceived(const IPC::Message&, RenderFrameHost*) override;
37 void RenderFrameDeleted(RenderFrameHost*) override; 39 void RenderFrameDeleted(RenderFrameHost*) override;
38 40
39 private: 41 private:
40 using GetCallbackMap = IDMap<GetManifestCallback, IDMapOwnPointer>; 42 using GetCallbackMap = IDMap<GetManifestCallback, IDMapOwnPointer>;
41 using FrameGetCallbackMap = base::hash_map<RenderFrameHost*, GetCallbackMap*>;
42 43
43 void OnRequestManifestResponse( 44 void OnRequestManifestResponse(
44 RenderFrameHost*, int request_id, const GURL&, const Manifest&); 45 RenderFrameHost*, int request_id, const GURL&, const Manifest&);
45 46
46 // Returns the CallbackMap associated with the given RenderFrameHost, or null. 47 // Returns the CallbackMap associated with the given RenderFrameHost, or null.
47 GetCallbackMap* GetCallbackMapForFrame(RenderFrameHost*); 48 GetCallbackMap* GetCallbackMapForFrame(RenderFrameHost*);
48 49
49 FrameGetCallbackMap pending_get_callbacks_; 50 base::hash_map<RenderFrameHost*, std::unique_ptr<GetCallbackMap>>
51 pending_get_callbacks_;
50 52
51 DISALLOW_COPY_AND_ASSIGN(ManifestManagerHost); 53 DISALLOW_COPY_AND_ASSIGN(ManifestManagerHost);
52 }; 54 };
53 55
54 } // namespace content 56 } // namespace content
55 57
56 #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/download/save_package.cc ('k') | content/browser/manifest/manifest_manager_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698