| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_RENDERER_HOST_SITE_INSTANCE_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_SITE_INSTANCE_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_SITE_INSTANCE_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_SITE_INSTANCE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "content/browser/renderer_host/render_process_host_impl.h" | 9 #include "content/browser/renderer_host/render_process_host_impl.h" |
| 10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 // Get the effective URL for the given actual URL. | 165 // Get the effective URL for the given actual URL. |
| 166 static GURL GetEffectiveURL(content::BrowserContext* browser_context, | 166 static GURL GetEffectiveURL(content::BrowserContext* browser_context, |
| 167 const GURL& url); | 167 const GURL& url); |
| 168 | 168 |
| 169 private: | 169 private: |
| 170 // content::NotificationObserver implementation. | 170 // content::NotificationObserver implementation. |
| 171 virtual void Observe(int type, | 171 virtual void Observe(int type, |
| 172 const content::NotificationSource& source, | 172 const content::NotificationSource& source, |
| 173 const content::NotificationDetails& details) OVERRIDE; | 173 const content::NotificationDetails& details) OVERRIDE; |
| 174 | 174 |
| 175 // Used to restrict a process' origin access rights. |
| 176 void LockToOrigin(); |
| 177 |
| 175 // The next available SiteInstance ID. | 178 // The next available SiteInstance ID. |
| 176 static int32 next_site_instance_id_; | 179 static int32 next_site_instance_id_; |
| 177 | 180 |
| 178 // A unique ID for this SiteInstance. | 181 // A unique ID for this SiteInstance. |
| 179 int32 id_; | 182 int32 id_; |
| 180 | 183 |
| 181 content::NotificationRegistrar registrar_; | 184 content::NotificationRegistrar registrar_; |
| 182 | 185 |
| 183 // BrowsingInstance to which this SiteInstance belongs. | 186 // BrowsingInstance to which this SiteInstance belongs. |
| 184 scoped_refptr<BrowsingInstance> browsing_instance_; | 187 scoped_refptr<BrowsingInstance> browsing_instance_; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 201 // The web site that this SiteInstance is rendering pages for. | 204 // The web site that this SiteInstance is rendering pages for. |
| 202 GURL site_; | 205 GURL site_; |
| 203 | 206 |
| 204 // Whether SetSite has been called. | 207 // Whether SetSite has been called. |
| 205 bool has_site_; | 208 bool has_site_; |
| 206 | 209 |
| 207 DISALLOW_COPY_AND_ASSIGN(SiteInstance); | 210 DISALLOW_COPY_AND_ASSIGN(SiteInstance); |
| 208 }; | 211 }; |
| 209 | 212 |
| 210 #endif // CONTENT_BROWSER_RENDERER_HOST_SITE_INSTANCE_H_ | 213 #endif // CONTENT_BROWSER_RENDERER_HOST_SITE_INSTANCE_H_ |
| OLD | NEW |