| Index: ios/public/provider/chrome/browser/voice/voice_search_controller.h
|
| diff --git a/ios/public/provider/chrome/browser/voice/voice_search_controller.h b/ios/public/provider/chrome/browser/voice/voice_search_controller.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..e2dfb0b68db7e42ee19648b7f8e1cdec8403df1f
|
| --- /dev/null
|
| +++ b/ios/public/provider/chrome/browser/voice/voice_search_controller.h
|
| @@ -0,0 +1,60 @@
|
| +// Copyright 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 IOS_PUBLIC_PROVIDER_CHROME_BROWSER_VOICE_VOICE_SEARCH_CONTROLLER_IMPL_H_
|
| +#define IOS_PUBLIC_PROVIDER_CHROME_BROWSER_VOICE_VOICE_SEARCH_CONTROLLER_IMPL_H_
|
| +
|
| +#include "base/memory/ref_counted.h"
|
| +
|
| +@class Tab;
|
| +@class UIViewController;
|
| +@protocol VoiceSearchControllerDelegate;
|
| +
|
| +// TODO(crbug.com/607204): Convert to Objective-C class.
|
| +class VoiceSearchController
|
| + : public base::RefCountedThreadSafe<VoiceSearchController> {
|
| + public:
|
| + VoiceSearchController();
|
| +
|
| + // Sets the delegate for this object.
|
| + virtual void SetDelegate(id<VoiceSearchControllerDelegate> delegate);
|
| +
|
| + // Preloads views and view controllers needed for the voice search UI.
|
| + virtual void PrepareToAppear();
|
| +
|
| + // Starts recognizing and recording process. Will call the delegate method
|
| + // upon completion if the recognition succeeds.
|
| + // |presenting_view_controller| is the UIViewController from which to present
|
| + // the Voice Search input UI.
|
| + virtual void StartRecognition(UIViewController* presenting_view_controller,
|
| + Tab* current_tab);
|
| +
|
| + // Whether or not the Text To Speech user preference is enabled.
|
| + virtual bool IsTextToSpeechEnabled();
|
| +
|
| + // Returns whether Text To Speech is supported for the currently selected
|
| + // Voice Search language. If a Voice Search language has not been specified,
|
| + // returns whether Text To Speech is supported for the default Voice Search
|
| + // language.
|
| + virtual bool IsTextToSpeechSupported();
|
| +
|
| + // Returns |true| if the voice search UI is visible.
|
| + virtual bool IsVisible();
|
| +
|
| + // Returns |true| if text-to-speech audio is currently playing.
|
| + virtual bool IsPlayingAudio();
|
| +
|
| + // Dismisses the mic permissions help UI, if shown.
|
| + virtual void DismissMicPermissionsHelp();
|
| +
|
| + protected:
|
| + virtual ~VoiceSearchController();
|
| +
|
| + private:
|
| + friend class base::RefCountedThreadSafe<VoiceSearchController>;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(VoiceSearchController);
|
| +};
|
| +
|
| +#endif // IOS_PUBLIC_PROVIDER_CHROME_BROWSER_VOICE_VOICE_SEARCH_CONTROLLER_IMPL_H_
|
|
|