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