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

Side by Side Diff: chrome/service/cloud_print/print_system_win.cc

Issue 9443007: Add Chrome To Mobile Service and Views Page Action. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Put shared CloudPrint consts/helpers in chrome/common/; use CloudPrintURL. Created 8 years, 9 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 | Annotate | Revision Log
OLDNEW
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 #include "chrome/service/cloud_print/print_system.h" 5 #include "chrome/service/cloud_print/print_system.h"
6 6
7 #include <objidl.h> 7 #include <objidl.h>
8 #include <winspool.h> 8 #include <winspool.h>
9 #include <xpsprint.h> 9 #include <xpsprint.h>
10 10
(...skipping 864 matching lines...) Expand 10 before | Expand all | Expand 10 after
875 PrintSystemWin::CreateJobSpooler() { 875 PrintSystemWin::CreateJobSpooler() {
876 return new JobSpoolerWin(); 876 return new JobSpoolerWin();
877 } 877 }
878 878
879 std::string PrintSystemWin::GetSupportedMimeTypes() { 879 std::string PrintSystemWin::GetSupportedMimeTypes() {
880 if (printing::XPSPrintModule::Init()) 880 if (printing::XPSPrintModule::Init())
881 return "application/vnd.ms-xpsdocument,application/pdf"; 881 return "application/vnd.ms-xpsdocument,application/pdf";
882 return "application/pdf"; 882 return "application/pdf";
883 } 883 }
884 884
885
886 std::string PrintSystem::GenerateProxyId() {
887 GUID proxy_id = {0};
888 HRESULT hr = UuidCreate(&proxy_id);
889 DCHECK(SUCCEEDED(hr));
890 wchar_t* proxy_id_as_string = NULL;
891 UuidToString(&proxy_id, reinterpret_cast<RPC_WSTR *>(&proxy_id_as_string));
892 DCHECK(proxy_id_as_string);
893 std::string ret;
894 WideToUTF8(proxy_id_as_string, wcslen(proxy_id_as_string), &ret);
895 RpcStringFree(reinterpret_cast<RPC_WSTR *>(&proxy_id_as_string));
896 return ret;
897 }
898
899 scoped_refptr<PrintSystem> PrintSystem::CreateInstance( 885 scoped_refptr<PrintSystem> PrintSystem::CreateInstance(
900 const base::DictionaryValue* print_system_settings) { 886 const base::DictionaryValue* print_system_settings) {
901 return new PrintSystemWin; 887 return new PrintSystemWin;
902 } 888 }
903 889
904 } // namespace cloud_print 890 } // namespace cloud_print
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698