blob: ab88ebd6076f4fc421bd04a0f89031ab16deb4bc [file] [log] [blame]
// Copyright 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#import "ios/chrome/browser/webui/show_mail_composer_context.h"
#include "base/files/file_path.h"
#include "base/logging.h"
#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
#endif
@implementation ShowMailComposerContext {
base::FilePath _textFileToAttach;
}
@synthesize emailNotConfiguredAlertTitleId = _emailNotConfiguredAlertTitleId;
@synthesize emailNotConfiguredAlertMessageId =
_emailNotConfiguredAlertMessageId;
@synthesize toRecipients = _toRecipients;
@synthesize subject = _subject;
@synthesize body = _body;
- (instancetype)initWithToRecipients:(NSArray<NSString*>*)toRecipients
subject:(NSString*)subject
body:(NSString*)body
emailNotConfiguredAlertTitleId:(int)alertTitleId
emailNotConfiguredAlertMessageId:(int)alertMessageId {
DCHECK(alertTitleId);
DCHECK(alertMessageId);
self = [super init];
if (self) {
_toRecipients = [[NSArray alloc] initWithArray:toRecipients copyItems:YES];
_subject = [subject copy];
_body = [body copy];
_emailNotConfiguredAlertTitleId = alertTitleId;
_emailNotConfiguredAlertMessageId = alertMessageId;
}
return self;
}
- (const base::FilePath&)textFileToAttach {
return _textFileToAttach;
}
- (void)setTextFileToAttach:(const base::FilePath&)textFileToAttach {
_textFileToAttach = textFileToAttach;
}
@end