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

Unified Diff: chrome/browser/browser_main.cc

Issue 6038008: Modify chrome to accept a pdf file on the command line and upload it to Cloud... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/printing/print_dialog_cloud.h » ('j') | chrome/browser/ui/browser_init.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser_main.cc
===================================================================
--- chrome/browser/browser_main.cc (revision 71046)
+++ chrome/browser/browser_main.cc (working copy)
@@ -60,6 +60,7 @@
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/prefs/pref_value_store.h"
#include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h"
+#include "chrome/browser/printing/print_dialog_cloud.h"
#include "chrome/browser/process_singleton.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_manager.h"
@@ -1623,6 +1624,26 @@
}
}
+ if (parsed_command_line.HasSwitch(switches::kCloudPrintFile)) {
+ FilePath cloud_print_file;
+ cloud_print_file =
+ parsed_command_line.GetSwitchValuePath(switches::kCloudPrintFile);
+ if (!cloud_print_file.empty()) {
+ string16 print_job_title;
+#ifdef OS_WIN
sanjeevr 2011/01/13 18:03:41 Why is this part Windows-only?
abodenha 2011/01/13 19:03:59 There are problems with the type conversion from C
+ if (parsed_command_line.HasSwitch(switches::kCloudPrintJobTitle)) {
+ CommandLine::StringType native_job_title;
+ native_job_title = CommandLine::ForCurrentProcess()->GetSwitchValueNative(
+ switches::kCloudPrintJobTitle);
+ print_job_title = string16(native_job_title);
+ }
+#endif
+ PrintDialogCloud::CreatePrintDialogForPdf(cloud_print_file,
+ print_job_title,
+ false);
+ }
+ }
+
#if defined(OS_CHROMEOS)
// Run the Out of Memory priority manager while in this scope. Wait
// until here to start so that we give the most amount of time for
« no previous file with comments | « no previous file | chrome/browser/printing/print_dialog_cloud.h » ('j') | chrome/browser/ui/browser_init.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698