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

Side by Side Diff: ios/public/provider/chrome/browser/test_chrome_browser_provider.mm

Issue 2425713002: [ios] Adds configuration helper files for voice search. (Closed)
Patch Set: Review and file moves. Created 4 years, 2 months 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #include "ios/public/provider/chrome/browser/test_chrome_browser_provider.h" 5 #include "ios/public/provider/chrome/browser/test_chrome_browser_provider.h"
6 6
7 #import <UIKit/UIKit.h> 7 #import <UIKit/UIKit.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/mac/scoped_nsobject.h"
10 #include "base/memory/ptr_util.h" 11 #include "base/memory/ptr_util.h"
11 #include "ios/public/provider/chrome/browser/signin/fake_chrome_identity_service .h" 12 #include "ios/public/provider/chrome/browser/signin/fake_chrome_identity_service .h"
12 #import "ios/public/provider/chrome/browser/test_updatable_resource_provider.h" 13 #import "ios/public/provider/chrome/browser/test_updatable_resource_provider.h"
14 #import "ios/public/provider/chrome/browser/voice/voice_search_language.h"
13 15
14 @interface TestStyledTextField : UITextField<TextFieldStyling> 16 @interface TestStyledTextField : UITextField<TextFieldStyling>
15 @end 17 @end
16 18
17 @implementation TestStyledTextField 19 @implementation TestStyledTextField
18 @synthesize placeholderStyle = _placeholderStyle; 20 @synthesize placeholderStyle = _placeholderStyle;
19 @synthesize textValidator = _textValidator; 21 @synthesize textValidator = _textValidator;
20 22
21 - (void)setUseErrorStyling:(BOOL)error { 23 - (void)setUseErrorStyling:(BOOL)error {
22 } 24 }
(...skipping 28 matching lines...) Expand all
51 UpdatableResourceProvider* 53 UpdatableResourceProvider*
52 TestChromeBrowserProvider::GetUpdatableResourceProvider() { 54 TestChromeBrowserProvider::GetUpdatableResourceProvider() {
53 return test_updatable_resource_provider_.get(); 55 return test_updatable_resource_provider_.get();
54 } 56 }
55 57
56 UITextField<TextFieldStyling>* TestChromeBrowserProvider::CreateStyledTextField( 58 UITextField<TextFieldStyling>* TestChromeBrowserProvider::CreateStyledTextField(
57 CGRect frame) const { 59 CGRect frame) const {
58 return [[TestStyledTextField alloc] initWithFrame:frame]; 60 return [[TestStyledTextField alloc] initWithFrame:frame];
59 } 61 }
60 62
63 NSArray* TestChromeBrowserProvider::GetAvailableVoiceSearchLanguages() const {
64 base::scoped_nsobject<VoiceSearchLanguage> en([[VoiceSearchLanguage alloc]
65 initWithIdentifier:@"en-US"
66 displayName:@"English (US)"
67 localizationPreference:nil]);
68 return @[ en ];
69 }
70
61 } // namespace ios 71 } // namespace ios
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698