In Chromium, we want to push user scripts down into webcore prior to having a WebView instance. Since these methods are modifying global state, it is more convenient if they are static.
Created attachment 60074 [details] Patch
Created attachment 60075 [details] Patch
Comment on attachment 60075 [details] Patch Looks good to me, but we need fishd here.
Attachment 60075 [details] did not build on chromium: Build output: http://webkit-commit-queue.appspot.com/results/3373026
Comment on attachment 60075 [details] Patch WebKit/chromium/src/WebViewImpl.cpp:1976 + Vector<String>* patterns = new Vector<String>; nit: use OwnPtr here? WebKit/chromium/src/WebViewImpl.cpp:1988 + Vector<String>* patterns = new Vector<String>; nit: use OwnPtr here? i realize that your code is correct, but if someone ever added an early return it would suddenly start leaking memory. plus, i was only able to convince myself that your code was safe by checking the signature of addUser{Script,StyleSheet}ToWorld to see that it takes a PassOwnPtr parameter. r=me otherwise
one other nit, please put the term DEPRECATED in your FIXME comment about the removal of those non-static methods. that way it is easy to find deprecated stuff in the future.
Created attachment 60176 [details] Patch for landing
Comment on attachment 60176 [details] Patch for landing Clearing flags on attachment: 60176 Committed r62234: <http://trac.webkit.org/changeset/62234>
All reviewed patches have been landed. Closing bug.