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

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 10978028: Propagate storage partition id and persistence to the browser. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merging with incoming changes (159475). Created 8 years, 3 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/common/browser_plugin_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/web_contents/web_contents_impl.cc
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index e6c8b6cdde374cd5ce922769f0341bed2bebc697..9291e9f115c90b8a1a3f70aa66eab23b76a33dd8 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -740,8 +740,8 @@ bool WebContentsImpl::OnMessageReceived(RenderViewHost* render_view_host,
IPC_MESSAGE_HANDLER(ViewHostMsg_WebUISend, OnWebUISend)
IPC_MESSAGE_HANDLER(ViewHostMsg_RequestPpapiBrokerPermission,
OnRequestPpapiBrokerPermission)
- IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_NavigateGuest,
- OnBrowserPluginNavigateGuest)
+ IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_CreateGuest,
+ OnBrowserPluginCreateGuest)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP_EX()
message_source_ = NULL;
@@ -2368,22 +2368,30 @@ void WebContentsImpl::OnPpapiBrokerPermissionResult(int request_id,
result));
}
-void WebContentsImpl::OnBrowserPluginNavigateGuest(
+void WebContentsImpl::OnBrowserPluginCreateGuest(
int instance_id,
- const std::string& src,
- const BrowserPluginHostMsg_ResizeGuest_Params& resize_params) {
- // This is the first 'navigate' to a browser plugin, before WebContents has/is
- // an 'Embedder'; subsequent navigate messages for this WebContents will
- // be handled by the BrowserPluginEmbedderHelper of the embedder itself (this
- // also means any message from browser plugin renderer prior to NavigateGuest
- // which is not NavigateGuest will be ignored). Therefore
- // |browser_plugin_embedder_| should not be set.
+ const std::string& storage_partition_id,
+ bool persist_storage) {
+ // This creates a BrowserPluginEmbedder, which handles all the BrowserPlugin
+ // specific messages for this WebContents (through its
+ // BrowserPluginEmbedderHelper). This means that any message from browser
+ // plugin renderer prior to CreateGuest will be ignored.
// For more info, see comment above classes BrowserPluginEmbedder and
// BrowserPluginGuest.
CHECK(!browser_plugin_embedder_.get());
browser_plugin_embedder_.reset(
content::BrowserPluginEmbedder::Create(this, GetRenderViewHost()));
+ browser_plugin_embedder_->CreateGuest(GetRenderViewHost(),
+ instance_id,
+ storage_partition_id,
+ persist_storage);
+}
+
+void WebContentsImpl::OnBrowserPluginNavigateGuest(
+ int instance_id,
+ const std::string& src,
+ const BrowserPluginHostMsg_ResizeGuest_Params& resize_params) {
browser_plugin_embedder_->NavigateGuest(GetRenderViewHost(),
instance_id,
src,
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/common/browser_plugin_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698