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

Side by Side Diff: extensions/browser/guest_view/mime_handler_view/mime_handler_stream_manager.h

Issue 2839373003: struct UnloadedExtensionInfo -> enum UnloadedExtensionInfoReason (Closed)
Patch Set: Enum class Created 3 years, 7 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 EXTENSIONS_BROWSER_GUEST_VIEW_MIME_HANDLER_VIEW_MIME_HANDLER_STREAM_MANA GER_H_ 5 #ifndef EXTENSIONS_BROWSER_GUEST_VIEW_MIME_HANDLER_VIEW_MIME_HANDLER_STREAM_MANA GER_H_
6 #define EXTENSIONS_BROWSER_GUEST_VIEW_MIME_HANDLER_VIEW_MIME_HANDLER_STREAM_MANA GER_H_ 6 #define EXTENSIONS_BROWSER_GUEST_VIEW_MIME_HANDLER_VIEW_MIME_HANDLER_STREAM_MANA GER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 std::unique_ptr<StreamContainer> stream, 43 std::unique_ptr<StreamContainer> stream,
44 int frame_tree_node_id, 44 int frame_tree_node_id,
45 int render_process_id, 45 int render_process_id,
46 int render_frame_id); 46 int render_frame_id);
47 47
48 std::unique_ptr<StreamContainer> ReleaseStream(const std::string& view_id); 48 std::unique_ptr<StreamContainer> ReleaseStream(const std::string& view_id);
49 49
50 // ExtensionRegistryObserver override. 50 // ExtensionRegistryObserver override.
51 void OnExtensionUnloaded(content::BrowserContext* browser_context, 51 void OnExtensionUnloaded(content::BrowserContext* browser_context,
52 const Extension* extension, 52 const Extension* extension,
53 UnloadedExtensionInfo::Reason reason) override; 53 UnloadedExtensionReason reason) override;
54 54
55 private: 55 private:
56 class EmbedderObserver; 56 class EmbedderObserver;
57 57
58 // Maps view id->StreamContainer to maintain their lifetime until they are 58 // Maps view id->StreamContainer to maintain their lifetime until they are
59 // used or removed. 59 // used or removed.
60 std::map<std::string, std::unique_ptr<StreamContainer>> streams_; 60 std::map<std::string, std::unique_ptr<StreamContainer>> streams_;
61 61
62 // Maps extension id->view id for removing the associated streams when an 62 // Maps extension id->view id for removing the associated streams when an
63 // extension is unloaded. 63 // extension is unloaded.
64 std::map<std::string, std::set<std::string>> streams_by_extension_id_; 64 std::map<std::string, std::set<std::string>> streams_by_extension_id_;
65 65
66 // Maps view id->EmbedderObserver for maintaining the lifetime of the 66 // Maps view id->EmbedderObserver for maintaining the lifetime of the
67 // EmbedderObserver until it is removed. 67 // EmbedderObserver until it is removed.
68 std::map<std::string, std::unique_ptr<EmbedderObserver>> embedder_observers_; 68 std::map<std::string, std::unique_ptr<EmbedderObserver>> embedder_observers_;
69 69
70 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver> 70 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver>
71 extension_registry_observer_; 71 extension_registry_observer_;
72 }; 72 };
73 73
74 } // namespace extensions 74 } // namespace extensions
75 75
76 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_MIME_HANDLER_VIEW_MIME_HANDLER_STREAM_M ANAGER_H_ 76 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_MIME_HANDLER_VIEW_MIME_HANDLER_STREAM_M ANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698