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

Issue 11368071: browser-plugin: Remove event handling code, and use CustomEvents in webkit instead. (Closed)

Created:
8 years, 1 month ago by sadrul
Modified:
8 years, 1 month ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam, Fady Samuel, Charlie Reis
Visibility:
Public.

Description

browser-plugin: Remove event handling code, and use CustomEvents in webkit instead. The browser-plugin emits signals prefixed with '-internal-'. The webview shim receives the events, and emits appropriately named polyfilled events. The webview consumers should listen for these events, instead of the '-internal-' events. BUG=155044 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=167294

Patch Set 1 #

Patch Set 2 : . #

Patch Set 3 : . #

Patch Set 4 : . #

Total comments: 8

Patch Set 5 : . #

Patch Set 6 : . #

Total comments: 1

Patch Set 7 : tot-merge #

Total comments: 4

Patch Set 8 : . #

Patch Set 9 : JSON #

Patch Set 10 : tot-merge #

Total comments: 13

Patch Set 11 : . #

Total comments: 10

Patch Set 12 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+187 lines, -587 lines) Patch
M chrome/renderer/resources/extensions/web_view.js View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +39 lines, -12 lines 0 comments Download
M chrome/test/data/extensions/platform_apps/web_view/main.js View 1 2 3 4 5 6 4 chunks +34 lines, -238 lines 0 comments Download
M chrome/test/data/extensions/platform_apps/web_view_src_attribute/main.js View 1 2 3 4 5 6 3 chunks +3 lines, -3 lines 0 comments Download
M content/renderer/browser_plugin/browser_plugin.h View 1 2 3 4 5 6 7 8 9 3 chunks +5 lines, -15 lines 0 comments Download
M content/renderer/browser_plugin/browser_plugin.cc View 1 2 3 4 5 6 7 8 9 10 11 chunks +75 lines, -231 lines 0 comments Download
M content/renderer/browser_plugin/browser_plugin_bindings.cc View 4 chunks +0 lines, -60 lines 0 comments Download
M content/renderer/browser_plugin/browser_plugin_browsertest.cc View 1 2 3 4 5 6 7 8 9 5 chunks +14 lines, -14 lines 0 comments Download
M content/test/data/browser_plugin_embedder.html View 1 2 3 4 5 6 7 8 9 3 chunks +17 lines, -14 lines 0 comments Download

Messages

