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

Unified Diff: content/renderer/speech_recognition_dispatcher.h

Issue 636863003: Make SpeechRecognition per RenderFrame instead of per RenderView. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments Created 5 years, 11 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
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | content/renderer/speech_recognition_dispatcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/speech_recognition_dispatcher.h
diff --git a/content/renderer/speech_recognition_dispatcher.h b/content/renderer/speech_recognition_dispatcher.h
index 10241956e8142013e10bdd42b48696e61f484cf5..e7e02c25c5c137746692dc8eaccd9c32bc686ccb 100644
--- a/content/renderer/speech_recognition_dispatcher.h
+++ b/content/renderer/speech_recognition_dispatcher.h
@@ -12,7 +12,7 @@
#include "base/memory/shared_memory.h"
#include "base/sync_socket.h"
#include "content/public/common/speech_recognition_result.h"
-#include "content/public/renderer/render_view_observer.h"
+#include "content/public/renderer/render_frame_observer.h"
#include "third_party/WebKit/public/platform/WebMediaStreamTrack.h"
#include "third_party/WebKit/public/platform/WebVector.h"
#include "third_party/WebKit/public/web/WebSpeechRecognitionHandle.h"
@@ -23,7 +23,6 @@ class AudioParameters;
}
namespace content {
-class RenderViewImpl;
#if defined(ENABLE_WEBRTC)
class SpeechRecognitionAudioSink;
#endif
@@ -32,19 +31,17 @@ struct SpeechRecognitionResult;
// SpeechRecognitionDispatcher is a delegate for methods used by WebKit for
// scripted JS speech APIs. It's the complement of
-// SpeechRecognitionDispatcherHost (owned by RenderViewHost).
-class SpeechRecognitionDispatcher : public RenderViewObserver,
+// SpeechRecognitionDispatcherHost (owned by RenderFrameHost).
+class SpeechRecognitionDispatcher : public RenderFrameObserver,
public blink::WebSpeechRecognizer {
public:
- explicit SpeechRecognitionDispatcher(RenderViewImpl* render_view);
+ explicit SpeechRecognitionDispatcher(RenderFrame* render_frame);
virtual ~SpeechRecognitionDispatcher();
- // Aborts all speech recognitions.
- void AbortAllRecognitions();
-
private:
- // RenderViewObserver implementation.
+ // RenderFrameObserver implementation.
bool OnMessageReceived(const IPC::Message& message) override;
+ void WasHidden() override;
// blink::WebSpeechRecognizer implementation.
virtual void start(const blink::WebSpeechRecognitionHandle&,
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | content/renderer/speech_recognition_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698