diff options
author | mpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-22 23:56:30 +0000 |
---|---|---|
committer | mpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-22 23:56:30 +0000 |
commit | 3a8eecb2bb859491b344be321abb4ff3d2b7f0f3 (patch) | |
tree | 07f90f564c2c5d92d38f1fdae15597a523ca31c1 /chrome/renderer/render_thread.h | |
parent | 58bc899f2ffdc14d78b6f209f57415e79837d7a6 (diff) | |
download | chromium_src-3a8eecb2bb859491b344be321abb4ff3d2b7f0f3.zip chromium_src-3a8eecb2bb859491b344be321abb4ff3d2b7f0f3.tar.gz chromium_src-3a8eecb2bb859491b344be321abb4ff3d2b7f0f3.tar.bz2 |
Implement app process model isolation.
The process grouping logic is unfortunately duplicated in SiteInstance and
RenderView. URLs that are part of extension X's web extent get converted into
a pseudo URL of the form chrome-extension://X/path. This groups pages from an
extension app and its offline resources into the same process.
The rest is mostly plumbing and passing data around.
BUG=41273
Review URL: http://codereview.chromium.org/1735004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45384 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/render_thread.h')
-rw-r--r-- | chrome/renderer/render_thread.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/chrome/renderer/render_thread.h b/chrome/renderer/render_thread.h index e8396dd..ba5c849 100644 --- a/chrome/renderer/render_thread.h +++ b/chrome/renderer/render_thread.h @@ -18,6 +18,8 @@ #include "chrome/common/child_thread.h" #include "chrome/common/css_colors.h" #include "chrome/common/dom_storage_common.h" +#include "chrome/common/extensions/extension_extent.h" +#include "chrome/common/render_messages.h" #include "chrome/renderer/gpu_channel_host.h" #include "chrome/renderer/renderer_histogram_snapshots.h" #include "chrome/renderer/visitedlink_slave.h" @@ -185,7 +187,21 @@ class RenderThread : public RenderThreadBase, // has been lost. GpuChannelHost* GetGpuChannel(); + // Returns the extension ID that the given URL is a part of, or empty if + // none. This includes web URLs that are part of an extension's web extent. + // TODO(mpcomplete): this doesn't feel like it belongs here. Find a better + // place. + std::string GetExtensionIdForURL(const GURL& url); + private: + // Contains extension-related data that the renderer needs to know about. + // TODO(mpcomplete): this doesn't feel like it belongs here. Find a better + // place. + struct ExtensionInfo { + std::string extension_id; + ExtensionExtent web_extent; + }; + virtual void OnControlMessageReceived(const IPC::Message& msg); void Init(); @@ -198,6 +214,8 @@ class RenderThread : public RenderThreadBase, const GURL& url, const ContentSettings& content_settings); void OnUpdateUserScripts(base::SharedMemoryHandle table); void OnSetExtensionFunctionNames(const std::vector<std::string>& names); + void OnExtensionExtentsUpdated( + const ViewMsg_ExtensionExtentsUpdated_Params& params); void OnPageActionsUpdated(const std::string& extension_id, const std::vector<std::string>& page_actions); void OnDOMStorageEvent(const ViewMsg_DOMStorageEvent_Params& params); @@ -314,6 +332,10 @@ class RenderThread : public RenderThreadBase, // The channel from the renderer process to the GPU process. scoped_refptr<GpuChannelHost> gpu_channel_; + // A list of extension web extents, which tells us which URLs belong to an + // installed app. + std::vector<ExtensionInfo> extension_extents_; + DISALLOW_COPY_AND_ASSIGN(RenderThread); }; |