// Copyright 2021 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CONTENT_BROWSER_SITE_INSTANCE_GROUP_MANAGER_H_ #define CONTENT_BROWSER_SITE_INSTANCE_GROUP_MANAGER_H_ #include "base/memory/raw_ptr.h" #include "content/public/browser/render_process_host_observer.h" namespace content { class RenderProcessHost; class SiteInstanceImpl; // Policy class that manages groups of SiteInstances and controls whether // they share a process and/or need to use proxies to communicate with each // other. This decouples the process model from the SiteInfo granularity used // by SiteInstances. There are three supported modes: // 1) SiteInstances placed in the same group will share a process and will not // use proxies to communicate with other members of the same group. // 2) SiteInstances can be placed in different groups, but still share a // process. These SiteInstances will use proxies to communicate with frames // in the same process as well as cross process frames. // 3) SiteInstances that require a dedicated process will always be placed in // their own group and given a process that is not shared with other // principals (i.e., SiteInfos). // // This policy object is owned by a BrowsingInstance and the groups it manages // only contain SiteInstances associated with that BrowsingInstance. // // TODO: Update description to include details about when/how SiteInstances // get assigned to groups. Currently this object only holds the logic for the // 'default process' model which implements mode 2 mentioned above for any // SiteInstance that does not require a dedicated process. class SiteInstanceGroupManager final : private RenderProcessHostObserver { … }; } // namespace content #endif // CONTENT_BROWSER_SITE_INSTANCE_GROUP_MANAGER_H_