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

Side by Side Diff: extensions/browser/guest_view/web_view/web_view_renderer_state.h

Issue 1308823002: Move Singleton and related structs to namespace base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add \n Created 5 years, 3 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 // WebViewRendererState manages state data for WebView guest renderer processes. 5 // WebViewRendererState manages state data for WebView guest renderer processes.
6 // 6 //
7 // This class's data can be accessed via its methods from both the UI and IO 7 // This class's data can be accessed via its methods from both the UI and IO
8 // threads, and uses locks to mediate this access. When making changes to this 8 // threads, and uses locks to mediate this access. When making changes to this
9 // class, ensure that you avoid introducing any reentrant code in the methods, 9 // class, ensure that you avoid introducing any reentrant code in the methods,
10 // and that you always aquire the locks in the order |web_view_info_map_lock_| 10 // and that you always aquire the locks in the order |web_view_info_map_lock_|
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 63
64 void AddContentScriptIDs(int embedder_process_id, 64 void AddContentScriptIDs(int embedder_process_id,
65 int view_instance_id, 65 int view_instance_id,
66 const std::set<int>& script_ids); 66 const std::set<int>& script_ids);
67 void RemoveContentScriptIDs(int embedder_process_id, 67 void RemoveContentScriptIDs(int embedder_process_id,
68 int view_instance_id, 68 int view_instance_id,
69 const std::set<int>& script_ids); 69 const std::set<int>& script_ids);
70 70
71 private: 71 private:
72 friend class WebViewGuest; 72 friend class WebViewGuest;
73 friend struct DefaultSingletonTraits<WebViewRendererState>; 73 friend struct base::DefaultSingletonTraits<WebViewRendererState>;
74 74
75 using RenderId = std::pair<int, int>; 75 using RenderId = std::pair<int, int>;
76 using WebViewInfoMap = std::map<RenderId, WebViewInfo>; 76 using WebViewInfoMap = std::map<RenderId, WebViewInfo>;
77 77
78 struct WebViewPartitionInfo { 78 struct WebViewPartitionInfo {
79 int web_view_count; 79 int web_view_count;
80 std::string partition_id; 80 std::string partition_id;
81 WebViewPartitionInfo() {} 81 WebViewPartitionInfo() {}
82 WebViewPartitionInfo(int count, std::string partition): 82 WebViewPartitionInfo(int count, std::string partition):
83 web_view_count(count), 83 web_view_count(count),
(...skipping 16 matching lines...) Expand all
100 mutable base::Lock web_view_info_map_lock_; 100 mutable base::Lock web_view_info_map_lock_;
101 WebViewPartitionIDMap web_view_partition_id_map_; 101 WebViewPartitionIDMap web_view_partition_id_map_;
102 mutable base::Lock web_view_partition_id_map_lock_; 102 mutable base::Lock web_view_partition_id_map_lock_;
103 103
104 DISALLOW_COPY_AND_ASSIGN(WebViewRendererState); 104 DISALLOW_COPY_AND_ASSIGN(WebViewRendererState);
105 }; 105 };
106 106
107 } // namespace extensions 107 } // namespace extensions
108 108
109 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_RENDERER_STATE_H_ 109 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_RENDERER_STATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698