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

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

Issue 2455503007: [ios] Adds VoiceSearchBar creation methods to VoiceSearchProvider. (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 10
10 #include "base/macros.h" 11 #include "base/macros.h"
11 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
12 13
13 class AudioSessionController; 14 class AudioSessionController;
15 @protocol VoiceSearchBar;
14 class VoiceSearchController; 16 class VoiceSearchController;
15 17
16 namespace ios { 18 namespace ios {
17 class ChromeBrowserState; 19 class ChromeBrowserState;
18 } 20 }
19 21
20 // VoiceSearchProvider allows embedders to provide functionality related to 22 // VoiceSearchProvider allows embedders to provide functionality related to
21 // voice search. 23 // voice search.
22 class VoiceSearchProvider { 24 class VoiceSearchProvider {
23 public: 25 public:
24 VoiceSearchProvider() = default; 26 VoiceSearchProvider() = default;
25 virtual ~VoiceSearchProvider() = default; 27 virtual ~VoiceSearchProvider() = default;
26 28
27 // Returns the list of available voice search languages. 29 // Returns the list of available voice search languages.
28 virtual NSArray* GetAvailableLanguages() const; 30 virtual NSArray* GetAvailableLanguages() const;
29 31
30 // Returns the singleton audio session controller. 32 // Returns the singleton audio session controller.
31 virtual AudioSessionController* GetAudioSessionController() const; 33 virtual AudioSessionController* GetAudioSessionController() const;
32 34
33 // Creates a new VoiceSearchController object. 35 // Creates a new VoiceSearchController object.
34 virtual scoped_refptr<VoiceSearchController> CreateVoiceSearchController( 36 virtual scoped_refptr<VoiceSearchController> CreateVoiceSearchController(
35 ios::ChromeBrowserState* browser_state) const; 37 ios::ChromeBrowserState* browser_state) const;
36 38
39 // Creates a new VoiceSearchBar. The caller assumes ownership.
40 virtual UIView<VoiceSearchBar>* CreateVoiceSearchBar(CGRect frame) const
41 NS_RETURNS_RETAINED;
kkhorimoto 2016/10/27 17:22:47 is NS_RETURNS_RETAINED an ARC-related annotation?
rohitrao (ping after 24h) 2016/10/27 17:47:28 I've been cargo-culting it. Will check with stk a
42
37 private: 43 private:
38 DISALLOW_COPY_AND_ASSIGN(VoiceSearchProvider); 44 DISALLOW_COPY_AND_ASSIGN(VoiceSearchProvider);
39 }; 45 };
40 46
41 #endif // IOS_PUBLIC_PROVIDER_CHROME_BROWSER_VOICE_VOICE_SEARCH_PROVIDER_H_ 47 #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