[chromium]WebKit side of adding search support to Pepper.
Created attachment 51267 [details] Patch
Note to fellow reviewers. This review is blocked pending agreement on the API, which is being discussed here: http://codereview.chromium.org/1075011
Created attachment 51384 [details] Patch
Darin: I've updated the patch per our discussion.
Comment on attachment 51384 [details] Patch > Index: WebKit/chromium/public/WebDocument.h ... > // Returns the frame the document belongs to or 0 if the document is frameless. > WEBKIT_API WebFrame* frame() const; > WEBKIT_API bool isHTMLDocument() const; > + WEBKIT_API bool isPluginDocument(WebPluginContainer**); I think it is a little awkward for this function to have the side effect of returning the contained plugin. We could instead follow the inheritance approach. Define WebPluginDocument: class WebPluginDocument : public WebDocument { public: /* boiler plate */ WEBKIT_API WebPlugin* plugin(); }; Then, WebDocument would just have the simple method: WEBKIT_API bool isPluginDocument() const; Folks would then use WebPluginDocument like so. WebDocument doc = ...; if (doc.isPluginDocument()) { WebPlugin* plugin = doc.to<WebPluginDocument>.plugin(); ... } Unfortunately, WebNode (which WebDocument extends) doesn't have a to<T> method. It just has a toElement<T> method, which should really just be renamed to<T> so that it can be used with derived types that are not elements. For now, we could just add a copy of toElement<T> named to<T>, and mark toElement<T> as deprecated. You can leave it to me to clean up the deprecated usage. -Darin
Created attachment 51537 [details] Patch
Created attachment 51538 [details] Patch
Darin: when you have a chance, here's the updated patch with your suggested changes.
Comment on attachment 51538 [details] Patch > Index: WebKit/chromium/public/WebNode.h > + // DEPRECATED! use toConstElement() instead nit: "use toConst() instead" > Index: WebKit/chromium/public/WebPluginDocument.h > + WebPluginDocument(const WebPluginDocument& e) : WebDocument(e) { } > + > + WebPluginDocument& operator=(const WebPluginDocument& e) > + { > + WebNode::assign(e); > + return *this; > + } > + void assign(const WebPluginDocument& e) { WebNode::assign(e); } nit: "e" stood for WebElement probably in the case you copied this from. how about using "d" for document instead? R=me
Committed r56457: <http://trac.webkit.org/changeset/56457>