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

Side by Side Diff: ios/web/test/crw_fake_web_controller_observer.mm

Issue 1171203004: Correct iOS build for latest Xcode beta. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nits Created 5 years, 6 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
« no previous file with comments | « ios/web/shell/view_controller.mm ('k') | ios/web/weak_nsobject_counter.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #import "ios/web/test/crw_fake_web_controller_observer.h" 5 #import "ios/web/test/crw_fake_web_controller_observer.h"
6 6
7 #import "base/logging.h" 7 #import "base/logging.h"
8 #import "base/mac/scoped_nsobject.h" 8 #import "base/mac/scoped_nsobject.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 10
11 @implementation CRWFakeWebControllerObserver { 11 @implementation CRWFakeWebControllerObserver {
12 ScopedVector<base::DictionaryValue> _commandsReceived; 12 ScopedVector<base::DictionaryValue> _commandsReceived;
13 base::scoped_nsobject<NSString> _commandPrefix; 13 base::scoped_nsobject<NSString> _commandPrefix;
14 } 14 }
15 15
16 @synthesize pageLoaded = _pageLoaded; 16 @synthesize pageLoaded = _pageLoaded;
17 17
18 - (instancetype)init {
19 NOTREACHED();
20 return nil;
21 }
22
23 - (instancetype)initWithCommandPrefix:(NSString*)commandPrefix { 18 - (instancetype)initWithCommandPrefix:(NSString*)commandPrefix {
24 DCHECK(commandPrefix); 19 DCHECK(commandPrefix);
25 self = [super init]; 20 self = [super init];
26 if (self) { 21 if (self) {
27 _commandPrefix.reset([commandPrefix copy]); 22 _commandPrefix.reset([commandPrefix copy]);
28 } 23 }
29 return self; 24 return self;
30 } 25 }
31 26
27 - (instancetype)init {
28 NOTREACHED();
29 return nil;
30 }
31
32 - (void)pageLoaded:(CRWWebController*)webController { 32 - (void)pageLoaded:(CRWWebController*)webController {
33 _pageLoaded = YES; 33 _pageLoaded = YES;
34 } 34 }
35 35
36 - (NSString*)commandPrefix { 36 - (NSString*)commandPrefix {
37 return _commandPrefix; 37 return _commandPrefix;
38 } 38 }
39 39
40 - (BOOL)handleCommand:(const base::DictionaryValue&)command 40 - (BOOL)handleCommand:(const base::DictionaryValue&)command
41 webController:(CRWWebController*)webController 41 webController:(CRWWebController*)webController
42 userIsInteracting:(BOOL)userIsInteracting 42 userIsInteracting:(BOOL)userIsInteracting
43 originURL:(const GURL&)originURL { 43 originURL:(const GURL&)originURL {
44 _commandsReceived.push_back(command.DeepCopy()); 44 _commandsReceived.push_back(command.DeepCopy());
45 return YES; 45 return YES;
46 } 46 }
47 47
48 - (ScopedVector<base::DictionaryValue>&)commandsReceived { 48 - (ScopedVector<base::DictionaryValue>&)commandsReceived {
49 return _commandsReceived; 49 return _commandsReceived;
50 } 50 }
51 51
52 @end 52 @end
OLDNEW
« no previous file with comments | « ios/web/shell/view_controller.mm ('k') | ios/web/weak_nsobject_counter.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698