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

Side by Side Diff: content/browser/browsing_instance.h

Issue 1777233002: Top document isolation mode prototype (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Doghouse SiteInstance, with bugs Created 4 years, 9 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 (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_BROWSING_INSTANCE_H_ 5 #ifndef CONTENT_BROWSER_BROWSING_INSTANCE_H_
6 #define CONTENT_BROWSER_BROWSING_INSTANCE_H_ 6 #define CONTENT_BROWSER_BROWSING_INSTANCE_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include "base/containers/hash_tables.h" 10 #include "base/containers/hash_tables.h"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 101
102 private: 102 private:
103 // Map of site to SiteInstance, to ensure we only have one SiteInstance per 103 // Map of site to SiteInstance, to ensure we only have one SiteInstance per
104 // site. 104 // site.
105 typedef base::hash_map<std::string, SiteInstance*> SiteInstanceMap; 105 typedef base::hash_map<std::string, SiteInstance*> SiteInstanceMap;
106 106
107 // Common browser context to which all SiteInstances in this BrowsingInstance 107 // Common browser context to which all SiteInstances in this BrowsingInstance
108 // must belong. 108 // must belong.
109 BrowserContext* const browser_context_; 109 BrowserContext* const browser_context_;
110 110
111 // TODO(xiaochengh): Say something...
112 SiteInstance* GetDoghouseSiteInstance() const;
113
111 // Map of site to SiteInstance, to ensure we only have one SiteInstance per 114 // Map of site to SiteInstance, to ensure we only have one SiteInstance per
112 // site. The site string should be the possibly_invalid_spec() of a GURL 115 // site. The site string should be the possibly_invalid_spec() of a GURL
113 // obtained with SiteInstanceImpl::GetSiteForURL. Note that this map may not 116 // obtained with SiteInstanceImpl::GetSiteForURL. Note that this map may not
114 // contain every active SiteInstance, because a race exists where two 117 // contain every active SiteInstance, because a race exists where two
115 // SiteInstances can be assigned to the same site. This is ok in rare cases. 118 // SiteInstances can be assigned to the same site. This is ok in rare cases.
116 // It also does not contain SiteInstances which have not yet been assigned a 119 // It also does not contain SiteInstances which have not yet been assigned a
117 // site, such as about:blank. See NavigatorImpl::ShouldAssignSiteForURL. 120 // site, such as about:blank. See NavigatorImpl::ShouldAssignSiteForURL.
118 SiteInstanceMap site_instance_map_; 121 SiteInstanceMap site_instance_map_;
119 122
120 // Number of WebContentses currently using this BrowsingInstance. 123 // Number of WebContentses currently using this BrowsingInstance.
121 size_t active_contents_count_; 124 size_t active_contents_count_;
122 125
123 DISALLOW_COPY_AND_ASSIGN(BrowsingInstance); 126 DISALLOW_COPY_AND_ASSIGN(BrowsingInstance);
124 }; 127 };
125 128
126 } // namespace content 129 } // namespace content
127 130
128 #endif // CONTENT_BROWSER_BROWSING_INSTANCE_H_ 131 #endif // CONTENT_BROWSER_BROWSING_INSTANCE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698