From c52b28964090204b87634b396823c3709855079c Mon Sep 17 00:00:00 2001 From: "primiano@chromium.org" Date: Wed, 7 Mar 2012 11:01:02 +0000 Subject: Renamed speech recognition code in preparation for introducing a new speech implementation. - The general-purpose speech recognition classes (that will be needed also by future code) have been renamed to SpeechRecognition*; - The IPC Messages and dispatcher(host) classes that are only related to the current input tag (x-webkit-speech) support have been renamed to InputTagSpeech*; - The namespace has been renamed from speech_input to speech; BUG=116954 TEST= Review URL: https://chromiumcodereview.appspot.com/9568002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@125378 0039d316-1c4b-4281-b951-d872f2087c98 --- content/shell/shell_browser_context.cc | 19 ++++++++++--------- content/shell/shell_browser_context.h | 5 +++-- content/shell/shell_content_browser_client.cc | 4 ++-- content/shell/shell_content_browser_client.h | 3 ++- 4 files changed, 17 insertions(+), 14 deletions(-) (limited to 'content/shell') diff --git a/content/shell/shell_browser_context.cc b/content/shell/shell_browser_context.cc index f617b23..4872dc6 100644 --- a/content/shell/shell_browser_context.cc +++ b/content/shell/shell_browser_context.cc @@ -13,7 +13,7 @@ #include "content/browser/download/download_manager_impl.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/geolocation_permission_context.h" -#include "content/public/browser/speech_input_preferences.h" +#include "content/public/browser/speech_recognition_preferences.h" #include "content/shell/shell_browser_main.h" #include "content/shell/shell_download_manager_delegate.h" #include "content/shell/shell_resource_context.h" @@ -63,12 +63,12 @@ class ShellGeolocationPermissionContext : public GeolocationPermissionContext { DISALLOW_COPY_AND_ASSIGN(ShellGeolocationPermissionContext); }; -class ShellSpeechInputPreferences : public SpeechInputPreferences { +class ShellSpeechRecognitionPreferences : public SpeechRecognitionPreferences { public: - ShellSpeechInputPreferences() { + ShellSpeechRecognitionPreferences() { } - // Overridden from SpeechInputPreferences: + // Overridden from SpeechRecognitionPreferences: virtual bool FilterProfanities() const OVERRIDE { return false; } @@ -77,7 +77,7 @@ class ShellSpeechInputPreferences : public SpeechInputPreferences { } private: - DISALLOW_COPY_AND_ASSIGN(ShellSpeechInputPreferences); + DISALLOW_COPY_AND_ASSIGN(ShellSpeechRecognitionPreferences); }; } // namespace @@ -170,10 +170,11 @@ GeolocationPermissionContext* return geolocation_permission_context_; } -SpeechInputPreferences* ShellBrowserContext::GetSpeechInputPreferences() { - if (!speech_input_preferences_.get()) - speech_input_preferences_ = new ShellSpeechInputPreferences(); - return speech_input_preferences_.get(); +SpeechRecognitionPreferences* + ShellBrowserContext::GetSpeechRecognitionPreferences() { + if (!speech_recognition_preferences_.get()) + speech_recognition_preferences_ = new ShellSpeechRecognitionPreferences(); + return speech_recognition_preferences_.get(); } bool ShellBrowserContext::DidLastSessionExitCleanly() { diff --git a/content/shell/shell_browser_context.h b/content/shell/shell_browser_context.h index 9fbccab..581febb 100644 --- a/content/shell/shell_browser_context.h +++ b/content/shell/shell_browser_context.h @@ -37,7 +37,8 @@ class ShellBrowserContext : public BrowserContext { virtual ResourceContext* GetResourceContext() OVERRIDE; virtual GeolocationPermissionContext* GetGeolocationPermissionContext() OVERRIDE; - virtual SpeechInputPreferences* GetSpeechInputPreferences() OVERRIDE; + virtual SpeechRecognitionPreferences* + GetSpeechRecognitionPreferences() OVERRIDE; virtual bool DidLastSessionExitCleanly() OVERRIDE; virtual quota::SpecialStoragePolicy* GetSpecialStoragePolicy() OVERRIDE; @@ -49,7 +50,7 @@ class ShellBrowserContext : public BrowserContext { scoped_refptr download_manager_; scoped_refptr url_request_getter_; scoped_refptr geolocation_permission_context_; - scoped_refptr speech_input_preferences_; + scoped_refptr speech_recognition_preferences_; ShellBrowserMainParts* shell_main_parts_; diff --git a/content/shell/shell_content_browser_client.cc b/content/shell/shell_content_browser_client.cc index d29b4ec..dfc7344 100644 --- a/content/shell/shell_content_browser_client.cc +++ b/content/shell/shell_content_browser_client.cc @@ -283,8 +283,8 @@ std::string ShellContentBrowserClient::GetWorkerProcessTitle( void ShellContentBrowserClient::ResourceDispatcherHostCreated() { } -SpeechInputManagerDelegate* - ShellContentBrowserClient::GetSpeechInputManagerDelegate() { +SpeechRecognitionManagerDelegate* + ShellContentBrowserClient::GetSpeechRecognitionManagerDelegate() { return NULL; } diff --git a/content/shell/shell_content_browser_client.h b/content/shell/shell_content_browser_client.h index 08eaa71..5db7a3b 100644 --- a/content/shell/shell_content_browser_client.h +++ b/content/shell/shell_content_browser_client.h @@ -146,7 +146,8 @@ class ShellContentBrowserClient : public ContentBrowserClient { virtual std::string GetWorkerProcessTitle( const GURL& url, content::ResourceContext* context) OVERRIDE; virtual void ResourceDispatcherHostCreated() OVERRIDE; - virtual SpeechInputManagerDelegate* GetSpeechInputManagerDelegate() OVERRIDE; + virtual SpeechRecognitionManagerDelegate* + GetSpeechRecognitionManagerDelegate() OVERRIDE; virtual ui::Clipboard* GetClipboard() OVERRIDE; virtual net::NetLog* GetNetLog() OVERRIDE; virtual AccessTokenStore* CreateAccessTokenStore() OVERRIDE; -- cgit v1.1