summaryrefslogtreecommitdiffstats
path: root/content/public/browser
diff options
context:
space:
mode:
authorhans@chromium.org <hans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-24 16:04:57 +0000
committerhans@chromium.org <hans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-24 16:04:57 +0000
commit6f34fc29f326f1aac4edfa3ce03a4237aea22bc1 (patch)
tree3246bcd93678ff8128824ddc0b12d32c5fca1cfd /content/public/browser
parentd16e704e8f6e0fd8e71f68408bc50dabd427d83d (diff)
downloadchromium_src-6f34fc29f326f1aac4edfa3ce03a4237aea22bc1.zip
chromium_src-6f34fc29f326f1aac4edfa3ce03a4237aea22bc1.tar.gz
chromium_src-6f34fc29f326f1aac4edfa3ce03a4237aea22bc1.tar.bz2
Revert 138801 - Introduced SpeechRecognitionDispatcher(Host) classes, handling dispatch of IPC messages for continuous speech recognition. (Speech CL2.1)
It looks like this bumped the Linux x64 size with ~40k, causing the perf bot to go red: http://build.chromium.org/p/chromium/buildstatus?builder=Linux%20x64&number=30110 Will try to figure out what's going on and re-land later. BUG=116954 TEST=none Review URL: https://chromiumcodereview.appspot.com/10273006 TBR=primiano@chromium.org Review URL: https://chromiumcodereview.appspot.com/10443009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@138807 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/public/browser')
-rw-r--r--content/public/browser/speech_recognition_manager.h10
-rw-r--r--content/public/browser/speech_recognition_session_context.cc2
-rw-r--r--content/public/browser/speech_recognition_session_context.h11
3 files changed, 13 insertions, 10 deletions
diff --git a/content/public/browser/speech_recognition_manager.h b/content/public/browser/speech_recognition_manager.h
index 0cd2a75..2d6d597 100644
--- a/content/public/browser/speech_recognition_manager.h
+++ b/content/public/browser/speech_recognition_manager.h
@@ -62,11 +62,11 @@ class SpeechRecognitionManager {
virtual SpeechRecognitionSessionContext GetSessionContext(
int session_id) const = 0;
- // Looks-up an existing session from the context tuple
- // {render_view_id, render_view_id, request_id}.
- virtual int GetSession(int render_process_id,
- int render_view_id,
- int request_id) const = 0;
+ // Looks-up an existing session using a caller-provided matcher function.
+ virtual int LookupSessionByContext(
+ base::Callback<bool(
+ const content::SpeechRecognitionSessionContext&)> matcher)
+ const = 0;
// Returns true if the OS reports existence of audio recording devices.
virtual bool HasAudioInputDevices() = 0;
diff --git a/content/public/browser/speech_recognition_session_context.cc b/content/public/browser/speech_recognition_session_context.cc
index 6117bbe..f5bf32c 100644
--- a/content/public/browser/speech_recognition_session_context.cc
+++ b/content/public/browser/speech_recognition_session_context.cc
@@ -9,7 +9,7 @@ namespace content {
SpeechRecognitionSessionContext::SpeechRecognitionSessionContext()
: render_process_id(0),
render_view_id(0),
- request_id(0),
+ render_request_id(0),
requested_by_page_element(true),
is_first_request_for_context(false) {
}
diff --git a/content/public/browser/speech_recognition_session_context.h b/content/public/browser/speech_recognition_session_context.h
index 4b6d9f7..eaa4f39 100644
--- a/content/public/browser/speech_recognition_session_context.h
+++ b/content/public/browser/speech_recognition_session_context.h
@@ -15,9 +15,11 @@ namespace content {
// The context information required by clients of the SpeechRecognitionManager
// and its delegates for mapping the recognition session to other browser
// elements involved with it (e.g., the page element that requested the
-// recognition). The manager keeps this struct attached to the recognition
-// session during all the session lifetime, making its contents available to
-// clients (In this regard, see SpeechRecognitionManager::GetSessionContext and
+// recognition). The SpeechRecognitionManager is not aware of the content of
+// this struct and does NOT use it for its purposes. However the manager keeps
+// this struct "attached" to the recognition session during all the session
+// lifetime, making its contents available to clients (In this regard, see
+// SpeechRecognitionManager::GetSessionContext and
// SpeechRecognitionManager::LookupSessionByContext methods).
struct CONTENT_EXPORT SpeechRecognitionSessionContext {
SpeechRecognitionSessionContext();
@@ -25,7 +27,8 @@ struct CONTENT_EXPORT SpeechRecognitionSessionContext {
int render_process_id;
int render_view_id;
- int request_id;
+ int render_request_id;
+ int js_handle_id;
// Determines whether recognition was requested by a page element (in which
// case its coordinates are passed in |element_rect|).