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

Side by Side Diff: ios/chrome/browser/ui/show_mail_composer_util.mm

Issue 1058933002: [iOS] Upstream //ios/chrome/browser/ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@upstreamMemory
Patch Set: Review comments Created 5 years, 8 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
(Empty)
1 // Copyright 2013 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 #include "ios/chrome/browser/ui/show_mail_composer_util.h"
6
7 #include <UIKit/UIKit.h>
8
9 #include "base/logging.h"
10 #include "base/mac/scoped_nsobject.h"
11 #include "base/strings/sys_string_conversions.h"
12 #include "ios/chrome/browser/ui/commands/UIKit+ChromeExecuteCommand.h"
13 #include "ios/chrome/browser/ui/commands/show_mail_composer_command.h"
14
15 void ShowMailComposer(const base::string16& to_recipient,
16 const base::string16& subject,
17 const base::string16& body,
18 const base::string16& title,
19 const base::FilePath& text_file_to_attach,
20 int email_not_configured_alert_title_id,
21 int email_not_configured_alert_message_id) {
22 base::scoped_nsobject<ShowMailComposerCommand>
23 command([[ShowMailComposerCommand alloc]
24 initWithToRecipient:base::SysUTF16ToNSString(to_recipient)
25 subject:base::SysUTF16ToNSString(subject)
26 body:base::SysUTF16ToNSString(body)
27 emailNotConfiguredAlertTitleId:email_not_configured_alert_title_id
28 emailNotConfiguredAlertMessageId:email_not_configured_alert_message_id]);
29 [command setTextFileToAttach:text_file_to_attach];
30 UIWindow* main_window = [[UIApplication sharedApplication] keyWindow];
31 DCHECK(main_window);
32 [main_window.rootViewController chromeExecuteCommand:command];
33 }
OLDNEW
« no previous file with comments | « ios/chrome/browser/ui/show_mail_composer_util.h ('k') | ios/chrome/browser/ui/show_privacy_settings_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698