OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_CROSS_SITE_REQUEST_MANAGER_H_ | 5 #ifndef CONTENT_BROWSER_CROSS_SITE_REQUEST_MANAGER_H_ |
6 #define CONTENT_BROWSER_CROSS_SITE_REQUEST_MANAGER_H_ | 6 #define CONTENT_BROWSER_CROSS_SITE_REQUEST_MANAGER_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/synchronization/lock.h" | 12 #include "base/synchronization/lock.h" |
13 | 13 |
14 template <typename T> struct DefaultSingletonTraits; | 14 template <typename T> struct DefaultSingletonTraits; |
15 | 15 |
16 namespace content { | |
17 | |
18 // CrossSiteRequestManager is used to handle bookkeeping for cross-site | 16 // CrossSiteRequestManager is used to handle bookkeeping for cross-site |
19 // requests and responses between the UI and IO threads. Such requests involve | 17 // requests and responses between the UI and IO threads. Such requests involve |
20 // a transition from one RenderViewHost to another within WebContentsImpl, and | 18 // a transition from one RenderViewHost to another within WebContentsImpl, and |
21 // involve coordination with ResourceDispatcherHost. | 19 // involve coordination with ResourceDispatcherHost. |
22 // | 20 // |
23 // CrossSiteRequestManager is a singleton that may be used on any thread. | 21 // CrossSiteRequestManager is a singleton that may be used on any thread. |
24 // | 22 // |
25 class CrossSiteRequestManager { | 23 class CrossSiteRequestManager { |
26 public: | 24 public: |
27 // Returns the singleton instance. | 25 // Returns the singleton instance. |
(...skipping 23 matching lines...) Expand all Loading... |
51 base::Lock lock_; | 49 base::Lock lock_; |
52 | 50 |
53 // Set of (render_process_host_id, render_view_id) pairs of all | 51 // Set of (render_process_host_id, render_view_id) pairs of all |
54 // RenderViewHosts that have pending cross-site requests. Used to pass | 52 // RenderViewHosts that have pending cross-site requests. Used to pass |
55 // information about the RenderViewHosts between the UI and IO threads. | 53 // information about the RenderViewHosts between the UI and IO threads. |
56 RenderViewSet pending_cross_site_views_; | 54 RenderViewSet pending_cross_site_views_; |
57 | 55 |
58 DISALLOW_COPY_AND_ASSIGN(CrossSiteRequestManager); | 56 DISALLOW_COPY_AND_ASSIGN(CrossSiteRequestManager); |
59 }; | 57 }; |
60 | 58 |
61 } // namespace content | |
62 | |
63 #endif // CONTENT_BROWSER_CROSS_SITE_REQUEST_MANAGER_H_ | 59 #endif // CONTENT_BROWSER_CROSS_SITE_REQUEST_MANAGER_H_ |
OLD | NEW |