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

Unified Diff: content/browser/speech/input_tag_speech_dispatcher_host.h

Issue 260903010: Start removing support for the experimental x-webkit-speech API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Don't touch histograms.xml Created 6 years, 8 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: content/browser/speech/input_tag_speech_dispatcher_host.h
diff --git a/content/browser/speech/input_tag_speech_dispatcher_host.h b/content/browser/speech/input_tag_speech_dispatcher_host.h
deleted file mode 100644
index 4d5eb60bf170beb756a600a2fe2e00bcf8f9e2af..0000000000000000000000000000000000000000
--- a/content/browser/speech/input_tag_speech_dispatcher_host.h
+++ /dev/null
@@ -1,93 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CONTENT_BROWSER_SPEECH_INPUT_TAG_SPEECH_DISPATCHER_HOST_H_
-#define CONTENT_BROWSER_SPEECH_INPUT_TAG_SPEECH_DISPATCHER_HOST_H_
-
-#include "base/compiler_specific.h"
-#include "base/memory/ref_counted.h"
-#include "base/memory/weak_ptr.h"
-#include "content/common/content_export.h"
-#include "content/public/browser/browser_message_filter.h"
-#include "content/public/browser/speech_recognition_event_listener.h"
-#include "content/public/common/speech_recognition_result.h"
-#include "net/url_request/url_request_context_getter.h"
-
-struct InputTagSpeechHostMsg_StartRecognition_Params;
-
-namespace content {
-
-class SpeechRecognitionManager;
-
-// InputTagSpeechDispatcherHost is a delegate for Speech API messages used by
-// RenderMessageFilter. Basically it acts as a proxy, relaying the events coming
-// from the SpeechRecognitionManager to IPC messages (and vice versa).
-// It's the complement of SpeechRecognitionDispatcher (owned by RenderView).
-class CONTENT_EXPORT InputTagSpeechDispatcherHost
- : public BrowserMessageFilter,
- public SpeechRecognitionEventListener {
- public:
- InputTagSpeechDispatcherHost(
- bool guest,
- int render_process_id,
- net::URLRequestContextGetter* url_request_context_getter);
-
- base::WeakPtr<InputTagSpeechDispatcherHost> AsWeakPtr();
-
- // SpeechRecognitionEventListener methods.
- virtual void OnRecognitionStart(int session_id) OVERRIDE;
- virtual void OnAudioStart(int session_id) OVERRIDE;
- virtual void OnEnvironmentEstimationComplete(int session_id) OVERRIDE;
- virtual void OnSoundStart(int session_id) OVERRIDE;
- virtual void OnSoundEnd(int session_id) OVERRIDE;
- virtual void OnAudioEnd(int session_id) OVERRIDE;
- virtual void OnRecognitionEnd(int session_id) OVERRIDE;
- virtual void OnRecognitionResults(
- int session_id,
- const SpeechRecognitionResults& results) OVERRIDE;
- virtual void OnRecognitionError(
- int session_id,
- const SpeechRecognitionError& error) OVERRIDE;
- virtual void OnAudioLevelsChange(int session_id,
- float volume,
- float noise_volume) OVERRIDE;
-
- // BrowserMessageFilter implementation.
- virtual bool OnMessageReceived(const IPC::Message& message,
- bool* message_was_ok) OVERRIDE;
- virtual void OverrideThreadForMessage(
- const IPC::Message& message,
- BrowserThread::ID* thread) OVERRIDE;
-
- virtual void OnChannelClosing() OVERRIDE;
-
- private:
- virtual ~InputTagSpeechDispatcherHost();
-
- void OnStartRecognition(
- const InputTagSpeechHostMsg_StartRecognition_Params& params);
- void OnCancelRecognition(int render_view_id, int request_id);
- void OnStopRecording(int render_view_id, int request_id);
-
- void StartRecognitionOnIO(
- int embedder_render_process_id,
- int embedder_render_view_id,
- const InputTagSpeechHostMsg_StartRecognition_Params& params,
- bool filter_profanities);
-
- bool is_guest_;
- int render_process_id_;
- scoped_refptr<net::URLRequestContextGetter> url_request_context_getter_;
-
- // Used for posting asynchronous tasks (on the IO thread) without worrying
- // about this class being destroyed in the meanwhile (due to browser shutdown)
- // since tasks pending on a destroyed WeakPtr are automatically discarded.
- base::WeakPtrFactory<InputTagSpeechDispatcherHost> weak_factory_;
-
- DISALLOW_COPY_AND_ASSIGN(InputTagSpeechDispatcherHost);
-};
-
-} // namespace content
-
-#endif // CONTENT_BROWSER_SPEECH_INPUT_TAG_SPEECH_DISPATCHER_HOST_H_
« no previous file with comments | « content/browser/speech/input_tag_speech_browsertest.cc ('k') | content/browser/speech/input_tag_speech_dispatcher_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698