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

Side by Side Diff: chrome/common/chrome_utility_messages.h

Issue 6995095: Move UtilityProcessHost to content and move the message sending/dispatching to the clients. This... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // Multiply-included message file, so no include guard. 5 // Multiply-included message file, so no include guard.
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/file_path.h" 11 #include "base/file_path.h"
12 #include "base/platform_file.h" 12 #include "base/platform_file.h"
13 #include "base/values.h" 13 #include "base/values.h"
14 #include "chrome/common/extensions/update_manifest.h" 14 #include "chrome/common/extensions/update_manifest.h"
15 #include "content/common/common_param_traits.h" 15 #include "content/common/common_param_traits.h"
16 #include "content/common/indexed_db_key.h"
17 #include "content/common/indexed_db_param_traits.h"
18 #include "content/common/serialized_script_value.h" 16 #include "content/common/serialized_script_value.h"
19 #include "ipc/ipc_message_macros.h" 17 #include "ipc/ipc_message_macros.h"
20 #include "ipc/ipc_message_utils.h"
21 #include "printing/backend/print_backend.h" 18 #include "printing/backend/print_backend.h"
22 #include "printing/page_range.h" 19 #include "printing/page_range.h"
23 #include "third_party/skia/include/core/SkBitmap.h" 20 #include "third_party/skia/include/core/SkBitmap.h"
24 #include "ui/gfx/rect.h" 21 #include "ui/gfx/rect.h"
25 22
26 #define IPC_MESSAGE_START UtilityMsgStart 23 #define IPC_MESSAGE_START ChromeUtilityMsgStart
27 24
28 IPC_STRUCT_TRAITS_BEGIN(printing::PageRange) 25 IPC_STRUCT_TRAITS_BEGIN(printing::PageRange)
29 IPC_STRUCT_TRAITS_MEMBER(from) 26 IPC_STRUCT_TRAITS_MEMBER(from)
30 IPC_STRUCT_TRAITS_MEMBER(to) 27 IPC_STRUCT_TRAITS_MEMBER(to)
31 IPC_STRUCT_TRAITS_END() 28 IPC_STRUCT_TRAITS_END()
32 29
33 IPC_STRUCT_TRAITS_BEGIN(printing::PrinterCapsAndDefaults) 30 IPC_STRUCT_TRAITS_BEGIN(printing::PrinterCapsAndDefaults)
34 IPC_STRUCT_TRAITS_MEMBER(printer_capabilities) 31 IPC_STRUCT_TRAITS_MEMBER(printer_capabilities)
35 IPC_STRUCT_TRAITS_MEMBER(caps_mime_type) 32 IPC_STRUCT_TRAITS_MEMBER(caps_mime_type)
36 IPC_STRUCT_TRAITS_MEMBER(printer_defaults) 33 IPC_STRUCT_TRAITS_MEMBER(printer_defaults)
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 std::string) // base64 encoded image contents 74 std::string) // base64 encoded image contents
78 75
79 // Tell the utility process to render the given PDF into a metafile. 76 // Tell the utility process to render the given PDF into a metafile.
80 IPC_MESSAGE_CONTROL5(UtilityMsg_RenderPDFPagesToMetafile, 77 IPC_MESSAGE_CONTROL5(UtilityMsg_RenderPDFPagesToMetafile,
81 base::PlatformFile, // PDF file 78 base::PlatformFile, // PDF file
82 FilePath, // Location for output metafile 79 FilePath, // Location for output metafile
83 gfx::Rect, // Render Area 80 gfx::Rect, // Render Area
84 int, // DPI 81 int, // DPI
85 std::vector<printing::PageRange>) 82 std::vector<printing::PageRange>)
86 83
87 // Tell the utility process to extract the given IDBKeyPath from the
88 // SerializedScriptValue vector and reply with the corresponding IDBKeys.
89 IPC_MESSAGE_CONTROL3(UtilityMsg_IDBKeysFromValuesAndKeyPath,
90 int, // id
91 std::vector<SerializedScriptValue>,
92 string16) // IDBKeyPath
93
94 IPC_MESSAGE_CONTROL3(UtilityMsg_InjectIDBKey,
95 IndexedDBKey /* key */,
96 SerializedScriptValue /* value */,
97 string16 /* key path*/)
98
99 // Tell the utility process to parse a JSON string into a Value object. 84 // Tell the utility process to parse a JSON string into a Value object.
100 IPC_MESSAGE_CONTROL1(UtilityMsg_ParseJSON, 85 IPC_MESSAGE_CONTROL1(UtilityMsg_ParseJSON,
101 std::string /* JSON to parse */) 86 std::string /* JSON to parse */)
102 87
103 // Tells the utility process that it's running in batch mode.
104 IPC_MESSAGE_CONTROL0(UtilityMsg_BatchMode_Started)
105
106 // Tells the utility process that it can shutdown.
107 IPC_MESSAGE_CONTROL0(UtilityMsg_BatchMode_Finished)
108
109 // Tells the utility process to get capabilities and defaults for the specified 88 // Tells the utility process to get capabilities and defaults for the specified
110 // printer. Used on Windows to isolate the service process from printer driver 89 // printer. Used on Windows to isolate the service process from printer driver
111 // crashes by executing this in a separate process. This does not run in a 90 // crashes by executing this in a separate process. This does not run in a
112 // sandbox. 91 // sandbox.
113 IPC_MESSAGE_CONTROL1(UtilityMsg_GetPrinterCapsAndDefaults, 92 IPC_MESSAGE_CONTROL1(UtilityMsg_GetPrinterCapsAndDefaults,
114 std::string /* printer name */) 93 std::string /* printer name */)
115 94
116 //------------------------------------------------------------------------------ 95 //------------------------------------------------------------------------------
117 // Utility process host messages: 96 // Utility process host messages:
118 // These are messages from the utility process to the browser. 97 // These are messages from the utility process to the browser.
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 // Reply when an error occured rendering the PDF. 143 // Reply when an error occured rendering the PDF.
165 IPC_MESSAGE_CONTROL0(UtilityHostMsg_RenderPDFPagesToMetafile_Failed) 144 IPC_MESSAGE_CONTROL0(UtilityHostMsg_RenderPDFPagesToMetafile_Failed)
166 145
167 #if defined(OS_WIN) 146 #if defined(OS_WIN)
168 // Request that the given font be loaded by the host so it's cached by the 147 // Request that the given font be loaded by the host so it's cached by the
169 // OS. Please see ChildProcessHost::PreCacheFont for details. 148 // OS. Please see ChildProcessHost::PreCacheFont for details.
170 IPC_SYNC_MESSAGE_CONTROL1_0(UtilityHostMsg_PreCacheFont, 149 IPC_SYNC_MESSAGE_CONTROL1_0(UtilityHostMsg_PreCacheFont,
171 LOGFONT /* font data */) 150 LOGFONT /* font data */)
172 #endif // defined(OS_WIN) 151 #endif // defined(OS_WIN)
173 152
174 // Reply when the utility process has succeeded in obtaining the value for
175 // IDBKeyPath.
176 IPC_MESSAGE_CONTROL2(UtilityHostMsg_IDBKeysFromValuesAndKeyPath_Succeeded,
177 int /* id */,
178 std::vector<IndexedDBKey> /* value */)
179
180 // Reply when the utility process has failed in obtaining the value for
181 // IDBKeyPath.
182 IPC_MESSAGE_CONTROL1(UtilityHostMsg_IDBKeysFromValuesAndKeyPath_Failed,
183 int /* id */)
184
185 // Reply when the utility process has finished injecting an IDBKey into
186 // a SerializedScriptValue.
187 IPC_MESSAGE_CONTROL1(UtilityHostMsg_InjectIDBKey_Finished,
188 SerializedScriptValue /* new value */)
189
190 // Reply when the utility process successfully parsed a JSON string. 153 // Reply when the utility process successfully parsed a JSON string.
191 // 154 //
192 // WARNING: The result can be of any Value subclass type, but we can't easily 155 // WARNING: The result can be of any Value subclass type, but we can't easily
193 // pass indeterminate value types by const object reference with our IPC macros, 156 // pass indeterminate value types by const object reference with our IPC macros,
194 // so we put the result Value into a ListValue. Handlers should examine the 157 // so we put the result Value into a ListValue. Handlers should examine the
195 // first (and only) element of the ListValue for the actual result. 158 // first (and only) element of the ListValue for the actual result.
196 IPC_MESSAGE_CONTROL1(UtilityHostMsg_ParseJSON_Succeeded, 159 IPC_MESSAGE_CONTROL1(UtilityHostMsg_ParseJSON_Succeeded,
197 ListValue) 160 ListValue)
198 161
199 // Reply when the utility process failed in parsing a JSON string. 162 // Reply when the utility process failed in parsing a JSON string.
200 IPC_MESSAGE_CONTROL1(UtilityHostMsg_ParseJSON_Failed, 163 IPC_MESSAGE_CONTROL1(UtilityHostMsg_ParseJSON_Failed,
201 std::string /* error message, if any*/) 164 std::string /* error message, if any*/)
202 165
203 // Reply when the utility process has succeeded in obtaining the printer 166 // Reply when the utility process has succeeded in obtaining the printer
204 // capabilities and defaults. 167 // capabilities and defaults.
205 IPC_MESSAGE_CONTROL2(UtilityHostMsg_GetPrinterCapsAndDefaults_Succeeded, 168 IPC_MESSAGE_CONTROL2(UtilityHostMsg_GetPrinterCapsAndDefaults_Succeeded,
206 std::string /* printer name */, 169 std::string /* printer name */,
207 printing::PrinterCapsAndDefaults) 170 printing::PrinterCapsAndDefaults)
208 171
209 // Reply when the utility process has failed to obtain the printer 172 // Reply when the utility process has failed to obtain the printer
210 // capabilities and defaults. 173 // capabilities and defaults.
211 IPC_MESSAGE_CONTROL1(UtilityHostMsg_GetPrinterCapsAndDefaults_Failed, 174 IPC_MESSAGE_CONTROL1(UtilityHostMsg_GetPrinterCapsAndDefaults_Failed,
212 std::string /* printer name */) 175 std::string /* printer name */)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698