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

Issue 336283002: Remove GuestWebContentsCreated (Closed)

Created:
6 years, 6 months ago by Fady Samuel
Modified:
6 years, 6 months ago
CC:
chromium-reviews, extensions-reviews_chromium.org, creis+watch_chromium.org, nasko+codewatch_chromium.org, jam, darin-cc_chromium.org, chromium-apps-reviews_chromium.org, miu+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@simplify_creation
Project:
chromium
Visibility:
Public.

Description

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 <webview> can create WebContents with SiteInstances of the form chrome-guest:// whereas <appview> 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 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=279140

Patch Set 1 #

Patch Set 2 : Fixed crash at tear down. TODO: lifetime management tweaks #

Patch Set 3 : Fixed lifetime #

Total comments: 41

Patch Set 4 : Simplified comments #

Total comments: 2

Patch Set 5 : Addressed comments #

Total comments: 4

Patch Set 6 : Rename existing enum #

Patch Set 7 : Fix diff #

Total comments: 2

Patch Set 8 : Fixed histograms.xml and extension_function_histogram_value #

Patch Set 9 : Rebase #

Patch Set 10 : Merge with ToT #

Unified diffs Side-by-side diffs Delta from patch set Stats (+440 lines, -418 lines) Patch
M chrome/browser/chrome_content_browser_client.h View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -7 lines 0 comments Download
M chrome/browser/chrome_content_browser_client.cc View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -66 lines 0 comments Download
M chrome/browser/extensions/api/guest_view/guest_view_internal_api.h View 1 chunk +6 lines, -7 lines 0 comments Download
M chrome/browser/extensions/api/guest_view/guest_view_internal_api.cc View 1 2 3 4 5 6 7 8 2 chunks +23 lines, -8 lines 0 comments Download
M chrome/browser/guest_view/guest_view_base.h View 1 2 3 4 8 chunks +59 lines, -28 lines 0 comments Download
M chrome/browser/guest_view/guest_view_base.cc View 1 2 3 4 5 6 7 8 5 chunks +57 lines, -9 lines 0 comments Download
M chrome/browser/guest_view/guest_view_manager.h View 1 2 3 3 chunks +17 lines, -11 lines 0 comments Download
M chrome/browser/guest_view/guest_view_manager.cc View 1 2 3 3 chunks +32 lines, -72 lines 0 comments Download
M chrome/browser/guest_view/web_view/web_view_guest.h View 1 2 3 4 5 chunks +12 lines, -10 lines 0 comments Download
M chrome/browser/guest_view/web_view/web_view_guest.cc View 1 2 3 4 5 6 7 8 9 10 chunks +136 lines, -68 lines 0 comments Download
M chrome/common/extensions/api/guest_view_internal.json View 1 chunk +16 lines, -1 line 0 comments Download
M chrome/renderer/resources/extensions/web_view.js View 1 2 3 4 5 6 7 8 1 chunk +9 lines, -2 lines 0 comments Download
M content/browser/browser_plugin/browser_plugin_embedder.cc View 1 chunk +0 lines, -13 lines 0 comments Download
M content/browser/browser_plugin/browser_plugin_guest.h View 1 2 3 4 7 chunks +10 lines, -14 lines 0 comments Download
M content/browser/browser_plugin/browser_plugin_guest.cc View 1 2 3 4 7 chunks +21 lines, -37 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.cc View 1 2 3 4 5 6 7 8 9 2 chunks +8 lines, -13 lines 0 comments Download
M content/content_browser.gypi View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M content/public/browser/browser_plugin_guest_delegate.h View 1 2 3 4 3 chunks +7 lines, -2 lines 0 comments Download
A content/public/browser/browser_plugin_guest_delegate.cc View 1 2 3 1 chunk +18 lines, -0 lines 0 comments Download
M content/public/browser/browser_plugin_guest_manager.h View 1 chunk +0 lines, -11 lines 0 comments Download
M content/public/browser/browser_plugin_guest_manager.cc View 1 chunk +0 lines, -11 lines 0 comments Download
M content/public/browser/content_browser_client.h View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -18 lines 0 comments Download
M content/public/browser/web_contents.h View 1 2 3 2 chunks +3 lines, -7 lines 0 comments Download
M content/public/browser/web_contents.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M extensions/browser/extension_function_histogram_value.h View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -1 line 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 38 (0 generated)
Fady Samuel
6 years, 6 months ago (2014-06-17 18:16:46 UTC) #1
lazyboy
https://chromiumcodereview.appspot.com/336283002/diff/40001/chrome/browser/apps/web_view_browsertest.cc File chrome/browser/apps/web_view_browsertest.cc (right): https://chromiumcodereview.appspot.com/336283002/diff/40001/chrome/browser/apps/web_view_browsertest.cc#newcode6 chrome/browser/apps/web_view_browsertest.cc:6: #include "base/memory/singleton.h" Revert. https://chromiumcodereview.appspot.com/336283002/diff/40001/chrome/browser/chrome_content_browser_client.cc File chrome/browser/chrome_content_browser_client.cc (left): https://chromiumcodereview.appspot.com/336283002/diff/40001/chrome/browser/chrome_content_browser_client.cc#oldcode828 chrome/browser/chrome_content_browser_client.cc:828: ...
6 years, 6 months ago (2014-06-17 23:46:46 UTC) #2
Fady Samuel
PTAL https://codereview.chromium.org/336283002/diff/40001/chrome/browser/apps/web_view_browsertest.cc File chrome/browser/apps/web_view_browsertest.cc (right): https://codereview.chromium.org/336283002/diff/40001/chrome/browser/apps/web_view_browsertest.cc#newcode6 chrome/browser/apps/web_view_browsertest.cc:6: #include "base/memory/singleton.h" On 2014/06/17 23:46:45, lazyboy wrote: > ...
6 years, 6 months ago (2014-06-18 21:08:34 UTC) #3
lazyboy
lgtm One renaming suggestions, looks good. https://chromiumcodereview.appspot.com/336283002/diff/40001/chrome/browser/extensions/api/guest_view/guest_view_internal_api.cc File chrome/browser/extensions/api/guest_view/guest_view_internal_api.cc (right): https://chromiumcodereview.appspot.com/336283002/diff/40001/chrome/browser/extensions/api/guest_view/guest_view_internal_api.cc#newcode22 chrome/browser/extensions/api/guest_view/guest_view_internal_api.cc:22: std::string view_type; On ...
6 years, 6 months ago (2014-06-19 16:17:32 UTC) #4
Fady Samuel
+asvitkine@ for extensions/browser/extension_function_histogram_value.h +jam for content/public changes. https://codereview.chromium.org/336283002/diff/40001/chrome/browser/guest_view/guest_view_base.h File chrome/browser/guest_view/guest_view_base.h (right): https://codereview.chromium.org/336283002/diff/40001/chrome/browser/guest_view/guest_view_base.h#newcode120 chrome/browser/guest_view/guest_view_base.h:120: void Init(const ...
6 years, 6 months ago (2014-06-20 15:16:35 UTC) #5
Fady Samuel
6 years, 6 months ago (2014-06-20 15:16:47 UTC) #6
Fady Samuel
6 years, 6 months ago (2014-06-20 15:16:47 UTC) #7
Alexei Svitkine (slow)
https://codereview.chromium.org/336283002/diff/80001/extensions/browser/extension_function_histogram_value.h File extensions/browser/extension_function_histogram_value.h (left): https://codereview.chromium.org/336283002/diff/80001/extensions/browser/extension_function_histogram_value.h#oldcode847 extensions/browser/extension_function_histogram_value.h:847: GUESTVIEWINTERNAL_ALLOCATEINSTANCEID, It's incorrect to remove elements here, since this ...
6 years, 6 months ago (2014-06-20 15:18:27 UTC) #8
jam
https://codereview.chromium.org/336283002/diff/80001/content/public/browser/browser_plugin_guest_delegate.h File content/public/browser/browser_plugin_guest_delegate.h (right): https://codereview.chromium.org/336283002/diff/80001/content/public/browser/browser_plugin_guest_delegate.h#newcode41 content/public/browser/browser_plugin_guest_delegate.h:41: virtual int GetGuestInstanceID() const; i thought the instance ids ...
6 years, 6 months ago (2014-06-20 15:58:27 UTC) #9
Fady Samuel
https://codereview.chromium.org/336283002/diff/80001/content/public/browser/browser_plugin_guest_delegate.h File content/public/browser/browser_plugin_guest_delegate.h (right): https://codereview.chromium.org/336283002/diff/80001/content/public/browser/browser_plugin_guest_delegate.h#newcode41 content/public/browser/browser_plugin_guest_delegate.h:41: virtual int GetGuestInstanceID() const; On 2014/06/20 15:58:27, jam wrote: ...
6 years, 6 months ago (2014-06-20 16:09:01 UTC) #10
Fady Samuel
PTAL Alexei and John! Thanks!
6 years, 6 months ago (2014-06-20 16:12:28 UTC) #11
Alexei Svitkine (slow)
https://codereview.chromium.org/336283002/diff/140001/extensions/browser/extension_function_histogram_value.h File extensions/browser/extension_function_histogram_value.h (left): https://codereview.chromium.org/336283002/diff/140001/extensions/browser/extension_function_histogram_value.h#oldcode847 extensions/browser/extension_function_histogram_value.h:847: GUESTVIEWINTERNAL_ALLOCATEINSTANCEID, Re-using this value for another API is still ...
6 years, 6 months ago (2014-06-20 17:15:11 UTC) #12
Fady Samuel
PTAL Alexei https://codereview.chromium.org/336283002/diff/140001/extensions/browser/extension_function_histogram_value.h File extensions/browser/extension_function_histogram_value.h (left): https://codereview.chromium.org/336283002/diff/140001/extensions/browser/extension_function_histogram_value.h#oldcode847 extensions/browser/extension_function_histogram_value.h:847: GUESTVIEWINTERNAL_ALLOCATEINSTANCEID, On 2014/06/20 17:15:11, Alexei Svitkine wrote: ...
6 years, 6 months ago (2014-06-20 17:43:51 UTC) #13
jam
lgtm
6 years, 6 months ago (2014-06-20 17:44:56 UTC) #14
Alexei Svitkine (slow)
lgtm
6 years, 6 months ago (2014-06-20 17:52:40 UTC) #15
Fady Samuel
The CQ bit was checked by fsamuel@chromium.org
6 years, 6 months ago (2014-06-20 22:54:49 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/fsamuel@chromium.org/336283002/160001
6 years, 6 months ago (2014-06-20 23:00:08 UTC) #17
Fady Samuel
The CQ bit was unchecked by fsamuel@chromium.org
6 years, 6 months ago (2014-06-21 00:08:51 UTC) #18
Fady Samuel
The CQ bit was checked by fsamuel@chromium.org
6 years, 6 months ago (2014-06-21 00:08:53 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/fsamuel@chromium.org/336283002/160001
6 years, 6 months ago (2014-06-21 00:09:36 UTC) #20
Fady Samuel
The CQ bit was checked by fsamuel@chromium.org
6 years, 6 months ago (2014-06-21 04:16:04 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/fsamuel@chromium.org/336283002/180001
6 years, 6 months ago (2014-06-21 04:17:33 UTC) #22
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: chromium_presubmit on tryserver.chromium ...
6 years, 6 months ago (2014-06-21 06:18:33 UTC) #23
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-06-21 06:21:52 UTC) #24
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/chromium_presubmit/builds/75376) linux_chromium_chromeos_rel on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/linux_chromium_chromeos_rel/builds/40462) win_chromium_rel ...
6 years, 6 months ago (2014-06-21 06:21:53 UTC) #25
lazyboy
The CQ bit was checked by lazyboy@chromium.org
6 years, 6 months ago (2014-06-21 12:09:29 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/fsamuel@chromium.org/336283002/180001
6 years, 6 months ago (2014-06-21 12:10:29 UTC) #27
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: chromium_presubmit on tryserver.chromium ...
6 years, 6 months ago (2014-06-21 12:16:57 UTC) #28
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-06-21 12:20:37 UTC) #29
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/chromium_presubmit/builds/75454) linux_chromium_chromeos_rel on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/linux_chromium_chromeos_rel/builds/40606)
6 years, 6 months ago (2014-06-21 12:20:38 UTC) #30
Fady Samuel
The CQ bit was checked by fsamuel@chromium.org
6 years, 6 months ago (2014-06-23 15:24:18 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/fsamuel@chromium.org/336283002/200001
6 years, 6 months ago (2014-06-23 15:25:29 UTC) #32
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: chromium_presubmit on tryserver.chromium ...
6 years, 6 months ago (2014-06-23 17:39:09 UTC) #33
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-06-23 17:42:54 UTC) #34
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/chromium_presubmit/builds/75710)
6 years, 6 months ago (2014-06-23 17:42:55 UTC) #35
Fady Samuel
The CQ bit was checked by fsamuel@chromium.org
6 years, 6 months ago (2014-06-23 18:00:36 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/fsamuel@chromium.org/336283002/200001
6 years, 6 months ago (2014-06-23 18:01:38 UTC) #37
commit-bot: I haz the power
6 years, 6 months ago (2014-06-23 18:14:26 UTC) #38
Message was sent while issue was closed.
Change committed as 279140

Powered by Google App Engine
This is Rietveld 408576698