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

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

Issue 2437253002: Improve TDI render process naming in the task manager. (Closed)
Patch Set: ncarter Created 4 years, 1 month 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_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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 // SiteInstance interface overrides. 42 // SiteInstance interface overrides.
43 int32_t GetId() override; 43 int32_t GetId() override;
44 bool HasProcess() const override; 44 bool HasProcess() const override;
45 RenderProcessHost* GetProcess() override; 45 RenderProcessHost* GetProcess() override;
46 BrowserContext* GetBrowserContext() const override; 46 BrowserContext* GetBrowserContext() const override;
47 const GURL& GetSiteURL() const override; 47 const GURL& GetSiteURL() const override;
48 scoped_refptr<SiteInstance> GetRelatedSiteInstance(const GURL& url) override; 48 scoped_refptr<SiteInstance> GetRelatedSiteInstance(const GURL& url) override;
49 bool IsRelatedSiteInstance(const SiteInstance* instance) override; 49 bool IsRelatedSiteInstance(const SiteInstance* instance) override;
50 size_t GetRelatedActiveContentsCount() override; 50 size_t GetRelatedActiveContentsCount() override;
51 bool RequiresDedicatedProcess() override; 51 bool RequiresDedicatedProcess() override;
52 bool IsDefaultSubframeSiteInstance() const override;
52 53
53 // Returns the SiteInstance, related to this one, that should be used 54 // Returns the SiteInstance, related to this one, that should be used
54 // for subframes when an oopif is required, but a dedicated process is not. 55 // for subframes when an oopif is required, but a dedicated process is not.
55 // This SiteInstance will be created if it doesn't already exist. There is 56 // This SiteInstance will be created if it doesn't already exist. There is
56 // at most one of these per BrowsingInstance. 57 // at most one of these per BrowsingInstance.
57 scoped_refptr<SiteInstanceImpl> GetDefaultSubframeSiteInstance(); 58 scoped_refptr<SiteInstanceImpl> GetDefaultSubframeSiteInstance();
58 59
59 // Set the web site that this SiteInstance is rendering pages for. 60 // Set the web site that this SiteInstance is rendering pages for.
60 // This includes the scheme and registered domain, but not the port. If the 61 // This includes the scheme and registered domain, but not the port. If the
61 // 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
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 // that, unlike active_frame_count, this does not count pending RFHs. 94 // that, unlike active_frame_count, this does not count pending RFHs.
94 void IncrementRelatedActiveContentsCount(); 95 void IncrementRelatedActiveContentsCount();
95 96
96 // Decrease the number of active WebContentses using this SiteInstance. Note 97 // Decrease the number of active WebContentses using this SiteInstance. Note
97 // that, unlike active_frame_count, this does not count pending RFHs. 98 // that, unlike active_frame_count, this does not count pending RFHs.
98 void DecrementRelatedActiveContentsCount(); 99 void DecrementRelatedActiveContentsCount();
99 100
100 void AddObserver(Observer* observer); 101 void AddObserver(Observer* observer);
101 void RemoveObserver(Observer* observer); 102 void RemoveObserver(Observer* observer);
102 103
103 bool is_default_subframe_site_instance() {
104 return is_default_subframe_site_instance_;
105 }
106
107 // Sets the global factory used to create new RenderProcessHosts. It may be 104 // Sets the global factory used to create new RenderProcessHosts. It may be
108 // NULL, in which case the default RenderProcessHost will be created (this is 105 // NULL, in which case the default RenderProcessHost will be created (this is
109 // the behavior if you don't call this function). The factory must be set 106 // the behavior if you don't call this function). The factory must be set
110 // back to NULL before it's destroyed; ownership is not transferred. 107 // back to NULL before it's destroyed; ownership is not transferred.
111 static void set_render_process_host_factory( 108 static void set_render_process_host_factory(
112 const RenderProcessHostFactory* rph_factory); 109 const RenderProcessHostFactory* rph_factory);
113 110
114 // Get the effective URL for the given actual URL. This allows the 111 // Get the effective URL for the given actual URL. This allows the
115 // ContentBrowserClient to override the SiteInstance's site for certain URLs. 112 // ContentBrowserClient to override the SiteInstance's site for certain URLs.
116 // For example, Chrome uses this to replace hosted app URLs with extension 113 // For example, Chrome uses this to replace hosted app URLs with extension
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 bool is_default_subframe_site_instance_; 181 bool is_default_subframe_site_instance_;
185 182
186 base::ObserverList<Observer, true> observers_; 183 base::ObserverList<Observer, true> observers_;
187 184
188 DISALLOW_COPY_AND_ASSIGN(SiteInstanceImpl); 185 DISALLOW_COPY_AND_ASSIGN(SiteInstanceImpl);
189 }; 186 };
190 187
191 } // namespace content 188 } // namespace content
192 189
193 #endif // CONTENT_BROWSER_SITE_INSTANCE_IMPL_H_ 190 #endif // CONTENT_BROWSER_SITE_INSTANCE_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/frame_host/render_frame_host_manager.cc ('k') | content/browser/site_instance_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698