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