OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #import "ios/chrome/browser/web/mailto_handler.h" |
| 6 |
| 7 #import "base/strings/sys_string_conversions.h" |
| 8 #include "url/gurl.h" |
| 9 |
| 10 #if !defined(__has_feature) || !__has_feature(objc_arc) |
| 11 #error "This file requires ARC support." |
| 12 #endif |
| 13 |
| 14 @implementation MailtoHandler |
| 15 @synthesize appName = _appName; |
| 16 @synthesize appStoreID = _appStoreID; |
| 17 |
| 18 - (instancetype)initWithName:(NSString*)appName |
| 19 appStoreID:(NSString*)appStoreID { |
| 20 self = [super init]; |
| 21 if (self) { |
| 22 _appName = [appName copy]; |
| 23 _appStoreID = [appStoreID copy]; |
| 24 } |
| 25 return self; |
| 26 } |
| 27 |
| 28 - (BOOL)isAvailable { |
| 29 // This should be implemented by subclasses. |
| 30 NOTREACHED(); |
| 31 return NO; |
| 32 } |
| 33 |
| 34 - (NSString*)rewriteMailtoURL:(const GURL&)gURL { |
| 35 // This should be implemented by subclasses. |
| 36 NOTREACHED(); |
| 37 return nil; |
| 38 } |
| 39 |
| 40 @end |
OLD | NEW |