Total messages: 25 (0 generated)
abarth-chromium
http://codereview.chromium.org/11368071/diff/2006/content/renderer/browser_plugin/browser_plugin.cc File content/renderer/browser_plugin/browser_plugin.cc (right): http://codereview.chromium.org/11368071/diff/2006/content/renderer/browser_plugin/browser_plugin.cc#newcode320 content/renderer/browser_plugin/browser_plugin.cc:320: plugin.document().frame()->mainWorldScriptContext(); Why is the main world the correct world? ...
8 years, 1 month ago (2012-11-05 19:07:14 UTC) #1
sadrul
Addressed all the comments. Note that because of this change, the event handlers now have ...
8 years, 1 month ago (2012-11-06 03:23:34 UTC) #2
sadrul
Hi Adam. I am experimenting with a slightly changed approach: * Create a generic Event ...
8 years, 1 month ago (2012-11-07 03:37:06 UTC) #3
abarth-chromium
On 2012/11/07 03:37:06, sadrul wrote: > Hi Adam. I am experimenting with a slightly changed ...
8 years, 1 month ago (2012-11-07 03:39:30 UTC) #4
sadrul
On 2012/11/07 03:39:30, abarth wrote: > On 2012/11/07 03:37:06, sadrul wrote: > > Hi Adam. ...
8 years, 1 month ago (2012-11-07 17:50:46 UTC) #5
sadrul
Hi! I have updated the code according to the offline discussion, and updated the CL ...
8 years, 1 month ago (2012-11-09 19:36:30 UTC) #6
abarth-chromium
This patch is definitely an improvement. It should clean up the resource leaks. We still ...
8 years, 1 month ago (2012-11-09 19:44:34 UTC) #7
abarth-chromium
LGTM with the caveats above.
8 years, 1 month ago (2012-11-09 19:44:48 UTC) #8
abarth-chromium
Can base::Value get serialized to a string? Perhaps we should send the JSON string to ...
8 years, 1 month ago (2012-11-09 19:45:30 UTC) #9
Fady Samuel
https://codereview.chromium.org/11368071/diff/5009/content/renderer/browser_plugin/browser_plugin.cc File content/renderer/browser_plugin/browser_plugin.cc (right): https://codereview.chromium.org/11368071/diff/5009/content/renderer/browser_plugin/browser_plugin.cc#newcode332 content/renderer/browser_plugin/browser_plugin.cc:332: detail->Set(v8::String::New(iter->first.data(), iter->first.size()), On 2012/11/09 19:44:34, abarth wrote: > This ...
8 years, 1 month ago (2012-11-09 19:49:11 UTC) #10
abarth-chromium
https://codereview.chromium.org/11368071/diff/5009/content/renderer/browser_plugin/browser_plugin.cc File content/renderer/browser_plugin/browser_plugin.cc (right): https://codereview.chromium.org/11368071/diff/5009/content/renderer/browser_plugin/browser_plugin.cc#newcode339 content/renderer/browser_plugin/browser_plugin.cc:339: WebKit::WebDOMEvent dom_event = frame->document().createEvent("CustomEvent"); Certainly |frame| can be destroyed, ...
8 years, 1 month ago (2012-11-09 19:52:12 UTC) #11
sadrul
Thanks for the quick review! I have addressed the issue about JS callbacks destroying the ...
8 years, 1 month ago (2012-11-09 21:14:15 UTC) #12
sadrul
+creis@ for content/ OWNERS +sky@ for chrome/ OWNERS
8 years, 1 month ago (2012-11-09 21:53:10 UTC) #13
sky
I'm not a good reviewer for the js changes. Could you get someone else?
8 years, 1 month ago (2012-11-09 22:50:00 UTC) #14
sadrul
+arv@ for reviewing the change in web_view.js
8 years, 1 month ago (2012-11-09 23:02:53 UTC) #15
sadrul
Merged the reviewed changes from http://codereview.chromium.org/11377089/ into this CL to reduce OWNER review-overhead.
8 years, 1 month ago (2012-11-09 23:45:05 UTC) #16
Charlie Reis
This looks like it will be a great improvement. A few comments and questions below. ...
8 years, 1 month ago (2012-11-12 18:23:11 UTC) #17
sadrul
http://codereview.chromium.org/11368071/diff/3017/content/renderer/browser_plugin/browser_plugin.cc File content/renderer/browser_plugin/browser_plugin.cc (right): http://codereview.chromium.org/11368071/diff/3017/content/renderer/browser_plugin/browser_plugin.cc#newcode365 content/renderer/browser_plugin/browser_plugin.cc:365: if (!container()) On 2012/11/12 18:23:12, creis wrote: > Do ...
8 years, 1 month ago (2012-11-12 19:00:16 UTC) #18
Charlie Reis
LGTM. http://codereview.chromium.org/11368071/diff/3017/content/renderer/browser_plugin/browser_plugin.cc File content/renderer/browser_plugin/browser_plugin.cc (right): http://codereview.chromium.org/11368071/diff/3017/content/renderer/browser_plugin/browser_plugin.cc#newcode389 content/renderer/browser_plugin/browser_plugin.cc:389: std::string obfuscated_name = base::StringPrintf("-internal-%s", On 2012/11/12 19:00:16, sadrul ...
8 years, 1 month ago (2012-11-12 19:11:13 UTC) #19
sadrul
ping arv@
8 years, 1 month ago (2012-11-12 21:39:10 UTC) #20
arv (Not doing code reviews)
http://codereview.chromium.org/11368071/diff/20001/chrome/renderer/resources/extensions/web_view.js File chrome/renderer/resources/extensions/web_view.js (right): http://codereview.chromium.org/11368071/diff/20001/chrome/renderer/resources/extensions/web_view.js#newcode29 chrome/renderer/resources/extensions/web_view.js:29: 'exit' : [ 'processId', 'reason' ], no ws after ...
8 years, 1 month ago (2012-11-12 22:58:07 UTC) #21
sadrul
http://codereview.chromium.org/11368071/diff/20001/chrome/renderer/resources/extensions/web_view.js File chrome/renderer/resources/extensions/web_view.js (right): http://codereview.chromium.org/11368071/diff/20001/chrome/renderer/resources/extensions/web_view.js#newcode29 chrome/renderer/resources/extensions/web_view.js:29: 'exit' : [ 'processId', 'reason' ], On 2012/11/12 22:58:07, ...
8 years, 1 month ago (2012-11-12 23:03:21 UTC) #22
arv (Not doing code reviews)
JS LGTM
8 years, 1 month ago (2012-11-12 23:18:37 UTC) #23
sadrul
Thanks! sky, can I please have an OWNER stamp :)
8 years, 1 month ago (2012-11-12 23:19:42 UTC) #24
sky
8 years, 1 month ago (2012-11-13 00:55:57 UTC) #25
Rubber stamp LGTM

Powered by Google App Engine
This is Rietveld 408576698