diff options
Diffstat (limited to 'chrome/common/child_process_logging_win.cc')
-rw-r--r-- | chrome/common/child_process_logging_win.cc | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/chrome/common/child_process_logging_win.cc b/chrome/common/child_process_logging_win.cc index b67d66a..5a1732e 100644 --- a/chrome/common/child_process_logging_win.cc +++ b/chrome/common/child_process_logging_win.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -37,6 +37,10 @@ typedef void (__cdecl *MainSetGpuInfo)(const wchar_t*, const wchar_t*, const wchar_t*); // exported in breakpad_win.cc: +// void __declspec(dllexport) __cdecl SetPrinterInfo. +typedef void (__cdecl *MainSetPrinterInfo)(const wchar_t*); + +// exported in breakpad_win.cc: // void __declspec(dllexport) __cdecl SetNumberOfViews. typedef void (__cdecl *MainSetNumberOfViews)(int); @@ -150,6 +154,20 @@ void SetGpuInfo(const content::GPUInfo& gpu_info) { UTF8ToUTF16(gpu_info.vertex_shader_version).c_str()); } +void SetPrinterInfo(const char* printer_info) { + static MainSetPrinterInfo set_printer_info = NULL; + if (!set_printer_info) { + HMODULE exe_module = GetModuleHandle(chrome::kBrowserProcessExecutableName); + if (!exe_module) + return; + set_printer_info = reinterpret_cast<MainSetPrinterInfo>( + GetProcAddress(exe_module, "SetPrinterInfo")); + if (!set_printer_info) + return; + } + (set_printer_info)(UTF8ToWide(printer_info).c_str()); +} + void SetCommandLine(const CommandLine* command_line) { static MainSetCommandLine set_command_line = NULL; if (!set_command_line) { |