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

Unified Diff: chrome/renderer/render_view.cc

Issue 3035035: Adds chromium side plumbing to pass speech input calls back and forth with WebKit. (Closed)
Patch Set: Addressed all comments. Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/renderer/render_view.cc
diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc
index a7787a56b1fd5cd5f902563da673d99bb8425b8c..c9a826e671c22de23828421fb95594cd4a1d741c 100644
--- a/chrome/renderer/render_view.cc
+++ b/chrome/renderer/render_view.cc
@@ -61,6 +61,7 @@
#include "chrome/renderer/render_view_visitor.h"
#include "chrome/renderer/renderer_webapplicationcachehost_impl.h"
#include "chrome/renderer/renderer_webstoragenamespace_impl.h"
+#include "chrome/renderer/speech_input_dispatcher.h"
#include "chrome/renderer/spellchecker/spellcheck.h"
#include "chrome/renderer/user_script_slave.h"
#include "chrome/renderer/visitedlink_slave.h"
@@ -628,6 +629,10 @@ void RenderView::OnMessageReceived(const IPC::Message& message) {
geolocation_dispatcher_->OnMessageReceived(message)) {
return;
}
+ if (speech_input_dispatcher_.get() &&
+ speech_input_dispatcher_->OnMessageReceived(message)) {
+ return;
+ }
IPC_BEGIN_MESSAGE_MAP(RenderView, message)
IPC_MESSAGE_HANDLER(ViewMsg_CaptureThumbnail, OnCaptureThumbnail)
@@ -5258,6 +5263,13 @@ WebKit::WebGeolocationService* RenderView::geolocationService() {
return geolocation_dispatcher_.get();
}
+WebKit::WebSpeechInputController* RenderView::speechInputController(
+ WebKit::WebSpeechInputListener* listener) {
+ if (!speech_input_dispatcher_.get())
+ speech_input_dispatcher_.reset(new SpeechInputDispatcher(this, listener));
+ return speech_input_dispatcher_.get();
+}
+
bool RenderView::IsNonLocalTopLevelNavigation(
const GURL& url, WebKit::WebFrame* frame, WebKit::WebNavigationType type) {
// Must be a top level frame.

Powered by Google App Engine
This is Rietveld 408576698