| 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_SITE_INSTANCE_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_SITE_INSTANCE_IMPL_H_ |
| 6 #define CONTENT_BROWSER_SITE_INSTANCE_IMPL_H_ | 6 #define CONTENT_BROWSER_SITE_INSTANCE_IMPL_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 // URL does not have a valid registered domain, then the full hostname is | 62 // URL does not have a valid registered domain, then the full hostname is |
| 63 // stored. | 63 // stored. |
| 64 void SetSite(const GURL& url); | 64 void SetSite(const GURL& url); |
| 65 bool HasSite() const; | 65 bool HasSite() const; |
| 66 | 66 |
| 67 // Returns whether there is currently a related SiteInstance (registered with | 67 // Returns whether there is currently a related SiteInstance (registered with |
| 68 // BrowsingInstance) for the site of the given url. If so, we should try to | 68 // BrowsingInstance) for the site of the given url. If so, we should try to |
| 69 // avoid dedicating an unused SiteInstance to it (e.g., in a new tab). | 69 // avoid dedicating an unused SiteInstance to it (e.g., in a new tab). |
| 70 bool HasRelatedSiteInstance(const GURL& url); | 70 bool HasRelatedSiteInstance(const GURL& url); |
| 71 | 71 |
| 72 // Gets an ID of the BrowsingInstance this object is associated with. |
| 73 int GetBrowsingInstanceId() const; |
| 74 |
| 72 // Returns whether this SiteInstance has a process that is the wrong type for | 75 // Returns whether this SiteInstance has a process that is the wrong type for |
| 73 // the given URL. If so, the browser should force a process swap when | 76 // the given URL. If so, the browser should force a process swap when |
| 74 // navigating to the URL. | 77 // navigating to the URL. |
| 75 bool HasWrongProcessForURL(const GURL& url); | 78 bool HasWrongProcessForURL(const GURL& url); |
| 76 | 79 |
| 77 // Increase the number of active frames in this SiteInstance. This is | 80 // Increase the number of active frames in this SiteInstance. This is |
| 78 // increased when a frame is created, or a currently swapped out frame | 81 // increased when a frame is created, or a currently swapped out frame |
| 79 // is swapped in. | 82 // is swapped in. |
| 80 void IncrementActiveFrameCount(); | 83 void IncrementActiveFrameCount(); |
| 81 | 84 |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 bool is_default_subframe_site_instance_; | 189 bool is_default_subframe_site_instance_; |
| 187 | 190 |
| 188 base::ObserverList<Observer, true> observers_; | 191 base::ObserverList<Observer, true> observers_; |
| 189 | 192 |
| 190 DISALLOW_COPY_AND_ASSIGN(SiteInstanceImpl); | 193 DISALLOW_COPY_AND_ASSIGN(SiteInstanceImpl); |
| 191 }; | 194 }; |
| 192 | 195 |
| 193 } // namespace content | 196 } // namespace content |
| 194 | 197 |
| 195 #endif // CONTENT_BROWSER_SITE_INSTANCE_IMPL_H_ | 198 #endif // CONTENT_BROWSER_SITE_INSTANCE_IMPL_H_ |
| OLD | NEW |