From 4858e43121ea40123e3b229320fccb88063cf4af Mon Sep 17 00:00:00 2001 From: "fsamuel@chromium.org" Date: Mon, 23 Jun 2014 18:14:17 +0000 Subject: Remove GuestWebContentsCreated This CL introduces GuestViewInternal.createGuest which replaces GuestViewInternal.allocateInstanceId. This new internal API does the following: 1. Allocates an instance ID. 2. Creates a new guest delegate of the specified and guest WebContents, without navigating the new WebContents. 3. On attachment, the new WebContents is navigated. In this CL, the particular GuestView type decides how to create the WebContents. Thus can create WebContents with SiteInstances of the form chrome-guest:// whereas can create guests with the SiteInstances matching the app they are hosting. BrowserPluginGuestDelegate (e.g. WebViewGuest) is now passed in to the constructor of BrowserPluginGuest. Now, we can assume a delegate always exists. I added a DCHECK to the constructor. With this patch, BrowserPluginGuestDelegate outlives BrowserPluginGuest too so we can always assume delegate_ is safe to access. BUG=364141 NOTRY=true Review URL: https://codereview.chromium.org/336283002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@279140 0039d316-1c4b-4281-b951-d872f2087c98 --- extensions/browser/extension_function_histogram_value.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'extensions/browser') diff --git a/extensions/browser/extension_function_histogram_value.h b/extensions/browser/extension_function_histogram_value.h index 97e631b..e175cb4 100644 --- a/extensions/browser/extension_function_histogram_value.h +++ b/extensions/browser/extension_function_histogram_value.h @@ -844,7 +844,7 @@ enum HistogramValue { STREAMSPRIVATE_ABORT, MANAGEMENT_SETLAUNCHTYPE, MANAGEMENT_GENERATEAPPFORLINK, - GUESTVIEWINTERNAL_ALLOCATEINSTANCEID, + DELETED_GUESTVIEWINTERNAL_ALLOCATEINSTANCEID, WEBVIEW_NAVIGATE, INPUTMETHODPRIVATE_GETCURRENTINPUTMETHOD, INPUTMETHODPRIVATE_SETCURRENTINPUTMETHOD, @@ -857,6 +857,7 @@ enum HistogramValue { WEBSTOREPRIVATE_LAUNCHEPHEMERALAPP, FILESYSTEMPROVIDERINTERNAL_OPERATIONREQUESTEDERROR, FILESYSTEMPROVIDERINTERNAL_OPERATIONREQUESTEDSUCCESS, + GUESTVIEWINTERNAL_CREATEGUEST, // Last entry: Add new entries above and ensure to update // tools/metrics/histograms/histograms/histograms.xml. ENUM_BOUNDARY -- cgit v1.1