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 // 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_| |
11 // -> |web_view_partition_id_map_lock_| (if both are needed in one method). | 11 // -> |web_view_partition_id_map_lock_| (if both are needed in one method). |
12 | 12 |
13 #ifndef EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_RENDERER_STATE_H_ | 13 #ifndef EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_RENDERER_STATE_H_ |
14 #define EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_RENDERER_STATE_H_ | 14 #define EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_RENDERER_STATE_H_ |
15 | 15 |
16 #include <map> | 16 #include <map> |
17 #include <set> | 17 #include <set> |
18 #include <string> | 18 #include <string> |
19 #include <utility> | 19 #include <utility> |
20 | 20 |
| 21 #include "base/macros.h" |
21 #include "base/memory/singleton.h" | 22 #include "base/memory/singleton.h" |
22 | 23 |
23 namespace extensions { | 24 namespace extensions { |
24 | 25 |
25 class WebViewGuest; | 26 class WebViewGuest; |
26 | 27 |
27 class WebViewRendererState { | 28 class WebViewRendererState { |
28 public: | 29 public: |
29 struct WebViewInfo { | 30 struct WebViewInfo { |
30 int embedder_process_id; | 31 int embedder_process_id; |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 mutable base::Lock web_view_info_map_lock_; | 102 mutable base::Lock web_view_info_map_lock_; |
102 WebViewPartitionIDMap web_view_partition_id_map_; | 103 WebViewPartitionIDMap web_view_partition_id_map_; |
103 mutable base::Lock web_view_partition_id_map_lock_; | 104 mutable base::Lock web_view_partition_id_map_lock_; |
104 | 105 |
105 DISALLOW_COPY_AND_ASSIGN(WebViewRendererState); | 106 DISALLOW_COPY_AND_ASSIGN(WebViewRendererState); |
106 }; | 107 }; |
107 | 108 |
108 } // namespace extensions | 109 } // namespace extensions |
109 | 110 |
110 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_RENDERER_STATE_H_ | 111 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_RENDERER_STATE_H_ |
OLD | NEW |