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

Side by Side Diff: ios/public/provider/chrome/browser/voice/voice_search_provider.h

Issue 2457093002: [ios] Adds VoiceSearchProvider::IsVoiceSearchEnabled(). (Closed)
Patch Set: Created 4 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « no previous file | ios/public/provider/chrome/browser/voice/voice_search_provider.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef IOS_PUBLIC_PROVIDER_CHROME_BROWSER_VOICE_VOICE_SEARCH_PROVIDER_H_ 5 #ifndef IOS_PUBLIC_PROVIDER_CHROME_BROWSER_VOICE_VOICE_SEARCH_PROVIDER_H_
6 #define IOS_PUBLIC_PROVIDER_CHROME_BROWSER_VOICE_VOICE_SEARCH_PROVIDER_H_ 6 #define IOS_PUBLIC_PROVIDER_CHROME_BROWSER_VOICE_VOICE_SEARCH_PROVIDER_H_
7 7
8 #include <Foundation/Foundation.h> 8 #include <Foundation/Foundation.h>
9 #include <UIKit/UIKit.h> 9 #include <UIKit/UIKit.h>
10 10
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 13
14 class AudioSessionController; 14 class AudioSessionController;
15 @protocol VoiceSearchBar; 15 @protocol VoiceSearchBar;
16 class VoiceSearchController; 16 class VoiceSearchController;
17 17
18 namespace ios { 18 namespace ios {
19 class ChromeBrowserState; 19 class ChromeBrowserState;
20 } 20 }
21 21
22 // VoiceSearchProvider allows embedders to provide functionality related to 22 // VoiceSearchProvider allows embedders to provide functionality related to
23 // voice search. 23 // voice search.
24 class VoiceSearchProvider { 24 class VoiceSearchProvider {
25 public: 25 public:
26 VoiceSearchProvider() = default; 26 VoiceSearchProvider() = default;
27 virtual ~VoiceSearchProvider() = default; 27 virtual ~VoiceSearchProvider() = default;
28 28
29 // Returns true if voice search is enabled. The other methods in this
30 // provider must not be called if this method returns false.
31 virtual bool IsVoiceSearchEnabled() const;
32
29 // Returns the list of available voice search languages. 33 // Returns the list of available voice search languages.
30 virtual NSArray* GetAvailableLanguages() const; 34 virtual NSArray* GetAvailableLanguages() const;
31 35
32 // Returns the singleton audio session controller. 36 // Returns the singleton audio session controller.
33 virtual AudioSessionController* GetAudioSessionController() const; 37 virtual AudioSessionController* GetAudioSessionController() const;
34 38
35 // Creates a new VoiceSearchController object. 39 // Creates a new VoiceSearchController object.
36 virtual scoped_refptr<VoiceSearchController> CreateVoiceSearchController( 40 virtual scoped_refptr<VoiceSearchController> CreateVoiceSearchController(
37 ios::ChromeBrowserState* browser_state) const; 41 ios::ChromeBrowserState* browser_state) const;
38 42
39 // Creates a new VoiceSearchBar. The caller assumes ownership. 43 // Creates a new VoiceSearchBar. The caller assumes ownership.
40 virtual UIView<VoiceSearchBar>* CreateVoiceSearchBar(CGRect frame) const 44 virtual UIView<VoiceSearchBar>* CreateVoiceSearchBar(CGRect frame) const
41 NS_RETURNS_RETAINED; 45 NS_RETURNS_RETAINED;
42 46
43 private: 47 private:
44 DISALLOW_COPY_AND_ASSIGN(VoiceSearchProvider); 48 DISALLOW_COPY_AND_ASSIGN(VoiceSearchProvider);
45 }; 49 };
46 50
47 #endif // IOS_PUBLIC_PROVIDER_CHROME_BROWSER_VOICE_VOICE_SEARCH_PROVIDER_H_ 51 #endif // IOS_PUBLIC_PROVIDER_CHROME_BROWSER_VOICE_VOICE_SEARCH_PROVIDER_H_
OLDNEW
« no previous file with comments | « no previous file | ios/public/provider/chrome/browser/voice/voice_search_provider.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698