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

Issue 1140173003: Allow whitelisted content scripts to be injected in WebViews. (Closed)

Created:
5 years, 7 months ago by dmazzoni
Modified:
5 years, 7 months ago
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org, David Tseng, Greg Levin
Base URL:
https://chromium.googlesource.com/chromium/src.git@document_has_focus
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Allow whitelisted content scripts to be injected in WebViews. The code that tried to inject ChromeVox into WebViews in chrome_web_view_guest_delegate.cc wasn't working. Instead, this allows whitelisted content scripts to be injected into WebViews. BUG=484904 Committed: https://crrev.com/0eee9bb6ceb5f90f051ede8665fd05319328b54d Cr-Commit-Position: refs/heads/master@{#330193}

Patch Set 1 #

Total comments: 6

Patch Set 2 : Remove some no-longer-needed WebViewGuestDelegate interfaces #

Total comments: 9

Patch Set 3 : Use PermissionsData to check whitelist #

Total comments: 3

Patch Set 4 : Fix WebViewTest.ChromeVoxInjection #

Patch Set 5 : git cl format #

Patch Set 6 : Use CanExecuteScriptEverywhere #

Patch Set 7 : Don't assume extensions_->GetByID will succeed #

Unified diffs Side-by-side diffs Delta from patch set Stats (+35 lines, -121 lines) Patch
M chrome/browser/apps/guest_view/web_view_browsertest.cc View 1 2 3 1 chunk +5 lines, -5 lines 0 comments Download
M chrome/browser/guest_view/web_view/chrome_web_view_guest_delegate.h View 1 3 chunks +0 lines, -22 lines 0 comments Download
M chrome/browser/guest_view/web_view/chrome_web_view_guest_delegate.cc View 1 3 chunks +0 lines, -53 lines 0 comments Download
M chrome/renderer/extensions/renderer_permissions_policy_delegate.cc View 1 2 3 4 5 1 chunk +1 line, -5 lines 0 comments Download
M extensions/browser/guest_view/web_view/web_view_guest.h View 1 2 1 chunk +0 lines, -2 lines 0 comments Download
M extensions/browser/guest_view/web_view/web_view_guest.cc View 1 2 3 chunks +0 lines, -13 lines 0 comments Download
M extensions/browser/guest_view/web_view/web_view_guest_delegate.h View 1 1 chunk +0 lines, -9 lines 0 comments Download
M extensions/browser/user_script_loader.cc View 1 2 3 4 2 chunks +5 lines, -5 lines 0 comments Download
M extensions/common/extension_messages.h View 1 chunk +5 lines, -2 lines 0 comments Download
M extensions/renderer/user_script_set.h View 1 chunk +2 lines, -1 line 0 comments Download
M extensions/renderer/user_script_set.cc View 1 2 3 4 5 6 3 chunks +10 lines, -1 line 0 comments Download
M extensions/renderer/user_script_set_manager.h View 1 chunk +2 lines, -1 line 0 comments Download
M extensions/renderer/user_script_set_manager.cc View 2 chunks +5 lines, -2 lines 0 comments Download

Messages

