OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #import "chrome/browser/app_controller_mac.h" | 5 #import "chrome/browser/app_controller_mac.h" |
6 | 6 |
7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
(...skipping 1123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1134 if (paramList != nil) { | 1134 if (paramList != nil) { |
1135 // Pull required fields out of parameter list. | 1135 // Pull required fields out of parameter list. |
1136 NSString* mime = [[paramList descriptorAtIndex:1] stringValue]; | 1136 NSString* mime = [[paramList descriptorAtIndex:1] stringValue]; |
1137 NSString* inputPath = [[paramList descriptorAtIndex:2] stringValue]; | 1137 NSString* inputPath = [[paramList descriptorAtIndex:2] stringValue]; |
1138 NSString* printTitle = [[paramList descriptorAtIndex:3] stringValue]; | 1138 NSString* printTitle = [[paramList descriptorAtIndex:3] stringValue]; |
1139 NSString* printTicket = [[paramList descriptorAtIndex:4] stringValue]; | 1139 NSString* printTicket = [[paramList descriptorAtIndex:4] stringValue]; |
1140 // Convert the title to UTF 16 as required. | 1140 // Convert the title to UTF 16 as required. |
1141 string16 title16 = base::SysNSStringToUTF16(printTitle); | 1141 string16 title16 = base::SysNSStringToUTF16(printTitle); |
1142 string16 printTicket16 = base::SysNSStringToUTF16(printTicket); | 1142 string16 printTicket16 = base::SysNSStringToUTF16(printTicket); |
1143 print_dialog_cloud::CreatePrintDialogForFile( | 1143 print_dialog_cloud::CreatePrintDialogForFile( |
| 1144 ProfileManager::GetDefaultProfile(), NULL, |
1144 FilePath([inputPath UTF8String]), title16, | 1145 FilePath([inputPath UTF8String]), title16, |
1145 printTicket16, [mime UTF8String], /*modal=*/false, | 1146 printTicket16, [mime UTF8String], /*delete_on_close=*/false); |
1146 /*delete_on_close=*/false); | |
1147 } | 1147 } |
1148 } | 1148 } |
1149 | 1149 |
1150 // Calls the helper class to install the virtual driver to the | 1150 // Calls the helper class to install the virtual driver to the |
1151 // service process. | 1151 // service process. |
1152 - (void)installCloudPrint:(NSAppleEventDescriptor*)event { | 1152 - (void)installCloudPrint:(NSAppleEventDescriptor*)event { |
1153 cloud_print::VirtualDriverInstallHelper::SetUpInstall(); | 1153 cloud_print::VirtualDriverInstallHelper::SetUpInstall(); |
1154 } | 1154 } |
1155 | 1155 |
1156 // Calls the helper class to uninstall the virtual driver to the | 1156 // Calls the helper class to uninstall the virtual driver to the |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1317 | 1317 |
1318 } // namespace browser | 1318 } // namespace browser |
1319 | 1319 |
1320 namespace app_controller_mac { | 1320 namespace app_controller_mac { |
1321 | 1321 |
1322 bool IsOpeningNewWindow() { | 1322 bool IsOpeningNewWindow() { |
1323 return g_is_opening_new_window; | 1323 return g_is_opening_new_window; |
1324 } | 1324 } |
1325 | 1325 |
1326 } // namespace app_controller_mac | 1326 } // namespace app_controller_mac |
OLD | NEW |