diff options
Diffstat (limited to 'chrome/service')
-rw-r--r-- | chrome/service/service_utility_process_host.cc | 28 | ||||
-rw-r--r-- | chrome/service/service_utility_process_host.h | 11 |
2 files changed, 5 insertions, 34 deletions
diff --git a/chrome/service/service_utility_process_host.cc b/chrome/service/service_utility_process_host.cc index 2b4fe26..8352526 100644 --- a/chrome/service/service_utility_process_host.cc +++ b/chrome/service/service_utility_process_host.cc @@ -13,7 +13,6 @@ #include "base/utf_string_conversions.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/chrome_utility_messages.h" -#include "content/common/child_process_info.h" #include "ipc/ipc_switches.h" #include "printing/page_range.h" #include "ui/base/ui_base_switches.h" @@ -22,7 +21,6 @@ #if defined(OS_WIN) #include "base/memory/scoped_ptr.h" #include "base/win/scoped_handle.h" -#include "content/common/child_process_messages.h" #include "printing/emf_win.h" #endif @@ -31,7 +29,6 @@ ServiceUtilityProcessHost::ServiceUtilityProcessHost( : client_(client), client_message_loop_proxy_(client_message_loop_proxy), waiting_for_reply_(false) { - process_id_ = ChildProcessInfo::GenerateChildProcessUniqueId(); } ServiceUtilityProcessHost::~ServiceUtilityProcessHost() { @@ -137,13 +134,8 @@ void ServiceUtilityProcessHost::OnChildDied() { } bool ServiceUtilityProcessHost::OnMessageReceived(const IPC::Message& message) { - bool msg_is_ok = false; - IPC_BEGIN_MESSAGE_MAP_EX(ServiceUtilityProcessHost, message, msg_is_ok) -#if defined(OS_WIN) // This hack is Windows-specific. - IPC_MESSAGE_HANDLER(ChildProcessHostMsg_PreCacheFont, OnPreCacheFont) - IPC_MESSAGE_HANDLER(ChildProcessHostMsg_ReleaseCachedFonts, - OnReleaseCachedFonts) -#endif + bool handled = true; + IPC_BEGIN_MESSAGE_MAP(ServiceUtilityProcessHost, message) IPC_MESSAGE_HANDLER( ChromeUtilityHostMsg_RenderPDFPagesToMetafile_Succeeded, OnRenderPDFPagesToMetafileSucceeded) @@ -154,20 +146,10 @@ bool ServiceUtilityProcessHost::OnMessageReceived(const IPC::Message& message) { OnGetPrinterCapsAndDefaultsSucceeded) IPC_MESSAGE_HANDLER(ChromeUtilityHostMsg_GetPrinterCapsAndDefaults_Failed, OnGetPrinterCapsAndDefaultsFailed) - IPC_MESSAGE_UNHANDLED(msg_is_ok__ = false) - IPC_END_MESSAGE_MAP_EX() - return true; -} - -#if defined(OS_WIN) // This hack is Windows-specific. -void ServiceUtilityProcessHost::OnPreCacheFont(const LOGFONT& font) { - PreCacheFont(font, process_id_); -} - -void ServiceUtilityProcessHost::OnReleaseCachedFonts() { - ReleaseCachedFonts(process_id_); + IPC_MESSAGE_UNHANDLED(handled = false) + IPC_END_MESSAGE_MAP() + return handled; } -#endif // OS_WIN void ServiceUtilityProcessHost::OnRenderPDFPagesToMetafileSucceeded( int highest_rendered_page_number) { diff --git a/chrome/service/service_utility_process_host.h b/chrome/service/service_utility_process_host.h index ee82ee1..49e2450 100644 --- a/chrome/service/service_utility_process_host.h +++ b/chrome/service/service_utility_process_host.h @@ -8,10 +8,6 @@ #include "build/build_config.h" -#if defined(OS_WIN) -#include <windows.h> -#endif // defined(OS_WIN) - #include <string> #include <vector> @@ -131,11 +127,6 @@ class ServiceUtilityProcessHost : public ServiceChildProcessHost { // retrieved successfully. void OnGetPrinterCapsAndDefaultsFailed(const std::string& printer_name); -#if defined(OS_WIN) // This hack is Windows-specific. - void OnPreCacheFont(const LOGFONT& font); - void OnReleaseCachedFonts(); -#endif // defined(OS_WIN) - // A pointer to our client interface, who will be informed of progress. scoped_refptr<Client> client_; scoped_refptr<base::MessageLoopProxy> client_message_loop_proxy_; @@ -144,8 +135,6 @@ class ServiceUtilityProcessHost : public ServiceChildProcessHost { FilePath metafile_path_; // The temporary folder created for the metafile. scoped_ptr<ScopedTempDir> scratch_metafile_dir_; - // The unique id created for the process. - int process_id_; DISALLOW_COPY_AND_ASSIGN(ServiceUtilityProcessHost); }; |