Total messages: 26 (4 generated)
dmazzoni
5 years, 7 months ago (2015-05-14 22:24:24 UTC) #2
Fady Samuel
This is really cool! Looks like this actually simplifies the code in Webview! A few ...
5 years, 7 months ago (2015-05-14 22:31:45 UTC) #3
dmazzoni
Great! Always nice to clean up the code as a side benefit. https://codereview.chromium.org/1140173003/diff/1/chrome/browser/guest_view/web_view/chrome_web_view_guest_delegate.cc File chrome/browser/guest_view/web_view/chrome_web_view_guest_delegate.cc ...
5 years, 7 months ago (2015-05-14 22:50:46 UTC) #4
not at google - send to devlin
https://codereview.chromium.org/1140173003/diff/20001/extensions/browser/user_script_loader.cc File extensions/browser/user_script_loader.cc (right): https://codereview.chromium.org/1140173003/diff/20001/extensions/browser/user_script_loader.cc#newcode383 extensions/browser/user_script_loader.cc:383: bool whitelisted_only = process->IsIsolatedGuest() && host_id().id().empty(); I need to ...
5 years, 7 months ago (2015-05-14 23:11:18 UTC) #5
dmazzoni
https://codereview.chromium.org/1140173003/diff/20001/extensions/browser/user_script_loader.cc File extensions/browser/user_script_loader.cc (right): https://codereview.chromium.org/1140173003/diff/20001/extensions/browser/user_script_loader.cc#newcode383 extensions/browser/user_script_loader.cc:383: bool whitelisted_only = process->IsIsolatedGuest() && host_id().id().empty(); On 2015/05/14 23:11:18, ...
5 years, 7 months ago (2015-05-14 23:28:37 UTC) #6
not at google - send to devlin
> Filtering out extensions that aren't allowed to run in that renderer from > changed_hosts ...
5 years, 7 months ago (2015-05-14 23:30:18 UTC) #7
Fady Samuel
One more bit of cleanup :-) This generally looks good from a web_view directory perspective, ...
5 years, 7 months ago (2015-05-14 23:32:00 UTC) #8
dmazzoni
On Thu, May 14, 2015 at 4:30 PM, <kalman@chromium.org> wrote: > Filtering out extensions that ...
5 years, 7 months ago (2015-05-14 23:47:16 UTC) #9
not at google - send to devlin
On 2015/05/14 23:47:16, dmazzoni wrote: > On Thu, May 14, 2015 at 4:30 PM, <mailto:kalman@chromium.org> ...
5 years, 7 months ago (2015-05-14 23:57:40 UTC) #10
not at google - send to devlin
lgtm though looks like there is a test failure relating to this. ping if fixing ...
5 years, 7 months ago (2015-05-15 00:05:36 UTC) #11
not at google - send to devlin
1 last comment for the paranoid. https://codereview.chromium.org/1140173003/diff/20001/extensions/renderer/user_script_set.cc File extensions/renderer/user_script_set.cc (right): https://codereview.chromium.org/1140173003/diff/20001/extensions/renderer/user_script_set.cc#newcode197 extensions/renderer/user_script_set.cc:197: if (host_id.type() == ...
5 years, 7 months ago (2015-05-15 04:47:34 UTC) #12
dmazzoni
On 2015/05/15 04:47:34, kalman wrote: > ... assuming there is a method that lets me ...
5 years, 7 months ago (2015-05-15 17:33:50 UTC) #13
dmazzoni
https://codereview.chromium.org/1140173003/diff/20001/extensions/browser/guest_view/web_view/web_view_guest.cc File extensions/browser/guest_view/web_view/web_view_guest.cc (right): https://codereview.chromium.org/1140173003/diff/20001/extensions/browser/guest_view/web_view/web_view_guest.cc#newcode810 extensions/browser/guest_view/web_view/web_view_guest.cc:810: void WebViewGuest::DocumentLoadedInFrame( On 2015/05/14 23:31:59, Fady Samuel wrote: > ...
5 years, 7 months ago (2015-05-15 17:33:57 UTC) #14
not at google - send to devlin
https://codereview.chromium.org/1140173003/diff/20001/extensions/renderer/user_script_set.cc File extensions/renderer/user_script_set.cc (right): https://codereview.chromium.org/1140173003/diff/20001/extensions/renderer/user_script_set.cc#newcode146 extensions/renderer/user_script_set.cc:146: const ExtensionsClient::ScriptingWhitelist& whitelist = On 2015/05/15 17:33:57, dmazzoni wrote: ...
5 years, 7 months ago (2015-05-15 17:38:11 UTC) #15
dmazzoni
Issues addressed, and I fixed the test failure too. https://codereview.chromium.org/1140173003/diff/20001/extensions/renderer/user_script_set.cc File extensions/renderer/user_script_set.cc (right): https://codereview.chromium.org/1140173003/diff/20001/extensions/renderer/user_script_set.cc#newcode146 extensions/renderer/user_script_set.cc:146: ...
5 years, 7 months ago (2015-05-15 17:56:28 UTC) #16
dmazzoni
+nasko for OWNERS review of extensions/common/extension_messages.h
5 years, 7 months ago (2015-05-15 17:57:21 UTC) #17
dmazzoni
Oops, trying again - +nasko for OWNERS review of extensions/common/extension_messages.h
5 years, 7 months ago (2015-05-15 17:57:55 UTC) #19
nasko
IPC LGTM
5 years, 7 months ago (2015-05-15 19:44:07 UTC) #20
Fady Samuel
guest_view lgtm!
5 years, 7 months ago (2015-05-15 20:03:08 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1140173003/100002
5 years, 7 months ago (2015-05-15 20:14:18 UTC) #24
commit-bot: I haz the power
Committed patchset #7 (id:100002)
5 years, 7 months ago (2015-05-15 20:59:18 UTC) #25
commit-bot: I haz the power
5 years, 7 months ago (2015-05-18 11:27:22 UTC) #26
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/0eee9bb6ceb5f90f051ede8665fd05319328b54d
Cr-Commit-Position: refs/heads/master@{#330193}

Powered by Google App Engine
This is Rietveld 408576698