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_PUBLIC_BROWSER_SITE_INSTANCE_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_SITE_INSTANCE_H_ |
6 #define CONTENT_PUBLIC_BROWSER_SITE_INSTANCE_H_ | 6 #define CONTENT_PUBLIC_BROWSER_SITE_INSTANCE_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
67 // rendered it. Each RenderFrameHost also points to the SiteInstance that it is | 67 // rendered it. Each RenderFrameHost also points to the SiteInstance that it is |
68 // associated with. A SiteInstance keeps track of the number of these | 68 // associated with. A SiteInstance keeps track of the number of these |
69 // references and deletes itself when the count goes to zero. This means that | 69 // references and deletes itself when the count goes to zero. This means that |
70 // a SiteInstance is only live as long as it is accessible, either from new | 70 // a SiteInstance is only live as long as it is accessible, either from new |
71 // tabs with no NavigationEntries or in NavigationEntries in the history. | 71 // tabs with no NavigationEntries or in NavigationEntries in the history. |
72 // | 72 // |
73 /////////////////////////////////////////////////////////////////////////////// | 73 /////////////////////////////////////////////////////////////////////////////// |
74 class CONTENT_EXPORT SiteInstance : public base::RefCounted<SiteInstance> { | 74 class CONTENT_EXPORT SiteInstance : public base::RefCounted<SiteInstance> { |
75 public: | 75 public: |
76 // Returns a unique ID for this SiteInstance. | 76 // Returns a unique ID for this SiteInstance. |
77 virtual int32_t GetId() = 0; | 77 virtual int32_t GetId() const = 0; |
nasko
2016/02/11 18:21:28
Per content/ API design, no const usage in the pub
lfg
2016/02/11 20:26:09
Done.
| |
78 | 78 |
79 // Whether this SiteInstance has a running process associated with it. | 79 // Whether this SiteInstance has a running process associated with it. |
80 // This may return true before the first call to GetProcess(), in cases where | 80 // This may return true before the first call to GetProcess(), in cases where |
81 // we use process-per-site and there is an existing process available. | 81 // we use process-per-site and there is an existing process available. |
82 virtual bool HasProcess() const = 0; | 82 virtual bool HasProcess() const = 0; |
83 | 83 |
84 // Returns the current RenderProcessHost being used to render pages for this | 84 // Returns the current RenderProcessHost being used to render pages for this |
85 // SiteInstance. If there is no RenderProcessHost (because either none has | 85 // SiteInstance. If there is no RenderProcessHost (because either none has |
86 // yet been created or there was one but it was cleanly destroyed (e.g. when | 86 // yet been created or there was one but it was cleanly destroyed (e.g. when |
87 // it is not actively being used)), then this method will create a new | 87 // it is not actively being used)), then this method will create a new |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
164 protected: | 164 protected: |
165 friend class base::RefCounted<SiteInstance>; | 165 friend class base::RefCounted<SiteInstance>; |
166 | 166 |
167 SiteInstance() {} | 167 SiteInstance() {} |
168 virtual ~SiteInstance() {} | 168 virtual ~SiteInstance() {} |
169 }; | 169 }; |
170 | 170 |
171 } // namespace content. | 171 } // namespace content. |
172 | 172 |
173 #endif // CONTENT_PUBLIC_BROWSER_SITE_INSTANCE_H_ | 173 #endif // CONTENT_PUBLIC_BROWSER_SITE_INSTANCE_H_ |
OLD | NEW |