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

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

Issue 2567203002: Revert of [ObjC ARC] Converts ios/chrome/browser/ui:ui to ARC. (Closed)
Patch Set: Created 4 years 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 2013 The Chromium Authors. All rights reserved. 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 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 #include "ios/chrome/browser/ui/show_mail_composer_util.h" 5 #include "ios/chrome/browser/ui/show_mail_composer_util.h"
6 6
7 #include <UIKit/UIKit.h> 7 #include <UIKit/UIKit.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/mac/scoped_nsobject.h"
10 #include "base/strings/sys_string_conversions.h" 11 #include "base/strings/sys_string_conversions.h"
11 #include "ios/chrome/browser/ui/commands/UIKit+ChromeExecuteCommand.h" 12 #include "ios/chrome/browser/ui/commands/UIKit+ChromeExecuteCommand.h"
12 #include "ios/chrome/browser/ui/commands/show_mail_composer_command.h" 13 #include "ios/chrome/browser/ui/commands/show_mail_composer_command.h"
13 14
14 #if !defined(__has_feature) || !__has_feature(objc_arc)
15 #error "This file requires ARC support."
16 #endif
17
18 void ShowMailComposer(const base::string16& to_recipient, 15 void ShowMailComposer(const base::string16& to_recipient,
19 const base::string16& subject, 16 const base::string16& subject,
20 const base::string16& body, 17 const base::string16& body,
21 const base::string16& title, 18 const base::string16& title,
22 const base::FilePath& text_file_to_attach, 19 const base::FilePath& text_file_to_attach,
23 int email_not_configured_alert_title_id, 20 int email_not_configured_alert_title_id,
24 int email_not_configured_alert_message_id) { 21 int email_not_configured_alert_message_id) {
25 ShowMailComposerCommand* command = [[ShowMailComposerCommand alloc] 22 base::scoped_nsobject<ShowMailComposerCommand>
23 command([[ShowMailComposerCommand alloc]
26 initWithToRecipient:base::SysUTF16ToNSString(to_recipient) 24 initWithToRecipient:base::SysUTF16ToNSString(to_recipient)
27 subject:base::SysUTF16ToNSString(subject) 25 subject:base::SysUTF16ToNSString(subject)
28 body:base::SysUTF16ToNSString(body) 26 body:base::SysUTF16ToNSString(body)
29 emailNotConfiguredAlertTitleId:email_not_configured_alert_title_id 27 emailNotConfiguredAlertTitleId:email_not_configured_alert_title_id
30 emailNotConfiguredAlertMessageId:email_not_configured_alert_message_id]; 28 emailNotConfiguredAlertMessageId:email_not_configured_alert_message_id]);
31 [command setTextFileToAttach:text_file_to_attach]; 29 [command setTextFileToAttach:text_file_to_attach];
32 UIWindow* main_window = [[UIApplication sharedApplication] keyWindow]; 30 UIWindow* main_window = [[UIApplication sharedApplication] keyWindow];
33 DCHECK(main_window); 31 DCHECK(main_window);
34 [main_window.rootViewController chromeExecuteCommand:command]; 32 [main_window.rootViewController chromeExecuteCommand:command];
35 } 33 }
OLDNEW
« no previous file with comments | « ios/chrome/browser/ui/rtl_geometry.mm ('k') | ios/chrome/browser/ui/show_privacy_settings_util.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698