summaryrefslogtreecommitdiffstats
path: root/content/public/browser
diff options
context:
space:
mode:
Diffstat (limited to 'content/public/browser')
-rw-r--r--content/public/browser/browser_context.h6
-rw-r--r--content/public/browser/content_browser_client.h19
-rw-r--r--content/public/browser/speech_recognition_manager.h (renamed from content/public/browser/speech_input_manager.h)14
-rw-r--r--content/public/browser/speech_recognition_manager_delegate.h (renamed from content/public/browser/speech_input_manager_delegate.h)16
-rw-r--r--content/public/browser/speech_recognition_preferences.h (renamed from content/public/browser/speech_input_preferences.h)14
-rw-r--r--content/public/browser/speech_recognizer.h2
-rw-r--r--content/public/browser/speech_recognizer_delegate.h7
7 files changed, 46 insertions, 32 deletions
diff --git a/content/public/browser/browser_context.h b/content/public/browser/browser_context.h
index 60786dcf..7a4577e 100644
--- a/content/public/browser/browser_context.h
+++ b/content/public/browser/browser_context.h
@@ -40,7 +40,7 @@ class DownloadManager;
class GeolocationPermissionContext;
class IndexedDBContext;
class ResourceContext;
-class SpeechInputPreferences;
+class SpeechRecognitionPreferences;
// This class holds the context needed for a browsing session.
// It lives on the UI thread.
@@ -110,9 +110,9 @@ class CONTENT_EXPORT BrowserContext : public base::SupportsUserData {
// Returns the geolocation permission context for this context.
virtual GeolocationPermissionContext* GetGeolocationPermissionContext() = 0;
- // Returns the speech input preferences. SpeechInputPreferences is a
+ // Returns the speech input preferences. SpeechRecognitionPreferences is a
// ref counted class, so callers should take a reference if needed.
- virtual SpeechInputPreferences* GetSpeechInputPreferences() = 0;
+ virtual SpeechRecognitionPreferences* GetSpeechRecognitionPreferences() = 0;
// Returns true if the last time this context was open it was exited cleanly.
// This doesn't belong here; http://crbug.com/90737
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
index 19eb3b3..cca6ae2 100644
--- a/content/public/browser/content_browser_client.h
+++ b/content/public/browser/content_browser_client.h
@@ -26,6 +26,18 @@ class ResourceDispatcherHost;
class SkBitmap;
struct WebPreferences;
+namespace content {
+class AccessTokenStore;
+class BrowserMainParts;
+class RenderProcessHost;
+class SiteInstance;
+class SpeechRecognitionManagerDelegate;
+class WebContents;
+class WebContentsView;
+struct MainFunctionParams;
+struct ShowDesktopNotificationHostMsgParams;
+}
+
namespace crypto {
class CryptoModuleBlockingPasswordDelegate;
}
@@ -322,9 +334,10 @@ class ContentBrowserClient {
// This is when it can optionally add a delegate or ResourceQueueDelegates.
virtual void ResourceDispatcherHostCreated() = 0;
- // Allows the embedder to return a delegate for the SpeechInputManager. The
- // delegate will be owned by the manager. It's valid to return NULL.
- virtual SpeechInputManagerDelegate* GetSpeechInputManagerDelegate() = 0;
+ // Allows the embedder to return a delegate for the SpeechRecognitionManager.
+ // The delegate will be owned by the manager. It's valid to return NULL.
+ virtual SpeechRecognitionManagerDelegate*
+ GetSpeechRecognitionManagerDelegate() = 0;
// Getters for common objects.
virtual ui::Clipboard* GetClipboard() = 0;
diff --git a/content/public/browser/speech_input_manager.h b/content/public/browser/speech_recognition_manager.h
index 409d5dc..89651c1 100644
--- a/content/public/browser/speech_input_manager.h
+++ b/content/public/browser/speech_recognition_manager.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CONTENT_PUBLIC_BROWSER_SPEECH_INPUT_MANAGER_H_
-#define CONTENT_PUBLIC_BROWSER_SPEECH_INPUT_MANAGER_H_
+#ifndef CONTENT_PUBLIC_BROWSER_SPEECH_RECOGNITION_MANAGER_H_
+#define CONTENT_PUBLIC_BROWSER_SPEECH_RECOGNITION_MANAGER_H_
#include "base/string16.h"
#include "content/common/content_export.h"
@@ -14,10 +14,10 @@ namespace content {
// handles requests received from various render views and makes sure only one
// of them can use speech recognition at a time. It also sends recognition
// results and status events to the render views when required.
-class SpeechInputManager {
+class SpeechRecognitionManager {
public:
// Returns the singleton instance.
- CONTENT_EXPORT static SpeechInputManager* GetInstance();
+ CONTENT_EXPORT static SpeechRecognitionManager* GetInstance();
// Starts/restarts recognition for an existing request.
virtual void StartRecognitionForRequest(int caller_id) = 0;
@@ -33,7 +33,7 @@ class SpeechInputManager {
virtual bool HasAudioInputDevices() = 0;
// Used to determine if something else is currently making use of audio input.
- virtual bool IsRecordingInProcess() = 0;
+ virtual bool IsCapturingAudio() = 0;
// Returns a human readable string for the model/make of the active audio
// input device for this computer.
@@ -44,9 +44,9 @@ class SpeechInputManager {
virtual void ShowAudioInputSettings() = 0;
protected:
- virtual ~SpeechInputManager() {}
+ virtual ~SpeechRecognitionManager() {}
};
} // namespace content
-#endif // CONTENT_PUBLIC_BROWSER_SPEECH_INPUT_MANAGER_H_
+#endif // CONTENT_PUBLIC_BROWSER_SPEECH_RECOGNITION_MANAGER_H_
diff --git a/content/public/browser/speech_input_manager_delegate.h b/content/public/browser/speech_recognition_manager_delegate.h
index 348bfbe..dfe04c7 100644
--- a/content/public/browser/speech_input_manager_delegate.h
+++ b/content/public/browser/speech_recognition_manager_delegate.h
@@ -2,13 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CONTENT_PUBLIC_BROWSER_SPEECH_INPUT_MANAGER_DELEGATE_H_
-#define CONTENT_PUBLIC_BROWSER_SPEECH_INPUT_MANAGER_DELEGATE_H_
+#ifndef CONTENT_PUBLIC_BROWSER_SPEECH_RECOGNITION_MANAGER_DELEGATE_H_
+#define CONTENT_PUBLIC_BROWSER_SPEECH_RECOGNITION_MANAGER_DELEGATE_H_
#pragma once
#include <string>
-#include "content/public/common/speech_input_result.h"
+#include "content/public/common/speech_recognition_result.h"
namespace gfx {
class Rect;
@@ -16,11 +16,11 @@ class Rect;
namespace content {
-struct SpeechInputResult;
+struct SpeechRecognitionResult;
// Allows embedders to display the current state of recognition, for getting the
// user's permission and for fetching optional request information.
-class SpeechInputManagerDelegate {
+class SpeechRecognitionManagerDelegate {
public:
// Describes the microphone errors that are reported via ShowMicError.
enum MicError {
@@ -28,7 +28,7 @@ class SpeechInputManagerDelegate {
MIC_ERROR_DEVICE_IN_USE
};
- virtual ~SpeechInputManagerDelegate() {}
+ virtual ~SpeechRecognitionManagerDelegate() {}
// Get the optional request information if available.
virtual void GetRequestInfo(bool* can_report_metrics,
@@ -62,7 +62,7 @@ class SpeechInputManagerDelegate {
// Called when there has been a error with the recognition.
virtual void ShowRecognizerError(int caller_id,
- SpeechInputError error) = 0;
+ SpeechRecognitionErrorCode error) = 0;
// Called when recognition has ended or has been canceled.
virtual void DoClose(int caller_id) = 0;
@@ -70,4 +70,4 @@ class SpeechInputManagerDelegate {
} // namespace content
-#endif // CONTENT_PUBLIC_BROWSER_SPEECH_INPUT_MANAGER_DELEGATE_H_
+#endif // CONTENT_PUBLIC_BROWSER_SPEECH_RECOGNITION_MANAGER_DELEGATE_H_
diff --git a/content/public/browser/speech_input_preferences.h b/content/public/browser/speech_recognition_preferences.h
index e5a9420..c5682e2 100644
--- a/content/public/browser/speech_input_preferences.h
+++ b/content/public/browser/speech_recognition_preferences.h
@@ -2,16 +2,16 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CONTENT_PUBLIC_BROWSER_SPEECH_INPUT_PREFERENCES_H_
-#define CONTENT_PUBLIC_BROWSER_SPEECH_INPUT_PREFERENCES_H_
+#ifndef CONTENT_PUBLIC_BROWSER_SPEECH_RECOGNITION_PREFERENCES_H_
+#define CONTENT_PUBLIC_BROWSER_SPEECH_RECOGNITION_PREFERENCES_H_
#pragma once
#include "base/memory/ref_counted.h"
namespace content {
-class SpeechInputPreferences
- : public base::RefCountedThreadSafe<SpeechInputPreferences> {
+class SpeechRecognitionPreferences
+ : public base::RefCountedThreadSafe<SpeechRecognitionPreferences> {
public:
// Only to be called on the IO thread.
virtual bool FilterProfanities() const = 0;
@@ -19,12 +19,12 @@ class SpeechInputPreferences
virtual void SetFilterProfanities(bool filter_profanities) = 0;
protected:
- virtual ~SpeechInputPreferences() {}
+ virtual ~SpeechRecognitionPreferences() {}
private:
- friend class base::RefCountedThreadSafe<SpeechInputPreferences>;
+ friend class base::RefCountedThreadSafe<SpeechRecognitionPreferences>;
};
} // namespace content
-#endif // CONTENT_PUBLIC_BROWSER_SPEECH_INPUT_PREFERENCES_H_
+#endif // CONTENT_PUBLIC_BROWSER_SPEECH_RECOGNITION_PREFERENCES_H_
diff --git a/content/public/browser/speech_recognizer.h b/content/public/browser/speech_recognizer.h
index 32a8069..50c5c31 100644
--- a/content/public/browser/speech_recognizer.h
+++ b/content/public/browser/speech_recognizer.h
@@ -46,6 +46,6 @@ class SpeechRecognizer : public base::RefCountedThreadSafe<SpeechRecognizer> {
virtual void CancelRecognition() = 0;
};
-} // namespace speech_input
+} // namespace speech
#endif // CONTENT_PUBLIC_BROWSER_SPEECH_RECOGNIZER_H_
diff --git a/content/public/browser/speech_recognizer_delegate.h b/content/public/browser/speech_recognizer_delegate.h
index daf482a..14be404 100644
--- a/content/public/browser/speech_recognizer_delegate.h
+++ b/content/public/browser/speech_recognizer_delegate.h
@@ -6,7 +6,7 @@
#define CONTENT_PUBLIC_BROWSER_SPEECH_RECOGNIZER_DELEGATE_H_
#pragma once
-#include "content/public/common/speech_input_result.h"
+#include "content/public/common/speech_recognition_result.h"
namespace content {
@@ -15,7 +15,7 @@ namespace content {
class SpeechRecognizerDelegate {
public:
virtual void SetRecognitionResult(int caller_id,
- const SpeechInputResult& result) = 0;
+ const SpeechRecognitionResult& result) = 0;
// Invoked when the first audio packet was received from the audio capture
// device.
@@ -41,7 +41,8 @@ class SpeechRecognizerDelegate {
// session has already been cancelled when this call is made and the DidXxxx
// callbacks will not be issued. It is safe to destroy/release the
// |SpeechRecognizer| object while processing this call.
- virtual void OnRecognizerError(int caller_id, SpeechInputError error) = 0;
+ virtual void OnRecognizerError(int caller_id,
+ SpeechRecognitionErrorCode error) = 0;
// At the start of recognition, a short amount of audio is recorded to
// estimate the environment/background noise and this callback is issued