| 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 #ifndef COMPONENTS_GUEST_VIEW_BROWSER_GUEST_VIEW_MANAGER_H_ | 5 #ifndef COMPONENTS_GUEST_VIEW_BROWSER_GUEST_VIEW_MANAGER_H_ |
| 6 #define COMPONENTS_GUEST_VIEW_BROWSER_GUEST_VIEW_MANAGER_H_ | 6 #define COMPONENTS_GUEST_VIEW_BROWSER_GUEST_VIEW_MANAGER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 using GuestInstanceIDReverseMap = std::map<int, ElementInstanceKey>; | 225 using GuestInstanceIDReverseMap = std::map<int, ElementInstanceKey>; |
| 226 GuestInstanceIDReverseMap reverse_instance_id_map_; | 226 GuestInstanceIDReverseMap reverse_instance_id_map_; |
| 227 | 227 |
| 228 using GuestViewCreateFunction = | 228 using GuestViewCreateFunction = |
| 229 base::Callback<GuestViewBase*(content::WebContents*)>; | 229 base::Callback<GuestViewBase*(content::WebContents*)>; |
| 230 using GuestViewCleanUpFunction = | 230 using GuestViewCleanUpFunction = |
| 231 base::Callback<void(content::BrowserContext*, int, int)>; | 231 base::Callback<void(content::BrowserContext*, int, int)>; |
| 232 struct GuestViewData { | 232 struct GuestViewData { |
| 233 GuestViewData(const GuestViewCreateFunction& create_function, | 233 GuestViewData(const GuestViewCreateFunction& create_function, |
| 234 const GuestViewCleanUpFunction& cleanup_function); | 234 const GuestViewCleanUpFunction& cleanup_function); |
| 235 GuestViewData(const GuestViewData& other); |
| 235 ~GuestViewData(); | 236 ~GuestViewData(); |
| 236 const GuestViewCreateFunction create_function; | 237 const GuestViewCreateFunction create_function; |
| 237 const GuestViewCleanUpFunction cleanup_function; | 238 const GuestViewCleanUpFunction cleanup_function; |
| 238 }; | 239 }; |
| 239 using GuestViewMethodMap = std::map<std::string, GuestViewData>; | 240 using GuestViewMethodMap = std::map<std::string, GuestViewData>; |
| 240 GuestViewMethodMap guest_view_registry_; | 241 GuestViewMethodMap guest_view_registry_; |
| 241 | 242 |
| 242 int current_instance_id_; | 243 int current_instance_id_; |
| 243 | 244 |
| 244 // Any instance ID whose number not greater than this was removed via | 245 // Any instance ID whose number not greater than this was removed via |
| (...skipping 23 matching lines...) Expand all Loading... |
| 268 // call into this GuestViewManager after it has been destroyed. | 269 // call into this GuestViewManager after it has been destroyed. |
| 269 base::WeakPtrFactory<GuestViewManager> weak_ptr_factory_; | 270 base::WeakPtrFactory<GuestViewManager> weak_ptr_factory_; |
| 270 | 271 |
| 271 private: | 272 private: |
| 272 DISALLOW_COPY_AND_ASSIGN(GuestViewManager); | 273 DISALLOW_COPY_AND_ASSIGN(GuestViewManager); |
| 273 }; | 274 }; |
| 274 | 275 |
| 275 } // namespace guest_view | 276 } // namespace guest_view |
| 276 | 277 |
| 277 #endif // COMPONENTS_GUEST_VIEW_BROWSER_GUEST_VIEW_MANAGER_H_ | 278 #endif // COMPONENTS_GUEST_VIEW_BROWSER_GUEST_VIEW_MANAGER_H_ |
| OLD | NEW |