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

Issue 12189018: <webview>: Implement WebRequest API (Closed)

Created:
7 years, 10 months ago by Fady Samuel
Modified:
7 years, 7 months ago
Reviewers:
Matt Perry, sky
CC:
chromium-reviews, Aaron Boodman, darin-cc_chromium.org, chromium-apps-reviews_chromium.org
Visibility:
Public.

Description

<webview>: Implement WebRequest API This patch exposes the WebRequest in <webview> See http://developer.chrome.com/extensions/webRequest.html BUG=171421 TEST=WebViewTest.Shim Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=202469

Patch Set 1 #

Patch Set 2 : Support all events #

Total comments: 1

Patch Set 3 : Special case WebRequest listeners coming from <webview> #

Patch Set 4 : Use API definitions #

Patch Set 5 : Add parameters schema #

Patch Set 6 : Use webRequestDefinition #

Patch Set 7 : Removed unnecessary code #

Total comments: 5

Patch Set 8 : Lifetime of event listeners tied to <webview> lifetime #

Patch Set 9 : Diff from latest patch #

Total comments: 16

Patch Set 10 : Mark as experimental #

Patch Set 11 : Fixed DCHECK #

Patch Set 12 : Updated #

Patch Set 13 : Addressed comments #

Patch Set 14 : Merge with ToT + cleanup #

Total comments: 2

Patch Set 15 : Fixed unit test #

Total comments: 2

Patch Set 16 : Remove Events from EventRouter on WebView destruction #

Patch Set 17 : Fixed a comment #

Patch Set 18 : Merge with ToT #

Patch Set 19 : Minor fix to tear down #

Total comments: 1

Patch Set 20 : Removing tear down fix. Landing as a separate patch #

Total comments: 14

Patch Set 21 : Addressed sky@'s comments #

Total comments: 7

Patch Set 22 : Addressed sky's comments #

Patch Set 23 : Profile* => void* #

Unified diffs Side-by-side diffs Delta from patch set Stats (+358 lines, -22 lines) Patch
M chrome/browser/chrome_content_browser_client.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/browser/extensions/api/web_request/web_request_api.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +9 lines, -2 lines 0 comments Download
M chrome/browser/extensions/api/web_request/web_request_api.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 13 chunks +94 lines, -15 lines 0 comments Download
M chrome/browser/extensions/event_router.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/extensions/event_router.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +26 lines, -0 lines 0 comments Download
A chrome/browser/webview/webview_guest.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +49 lines, -0 lines 0 comments Download
A chrome/browser/webview/webview_guest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +80 lines, -0 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/common/extensions/api/web_request_internal.json View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -1 line 0 comments Download
M chrome/common/extensions/permissions/permission_set.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/renderer/resources/extensions/web_request_custom_bindings.js View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +6 lines, -3 lines 0 comments Download
M chrome/renderer/resources/extensions/web_view.js View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +8 lines, -0 lines 0 comments Download
M chrome/renderer/resources/extensions/web_view_experimental.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +33 lines, -1 line 0 comments Download
M chrome/test/data/extensions/platform_apps/web_view/shim/main.js View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +14 lines, -0 lines 0 comments Download
M content/common/browser_plugin/browser_plugin_constants.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
M content/common/browser_plugin/browser_plugin_constants.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/browser_plugin/browser_plugin_bindings.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +21 lines, -0 lines 0 comments Download

Messages

