| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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_CHROME_BROWSER_UI_COMMANDS_SHOW_MAIL_COMPOSER_COMMAND_H_ | 5 #ifndef IOS_CHROME_BROWSER_UI_COMMANDS_SHOW_MAIL_COMPOSER_COMMAND_H_ |
| 6 #define IOS_CHROME_BROWSER_UI_COMMANDS_SHOW_MAIL_COMPOSER_COMMAND_H_ | 6 #define IOS_CHROME_BROWSER_UI_COMMANDS_SHOW_MAIL_COMPOSER_COMMAND_H_ |
| 7 | 7 |
| 8 #import <Foundation/Foundation.h> | 8 #import <Foundation/Foundation.h> |
| 9 | 9 |
| 10 #import "ios/chrome/browser/ui/commands/generic_chrome_command.h" | 10 #import "ios/chrome/browser/ui/commands/generic_chrome_command.h" |
| 11 | 11 |
| 12 namespace base { | 12 namespace base { |
| 13 class FilePath; | 13 class FilePath; |
| 14 } | 14 } |
| 15 | 15 |
| 16 @interface ShowMailComposerCommand : GenericChromeCommand | 16 @interface ShowMailComposerCommand : GenericChromeCommand |
| 17 | 17 |
| 18 // Mark inherited initializer as unavailable to prevent calling it by mistake. |
| 19 - (instancetype)initWithTag:(NSInteger)tag NS_UNAVAILABLE; |
| 20 |
| 21 // Initializes a command designed to open the mail composer with pre-filled |
| 22 // recipients, subject, body. |
| 18 - (instancetype)initWithToRecipient:(NSString*)toRecipient | 23 - (instancetype)initWithToRecipient:(NSString*)toRecipient |
| 19 subject:(NSString*)subject | 24 subject:(NSString*)subject |
| 20 body:(NSString*)body | 25 body:(NSString*)body |
| 21 emailNotConfiguredAlertTitleId:(int)alertTitleId | 26 emailNotConfiguredAlertTitleId:(int)alertTitleId |
| 22 emailNotConfiguredAlertMessageId:(int)alertMessageId; | 27 emailNotConfiguredAlertMessageId:(int)alertMessageId |
| 28 NS_DESIGNATED_INITIALIZER; |
| 23 | 29 |
| 24 @property(nonatomic, readonly, assign) NSArray* toRecipients; | 30 // List of email recipients. |
| 25 @property(nonatomic, readonly, assign) NSString* subject; | 31 @property(nonatomic, readonly) NSArray* toRecipients; |
| 26 @property(nonatomic, readonly, assign) NSString* body; | 32 |
| 27 @property(nonatomic, assign) base::FilePath textFileToAttach; | 33 // Pre-filled default email subject. |
| 28 @property(nonatomic, readonly, assign) int emailNotConfiguredAlertTitleId; | 34 @property(nonatomic, readonly) NSString* subject; |
| 29 @property(nonatomic, readonly, assign) int emailNotConfiguredAlertMessageId; | 35 |
| 36 // Pre-filled default email body. |
| 37 @property(nonatomic, readonly) NSString* body; |
| 38 |
| 39 // Path to file to attach to email. |
| 40 @property(nonatomic, assign) const base::FilePath& textFileToAttach; |
| 41 |
| 42 // Identifier for alert if the email title is empty. |
| 43 @property(nonatomic, readonly) int emailNotConfiguredAlertTitleId; |
| 44 |
| 45 // Identifier for alert if the email body is empty. |
| 46 @property(nonatomic, readonly) int emailNotConfiguredAlertMessageId; |
| 30 | 47 |
| 31 @end | 48 @end |
| 32 | 49 |
| 33 #endif // IOS_CHROME_BROWSER_UI_COMMANDS_SHOW_MAIL_COMPOSER_COMMAND_H_ | 50 #endif // IOS_CHROME_BROWSER_UI_COMMANDS_SHOW_MAIL_COMPOSER_COMMAND_H_ |
| OLD | NEW |