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

Side by Side Diff: ios/chrome/browser/web/fake_mailto_handler_helpers.mm

Issue 2889183005: Show all mailto: handlers, but dim unavailable ones. (Closed)
Patch Set: fixed BUILD.gn and unit tests Created 3 years, 7 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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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/chrome/browser/web/fake_mailto_handler_helpers.h" 5 #import "ios/chrome/browser/web/fake_mailto_handler_helpers.h"
6 6
7 #if !defined(__has_feature) || !__has_feature(objc_arc) 7 #if !defined(__has_feature) || !__has_feature(objc_arc)
8 #error "This file requires ARC support." 8 #error "This file requires ARC support."
9 #endif 9 #endif
10 10
11 @implementation FakeMailtoHandlerGmailNotInstalled 11 @implementation FakeMailtoHandlerGmailNotInstalled
12 - (BOOL)isAvailable { 12 - (BOOL)isAvailable {
13 return NO; 13 return NO;
14 } 14 }
15 @end 15 @end
16 16
17 @implementation FakeMailtoHandlerGmailInstalled 17 @implementation FakeMailtoHandlerGmailInstalled
18 - (BOOL)isAvailable { 18 - (BOOL)isAvailable {
19 return YES; 19 return YES;
20 } 20 }
21 @end 21 @end
22 22
23 @implementation FakeMailtoHandlerForTesting
24 - (instancetype)init {
25 return [super initWithName:@"FakeMail" appStoreID:@"12345678"];
26 }
27 - (BOOL)isAvailable {
28 return NO;
29 }
30 - (NSString*)beginningScheme {
31 return @"fakemail:/compose?";
32 }
33 @end
34
23 @implementation CountingMailtoURLRewriterObserver 35 @implementation CountingMailtoURLRewriterObserver
24 @synthesize changeCount = _changeCount; 36 @synthesize changeCount = _changeCount;
25 - (void)rewriterDidChange:(MailtoURLRewriter*)rewriter { 37 - (void)rewriterDidChange:(MailtoURLRewriter*)rewriter {
26 ++_changeCount; 38 ++_changeCount;
27 } 39 }
28 @end 40 @end
OLDNEW
« no previous file with comments | « ios/chrome/browser/web/fake_mailto_handler_helpers.h ('k') | ios/chrome/browser/web/mailto_url_rewriter.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698