Total messages: 36 (0 generated)
Fady Samuel
This patch is not yet complete and is not yet ready for formal review. Sharing ...
7 years, 10 months ago (2013-02-04 21:54:48 UTC) #1
Matt Perry
https://codereview.chromium.org/12189018/diff/3001/chrome/renderer/resources/extensions/web_view.js File chrome/renderer/resources/extensions/web_view.js (right): https://codereview.chromium.org/12189018/diff/3001/chrome/renderer/resources/extensions/web_view.js#newcode137 chrome/renderer/resources/extensions/web_view.js:137: 'webRequest.' + eventName, null, {}, null, right here, you ...
7 years, 10 months ago (2013-02-05 00:47:25 UTC) #2
Fady Samuel
Hi Matt, I believe I've addressed most of the points we discussed yesterday. Could you ...
7 years, 10 months ago (2013-02-05 17:18:35 UTC) #3
Matt Perry
https://codereview.chromium.org/12189018/diff/17013/chrome/browser/extensions/api/web_request/web_request_api.cc File chrome/browser/extensions/api/web_request/web_request_api.cc (right): https://codereview.chromium.org/12189018/diff/17013/chrome/browser/extensions/api/web_request/web_request_api.cc#newcode129 chrome/browser/extensions/api/web_request/web_request_api.cc:129: bool IsWebRequestEvent(std::string event_name) { Use a local temporary rather ...
7 years, 10 months ago (2013-02-06 01:55:14 UTC) #4
Fady Samuel
This code is not yet ready for review. Please see the other issue I sent ...
7 years, 10 months ago (2013-02-06 02:07:12 UTC) #5
Matt Perry
https://codereview.chromium.org/12189018/diff/17013/chrome/browser/extensions/api/web_request/web_request_api.cc File chrome/browser/extensions/api/web_request/web_request_api.cc (right): https://codereview.chromium.org/12189018/diff/17013/chrome/browser/extensions/api/web_request/web_request_api.cc#newcode1867 chrome/browser/extensions/api/web_request/web_request_api.cc:1867: if (!is_guest && extension->GetEffectiveHostPermissions().is_empty()) { On 2013/02/06 02:07:12, Fady ...
7 years, 10 months ago (2013-02-06 02:11:38 UTC) #6
Fady Samuel
This is mostly ready for review with two points missing: 1. chrome/browser/extensions/extension_process_manager.cc is hitting a ...
7 years, 10 months ago (2013-02-06 21:19:06 UTC) #7
Matt Perry
https://codereview.chromium.org/12189018/diff/14002/chrome/browser/chrome_content_browser_client.cc File chrome/browser/chrome_content_browser_client.cc (right): https://codereview.chromium.org/12189018/diff/14002/chrome/browser/chrome_content_browser_client.cc#newcode705 chrome/browser/chrome_content_browser_client.cc:705: BrowserThread::IO, indent+2 https://codereview.chromium.org/12189018/diff/14002/chrome/browser/chrome_content_browser_client.cc#newcode715 chrome/browser/chrome_content_browser_client.cc:715: void ChromeContentBrowserClient::RemoveWebViewEventListenersOnIOThread( nit: this sort ...
7 years, 10 months ago (2013-02-06 22:40:24 UTC) #8
jam
https://chromiumcodereview.appspot.com/12189018/diff/14002/content/public/browser/content_browser_client.h File content/public/browser/content_browser_client.h (right): https://chromiumcodereview.appspot.com/12189018/diff/14002/content/public/browser/content_browser_client.h#newcode121 content/public/browser/content_browser_client.h:121: virtual void GuestWebContentsDestroyed(WebContents* guest_web_contents, nit: don't add this since ...
7 years, 10 months ago (2013-02-06 23:34:00 UTC) #9
Fady Samuel
This patch was on the backburner for a couple of months. I've updated it and ...
7 years, 7 months ago (2013-05-15 21:58:53 UTC) #10
Matt Perry
https://codereview.chromium.org/12189018/diff/14002/chrome/browser/extensions/api/web_request/web_request_api.cc File chrome/browser/extensions/api/web_request/web_request_api.cc (right): https://codereview.chromium.org/12189018/diff/14002/chrome/browser/extensions/api/web_request/web_request_api.cc#newcode1210 chrome/browser/extensions/api/web_request/web_request_api.cc:1210: void ExtensionWebRequestEventRouter::RemoveWebViewEventListeners( On 2013/05/15 21:58:53, Fady Samuel wrote: > ...
7 years, 7 months ago (2013-05-16 21:16:38 UTC) #11
Fady Samuel
PTAL. Events to remove are determined on the IO thread and then events are removed ...
7 years, 7 months ago (2013-05-17 03:02:33 UTC) #12
Matt Perry
lgtm
7 years, 7 months ago (2013-05-17 18:54:01 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/fsamuel@chromium.org/12189018/53001
7 years, 7 months ago (2013-05-17 19:30:52 UTC) #14
commit-bot: I haz the power
Failed to apply patch for chrome/browser/extensions/api/web_request/web_request_api.cc: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
7 years, 7 months ago (2013-05-17 19:30:57 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/fsamuel@chromium.org/12189018/62001
7 years, 7 months ago (2013-05-17 20:26:00 UTC) #16
commit-bot: I haz the power
Retried try job too often on chromium_presubmit for step(s) presubmit http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=chromium_presubmit&number=3608
7 years, 7 months ago (2013-05-17 20:35:30 UTC) #17
Charlie Reis
https://chromiumcodereview.appspot.com/12189018/diff/69001/content/browser/web_contents/web_contents_impl.cc File content/browser/web_contents/web_contents_impl.cc (right): https://chromiumcodereview.appspot.com/12189018/diff/69001/content/browser/web_contents/web_contents_impl.cc#newcode341 content/browser/web_contents/web_contents_impl.cc:341: browser_plugin_guest_->Destroy(); Is this something new that we didn't need ...
7 years, 7 months ago (2013-05-17 21:13:00 UTC) #18
Fady Samuel
On 2013/05/17 21:13:00, creis wrote: > https://chromiumcodereview.appspot.com/12189018/diff/69001/content/browser/web_contents/web_contents_impl.cc > File content/browser/web_contents/web_contents_impl.cc (right): > > https://chromiumcodereview.appspot.com/12189018/diff/69001/content/browser/web_contents/web_contents_impl.cc#newcode341 > ...
7 years, 7 months ago (2013-05-17 22:47:36 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/12189018/73001
7 years, 7 months ago (2013-05-17 22:47:56 UTC) #20
Fady Samuel
+jam@ for chrome/browser/webview/* review. This directory doesn't have an OWNER yet. I'll add myself and ...
7 years, 7 months ago (2013-05-17 22:54:42 UTC) #21
commit-bot: I haz the power
Retried try job too often on chromium_presubmit for step(s) presubmit http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=chromium_presubmit&number=3635
7 years, 7 months ago (2013-05-17 22:59:02 UTC) #22
Fady Samuel
jam@ is OOO, -jam@ +thakis@ for chrome/browser/webview/* review.
7 years, 7 months ago (2013-05-17 23:02:04 UTC) #23
Fady Samuel
+sky: Could you please provide a chrome OWNER approval? Nico seems OOO. I haven't been ...
7 years, 7 months ago (2013-05-21 18:26:13 UTC) #24
sky
What files do you need me to review? On Tue, May 21, 2013 at 11:26 ...
7 years, 7 months ago (2013-05-21 21:05:07 UTC) #25
sky
https://codereview.chromium.org/12189018/diff/73001/chrome/browser/webview/webview_guest.cc File chrome/browser/webview/webview_guest.cc (right): https://codereview.chromium.org/12189018/diff/73001/chrome/browser/webview/webview_guest.cc#newcode22 chrome/browser/webview/webview_guest.cc:22: static base::LazyInstance<WebViewProfileMap> g_webview_profile_map = This isn't global, it's static ...
7 years, 7 months ago (2013-05-22 00:44:18 UTC) #26
Fady Samuel
PTAL https://codereview.chromium.org/12189018/diff/73001/chrome/browser/webview/webview_guest.cc File chrome/browser/webview/webview_guest.cc (right): https://codereview.chromium.org/12189018/diff/73001/chrome/browser/webview/webview_guest.cc#newcode22 chrome/browser/webview/webview_guest.cc:22: static base::LazyInstance<WebViewProfileMap> g_webview_profile_map = On 2013/05/22 00:44:18, sky ...
7 years, 7 months ago (2013-05-23 04:37:37 UTC) #27
Fady Samuel
PTAL https://codereview.chromium.org/12189018/diff/73001/chrome/browser/webview/webview_guest.cc File chrome/browser/webview/webview_guest.cc (right): https://codereview.chromium.org/12189018/diff/73001/chrome/browser/webview/webview_guest.cc#newcode22 chrome/browser/webview/webview_guest.cc:22: static base::LazyInstance<WebViewProfileMap> g_webview_profile_map = On 2013/05/22 00:44:18, sky ...
7 years, 7 months ago (2013-05-23 04:37:37 UTC) #28
sky
https://codereview.chromium.org/12189018/diff/84001/chrome/browser/webview/webview_guest.cc File chrome/browser/webview/webview_guest.cc (right): https://codereview.chromium.org/12189018/diff/84001/chrome/browser/webview/webview_guest.cc#newcode27 chrome/browser/webview/webview_guest.cc:27: Profile* profile, What if the profile is deleted between ...
7 years, 7 months ago (2013-05-23 15:41:10 UTC) #29
Fady Samuel
PTAL https://codereview.chromium.org/12189018/diff/84001/chrome/browser/webview/webview_guest.cc File chrome/browser/webview/webview_guest.cc (right): https://codereview.chromium.org/12189018/diff/84001/chrome/browser/webview/webview_guest.cc#newcode27 chrome/browser/webview/webview_guest.cc:27: Profile* profile, On 2013/05/23 15:41:11, sky wrote: > ...
7 years, 7 months ago (2013-05-24 03:13:47 UTC) #30
sky
https://codereview.chromium.org/12189018/diff/84001/chrome/browser/webview/webview_guest.cc File chrome/browser/webview/webview_guest.cc (right): https://codereview.chromium.org/12189018/diff/84001/chrome/browser/webview/webview_guest.cc#newcode27 chrome/browser/webview/webview_guest.cc:27: Profile* profile, On 2013/05/24 03:13:47, Fady Samuel wrote: > ...
7 years, 7 months ago (2013-05-24 15:58:03 UTC) #31
Fady Samuel
On 2013/05/24 15:58:03, sky wrote: > https://codereview.chromium.org/12189018/diff/84001/chrome/browser/webview/webview_guest.cc > File chrome/browser/webview/webview_guest.cc (right): > > https://codereview.chromium.org/12189018/diff/84001/chrome/browser/webview/webview_guest.cc#newcode27 > ...
7 years, 7 months ago (2013-05-25 03:25:50 UTC) #32
Fady Samuel
PTAL
7 years, 7 months ago (2013-05-25 03:25:58 UTC) #33
sky
LGTM
7 years, 7 months ago (2013-05-27 15:34:20 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/fsamuel@chromium.org/12189018/96001
7 years, 7 months ago (2013-05-27 17:58:46 UTC) #35
commit-bot: I haz the power
7 years, 7 months ago (2013-05-27 22:56:17 UTC) #36
Message was sent while issue was closed.
Change committed as 202469

Powered by Google App Engine
This is Rietveld 408576698