[webkit-reviews] review denied: [Bug 81667] Speech JavaScript API: Plumbing for Chromium : [Attachment 135084] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Apr 2 09:56:33 PDT 2012

Darin Fisher (:fishd, Google) <fishd at chromium.org> has denied Hans Wennborg
<hans at chromium.org>'s request for review:
Bug 81667: Speech JavaScript API: Plumbing for Chromium

Attachment 135084: Patch

------- Additional Comments from Darin Fisher (:fishd, Google)
<fishd at chromium.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=135084&action=review

Interface structure looks pretty good.	Just some minor nits now.

> Source/WebKit/chromium/public/WebSpeechRecognitionHandle.h:41
> +// A handle to a SpeechRecognition object. As long as there is a handle, the

nit: avoid making the user think about WebCore objects.  mentioning the
type in this comment breaks that rule.	I would just drop the first two
sentences here,
and then I would change the third sentence to begin as
"WebSpeechRecognitionHandle is
used by the WebSpeechRecognizer..."

> Source/WebKit/chromium/public/WebSpeechRecognitionParams.h:39
> +    WebSpeechRecognitionParams(const WebVector<WebSpeechGrammar>&, const
WebString& language, bool continuous);

nit: implement the constructor inline or else it needs to be tagged with
WEBKIT_EXPORT.	usually we just implement inline.

> Source/WebKit/chromium/public/WebSpeechRecognizer.h:41
> +    virtual void start(WebSpeechRecognitionHandle, const
WebSpeechRecognitionParams&, WebSpeechRecognizerClient*) {

nit: pass handles as "const WebSpeechRecognitionHandle&" ... you should see
other classes that are implemented using WebPrivatePtr being passed as const

> Source/WebKit/chromium/public/WebSpeechRecognizerClient.h:44
> +    virtual void didStartAudio(WebSpeechRecognitionHandle&) = 0;

nit: pass handles as "const WebSpeechRecognitionHandle&"

> Source/WebKit/chromium/src/SpeechRecognitionClientProxy.cpp:76
> +    RefPtr<SpeechRecognition> recognition =
static_cast<PassRefPtr<SpeechRecognition> >(handle);

the explicit cast to PassRefPtr<SpeechRecognition> should become unnecessary
once you
change the argument type to "const WebSpeechRecognitionHandle&" as the
operator defined on WebSpeechRecognitionHandle will then be used implicitly.

More information about the webkit-reviews mailing list