blob: 98a1b8aa71fa8093fbacb85a7580da94bd09fb70 [file] [log] [blame]
[email protected]0dd9e8b2012-01-04 13:36:161// Copyright (c) 2012 The Chromium Authors. All rights reserved.
license.botbf09a502008-08-24 00:55:552// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
initial.commit09911bf2008-07-26 23:55:294
[email protected]d5a04832011-03-12 21:46:265// Multiply-included file, no traditional include guard.
6#include <map>
7#include <set>
initial.commit09911bf2008-07-26 23:55:298#include <string>
9#include <vector>
10
11#include "base/basictypes.h"
[email protected]d5a04832011-03-12 21:46:2612#include "base/file_path.h"
[email protected]d5a04832011-03-12 21:46:2613#include "base/process.h"
[email protected]d5a04832011-03-12 21:46:2614#include "base/shared_memory.h"
[email protected]4c79e3e2009-10-23 18:31:3215#include "base/string16.h"
[email protected]6782f832011-05-10 04:06:0016#include "base/stringprintf.h"
[email protected]d5a04832011-03-12 21:46:2617#include "base/values.h"
18#include "build/build_config.h"
[email protected]79d68c62011-04-15 21:07:0319#include "chrome/common/common_param_traits.h"
[email protected]c14406092011-10-27 13:43:4220#include "chrome/common/content_settings.h"
[email protected]610ca832011-10-19 12:59:2021#include "chrome/common/content_settings_pattern.h"
[email protected]1c9c7fb2011-03-11 16:38:3822#include "chrome/common/instant_types.h"
[email protected]d5a04832011-03-12 21:46:2623#include "chrome/common/nacl_types.h"
[email protected]c08e7932011-03-29 04:08:1424#include "chrome/common/search_provider.h"
[email protected]d5a04832011-03-12 21:46:2625#include "chrome/common/thumbnail_score.h"
[email protected]152b8ba32010-03-29 19:40:1626#include "chrome/common/translate_errors.h"
[email protected]19a5c7442011-10-21 20:00:4127#include "content/public/common/common_param_traits.h"
28#include "content/public/common/webkit_param_traits.h"
[email protected]d5a04832011-03-12 21:46:2629#include "ipc/ipc_message_macros.h"
[email protected]e7f009d2011-06-14 19:35:1030#include "ipc/ipc_platform_file.h"
[email protected]1d4ecf42011-08-26 21:27:3031#include "third_party/skia/include/core/SkBitmap.h"
[email protected]fffaf972011-03-24 01:34:3532#include "third_party/WebKit/Source/WebKit/chromium/public/WebCache.h"
[email protected]fffaf972011-03-24 01:34:3533#include "third_party/WebKit/Source/WebKit/chromium/public/WebConsoleMessage.h"
[email protected]d5a04832011-03-12 21:46:2634#include "ui/gfx/rect.h"
[email protected]7a4de7a62010-08-17 18:38:2435
[email protected]44c49c92011-03-28 16:17:2336// Singly-included section for enums and custom IPC traits.
[email protected]d5a04832011-03-12 21:46:2637#ifndef CHROME_COMMON_RENDER_MESSAGES_H_
38#define CHROME_COMMON_RENDER_MESSAGES_H_
[email protected]049eec22010-10-20 21:32:5239
[email protected]992db4c2011-05-12 15:37:1540class SkBitmap;
41
[email protected]a6097f42011-01-10 08:50:5142// Command values for the cmd parameter of the
43// ViewHost_JavaScriptStressTestControl message. For each command the parameter
44// passed has a different meaning:
45// For the command kJavaScriptStressTestSetStressRunType the parameter it the
46// type taken from the enumeration v8::Testing::StressType.
47// For the command kJavaScriptStressTestPrepareStressRun the parameter it the
48// number of the stress run about to take place.
49enum ViewHostMsg_JavaScriptStressTestControl_Commands {
50 kJavaScriptStressTestSetStressRunType = 0,
51 kJavaScriptStressTestPrepareStressRun = 1,
52};
53
[email protected]51b63f62011-10-05 18:55:4254// This enum is inside a struct so that we can forward-declare the struct in
55// others headers without having to include this one.
56struct ChromeViewHostMsg_GetPluginInfo_Status {
[email protected]51b63f62011-10-05 18:55:4257 enum Value {
58 kAllowed,
[email protected]8aa7a412011-11-07 12:33:4259 kBlocked,
60 kClickToPlay,
[email protected]51b63f62011-10-05 18:55:4261 kDisabled,
62 kNotFound,
[email protected]8aa7a412011-11-07 12:33:4263 kOutdatedBlocked,
64 kOutdatedDisallowed,
65 kUnauthorized,
[email protected]51b63f62011-10-05 18:55:4266 };
67
68 ChromeViewHostMsg_GetPluginInfo_Status() : value(kAllowed) {}
69
70 Value value;
71};
72
[email protected]7d5c3ac2009-02-04 08:58:1973namespace IPC {
74
[email protected]3fa441d2011-09-18 17:28:5075#if defined(OS_POSIX) && !defined(USE_AURA)
[email protected]661eb9d2009-02-03 02:11:4876
77// TODO(port): this shouldn't exist. However, the plugin stuff is really using
78// HWNDS (NativeView), and making Windows calls based on them. I've not figured
79// out the deal with plugins yet.
80template <>
81struct ParamTraits<gfx::NativeView> {
82 typedef gfx::NativeView param_type;
[email protected]7d5c3ac2009-02-04 08:58:1983 static void Write(Message* m, const param_type& p) {
[email protected]661eb9d2009-02-03 02:11:4884 NOTIMPLEMENTED();
85 }
86
[email protected]7d5c3ac2009-02-04 08:58:1987 static bool Read(const Message* m, void** iter, param_type* p) {
[email protected]661eb9d2009-02-03 02:11:4888 NOTIMPLEMENTED();
89 *p = NULL;
90 return true;
91 }
92
[email protected]252cad62010-08-18 18:33:5793 static void Log(const param_type& p, std::string* l) {
[email protected]93f10522010-10-31 16:27:4894 l->append(base::StringPrintf("<gfx::NativeView>"));
[email protected]661eb9d2009-02-03 02:11:4895 }
96};
97
[email protected]3fa441d2011-09-18 17:28:5098#endif // defined(OS_POSIX) && !defined(USE_AURA)
[email protected]661eb9d2009-02-03 02:11:4899
[email protected]7b291f92009-08-14 05:43:53100template <>
[email protected]610ca832011-10-19 12:59:20101struct ParamTraits<ContentSettingsPattern> {
102 typedef ContentSettingsPattern param_type;
103 static void Write(Message* m, const param_type& p);
104 static bool Read(const Message* m, void** iter, param_type* r);
105 static void Log(const param_type& p, std::string* l);
106};
107
[email protected]b3df5a42010-05-11 14:31:09108} // namespace IPC
[email protected]9f4db512010-05-10 20:21:41109
[email protected]5a52f162008-08-27 04:15:31110#endif // CHROME_COMMON_RENDER_MESSAGES_H_
[email protected]d5a04832011-03-12 21:46:26111
[email protected]778574e2011-03-21 22:03:50112#define IPC_MESSAGE_START ChromeMsgStart
[email protected]d5a04832011-03-12 21:46:26113
[email protected]51b63f62011-10-05 18:55:42114IPC_ENUM_TRAITS(ChromeViewHostMsg_GetPluginInfo_Status::Value)
[email protected]fffaf972011-03-24 01:34:35115IPC_ENUM_TRAITS(InstantCompleteBehavior)
[email protected]c08e7932011-03-29 04:08:14116IPC_ENUM_TRAITS(search_provider::OSDDType)
117IPC_ENUM_TRAITS(search_provider::InstallState)
[email protected]fffaf972011-03-24 01:34:35118IPC_ENUM_TRAITS(TranslateErrors::Type)
[email protected]fffaf972011-03-24 01:34:35119IPC_ENUM_TRAITS(WebKit::WebConsoleMessage::Level)
[email protected]fffaf972011-03-24 01:34:35120
[email protected]51b63f62011-10-05 18:55:42121IPC_STRUCT_TRAITS_BEGIN(ChromeViewHostMsg_GetPluginInfo_Status)
122IPC_STRUCT_TRAITS_MEMBER(value)
123IPC_STRUCT_TRAITS_END()
124
[email protected]610ca832011-10-19 12:59:20125IPC_STRUCT_TRAITS_BEGIN(ContentSettingsPattern::PatternParts)
126 IPC_STRUCT_TRAITS_MEMBER(scheme)
127 IPC_STRUCT_TRAITS_MEMBER(is_scheme_wildcard)
128 IPC_STRUCT_TRAITS_MEMBER(host)
129 IPC_STRUCT_TRAITS_MEMBER(has_domain_wildcard)
130 IPC_STRUCT_TRAITS_MEMBER(port)
131 IPC_STRUCT_TRAITS_MEMBER(is_port_wildcard)
132 IPC_STRUCT_TRAITS_MEMBER(path)
133IPC_STRUCT_TRAITS_END()
134
[email protected]c14406092011-10-27 13:43:42135IPC_STRUCT_TRAITS_BEGIN(ContentSettingPatternSource)
136 IPC_STRUCT_TRAITS_MEMBER(primary_pattern)
137 IPC_STRUCT_TRAITS_MEMBER(secondary_pattern)
138 IPC_STRUCT_TRAITS_MEMBER(setting)
139 IPC_STRUCT_TRAITS_MEMBER(source)
140 IPC_STRUCT_TRAITS_MEMBER(incognito)
141IPC_STRUCT_TRAITS_END()
142
[email protected]edece212011-11-16 11:56:56143IPC_STRUCT_TRAITS_BEGIN(RendererContentSettingRules)
144 IPC_STRUCT_TRAITS_MEMBER(image_rules)
145 IPC_STRUCT_TRAITS_MEMBER(script_rules)
146IPC_STRUCT_TRAITS_END()
147
[email protected]fffaf972011-03-24 01:34:35148IPC_STRUCT_TRAITS_BEGIN(ThumbnailScore)
149 IPC_STRUCT_TRAITS_MEMBER(boring_score)
150 IPC_STRUCT_TRAITS_MEMBER(good_clipping)
151 IPC_STRUCT_TRAITS_MEMBER(at_top)
152 IPC_STRUCT_TRAITS_MEMBER(time_at_snapshot)
153IPC_STRUCT_TRAITS_END()
154
[email protected]fffaf972011-03-24 01:34:35155IPC_STRUCT_TRAITS_BEGIN(WebKit::WebCache::ResourceTypeStat)
156 IPC_STRUCT_TRAITS_MEMBER(count)
157 IPC_STRUCT_TRAITS_MEMBER(size)
158 IPC_STRUCT_TRAITS_MEMBER(liveSize)
159 IPC_STRUCT_TRAITS_MEMBER(decodedSize)
160IPC_STRUCT_TRAITS_END()
161
162IPC_STRUCT_TRAITS_BEGIN(WebKit::WebCache::ResourceTypeStats)
163 IPC_STRUCT_TRAITS_MEMBER(images)
164 IPC_STRUCT_TRAITS_MEMBER(cssStyleSheets)
165 IPC_STRUCT_TRAITS_MEMBER(scripts)
166 IPC_STRUCT_TRAITS_MEMBER(xslStyleSheets)
167 IPC_STRUCT_TRAITS_MEMBER(fonts)
168IPC_STRUCT_TRAITS_END()
169
170IPC_STRUCT_TRAITS_BEGIN(WebKit::WebCache::UsageStats)
171 IPC_STRUCT_TRAITS_MEMBER(minDeadCapacity)
172 IPC_STRUCT_TRAITS_MEMBER(maxDeadCapacity)
173 IPC_STRUCT_TRAITS_MEMBER(capacity)
174 IPC_STRUCT_TRAITS_MEMBER(liveSize)
175 IPC_STRUCT_TRAITS_MEMBER(deadSize)
176IPC_STRUCT_TRAITS_END()
177
[email protected]d5a04832011-03-12 21:46:26178//-----------------------------------------------------------------------------
179// RenderView messages
180// These are messages sent from the browser to the renderer process.
181
[email protected]d5a04832011-03-12 21:46:26182// Tells the renderer to set its maximum cache size to the supplied value.
[email protected]2ccf45c2011-08-19 23:35:50183IPC_MESSAGE_CONTROL3(ChromeViewMsg_SetCacheCapacities,
[email protected]d5a04832011-03-12 21:46:26184 size_t /* min_dead_capacity */,
185 size_t /* max_dead_capacity */,
186 size_t /* capacity */)
187
188// Tells the renderer to clear the cache.
[email protected]e81d4d72011-09-29 16:54:31189IPC_MESSAGE_CONTROL1(ChromeViewMsg_ClearCache,
190 bool /* on_navigation */)
[email protected]d5a04832011-03-12 21:46:26191
[email protected]55722152011-03-22 01:33:53192// Tells the renderer to dump as much memory as it can, perhaps because we
193// have memory pressure or the renderer is (or will be) paged out. This
194// should only result in purging objects we can recalculate, e.g. caches or
195// JS garbage, not in purging irreplaceable objects.
[email protected]2ccf45c2011-08-19 23:35:50196IPC_MESSAGE_CONTROL0(ChromeViewMsg_PurgeMemory)
[email protected]55722152011-03-22 01:33:53197
[email protected]350019f2011-08-02 04:18:33198// For WebUI testing, this message stores parameters to do ScriptEvalRequest at
199// a time which is late enough to not be thrown out, and early enough to be
200// before onload events are fired.
[email protected]2ccf45c2011-08-19 23:35:50201IPC_MESSAGE_ROUTED4(ChromeViewMsg_WebUIJavaScript,
[email protected]350019f2011-08-02 04:18:33202 string16, /* frame_xpath */
203 string16, /* jscript_url */
204 int, /* ID */
205 bool /* If true, result is sent back. */)
206
[email protected]55722152011-03-22 01:33:53207// Tells the render view to capture a thumbnail image of the page. The
[email protected]2ccf45c2011-08-19 23:35:50208// render view responds with a ChromeViewHostMsg_Snapshot.
209IPC_MESSAGE_ROUTED0(ChromeViewMsg_CaptureSnapshot)
[email protected]d5a04832011-03-12 21:46:26210
[email protected]d5a04832011-03-12 21:46:26211// History system notification that the visited link database has been
212// replaced. It has one SharedMemoryHandle argument consisting of the table
213// handle. This handle is valid in the context of the renderer
[email protected]2ccf45c2011-08-19 23:35:50214IPC_MESSAGE_CONTROL1(ChromeViewMsg_VisitedLink_NewTable,
215 base::SharedMemoryHandle)
[email protected]d5a04832011-03-12 21:46:26216
217// History system notification that a link has been added and the link
218// coloring state for the given hash must be re-calculated.
[email protected]2ccf45c2011-08-19 23:35:50219IPC_MESSAGE_CONTROL1(ChromeViewMsg_VisitedLink_Add, std::vector<uint64>)
[email protected]d5a04832011-03-12 21:46:26220
221// History system notification that one or more history items have been
222// deleted, which at this point means that all link coloring state must be
223// re-calculated.
[email protected]2ccf45c2011-08-19 23:35:50224IPC_MESSAGE_CONTROL0(ChromeViewMsg_VisitedLink_Reset)
[email protected]d5a04832011-03-12 21:46:26225
[email protected]edece212011-11-16 11:56:56226// Set the content setting rules stored by the renderer.
227IPC_MESSAGE_CONTROL1(ChromeViewMsg_SetContentSettingRules,
228 RendererContentSettingRules /* rules */)
[email protected]c14406092011-10-27 13:43:42229
[email protected]d5a04832011-03-12 21:46:26230// Tells the render view to load all blocked plugins.
[email protected]2ccf45c2011-08-19 23:35:50231IPC_MESSAGE_ROUTED0(ChromeViewMsg_LoadBlockedPlugins)
[email protected]d5a04832011-03-12 21:46:26232
[email protected]d5a04832011-03-12 21:46:26233// Asks the renderer to send back stats on the WebCore cache broken down by
234// resource types.
[email protected]2ccf45c2011-08-19 23:35:50235IPC_MESSAGE_CONTROL0(ChromeViewMsg_GetCacheResourceStats)
[email protected]d5a04832011-03-12 21:46:26236
237// Asks the renderer to send back Histograms.
[email protected]2ccf45c2011-08-19 23:35:50238IPC_MESSAGE_CONTROL1(ChromeViewMsg_GetRendererHistograms,
[email protected]d5a04832011-03-12 21:46:26239 int /* sequence number of Renderer Histograms. */)
240
[email protected]63a8ba12011-04-29 05:42:22241// Tells the renderer to create a FieldTrial, and by using a 100% probability
242// for the FieldTrial, forces the FieldTrial to have assigned group name.
[email protected]2ccf45c2011-08-19 23:35:50243IPC_MESSAGE_CONTROL2(ChromeViewMsg_SetFieldTrialGroup,
[email protected]63a8ba12011-04-29 05:42:22244 std::string /* field trial name */,
245 std::string /* group name that was assigned. */)
246
[email protected]d5a04832011-03-12 21:46:26247#if defined(USE_TCMALLOC)
248// Asks the renderer to send back tcmalloc stats.
[email protected]2ccf45c2011-08-19 23:35:50249IPC_MESSAGE_CONTROL0(ChromeViewMsg_GetRendererTcmalloc)
[email protected]768e4ff2011-08-11 20:29:35250// Asks the renderer to enable/disable Tcmalloc heap profiling.
251// Note: filename_prefix arg is effectively ignored since the render process
252// will be unable to write files to disk. Instead use WriteTcmallocHeapProfile
253// to write a profile file.
[email protected]2ccf45c2011-08-19 23:35:50254IPC_MESSAGE_CONTROL2(ChromeViewMsg_SetTcmallocHeapProfiling,
[email protected]768e4ff2011-08-11 20:29:35255 bool /* enable profiling */,
256 std::string /* filename prefix for profiles */)
257// Asks the renderer to write the Tcmalloc heap profile to a file.
[email protected]2ccf45c2011-08-19 23:35:50258IPC_MESSAGE_CONTROL1(ChromeViewMsg_WriteTcmallocHeapProfile,
[email protected]768e4ff2011-08-11 20:29:35259 FilePath::StringType /* filepath */)
[email protected]d5a04832011-03-12 21:46:26260#endif
261
262// Asks the renderer to send back V8 heap stats.
[email protected]2ccf45c2011-08-19 23:35:50263IPC_MESSAGE_CONTROL0(ChromeViewMsg_GetV8HeapStats)
[email protected]d5a04832011-03-12 21:46:26264
[email protected]d5a04832011-03-12 21:46:26265// Posts a message to the renderer.
[email protected]2ccf45c2011-08-19 23:35:50266IPC_MESSAGE_ROUTED3(ChromeViewMsg_HandleMessageFromExternalHost,
[email protected]d5a04832011-03-12 21:46:26267 std::string /* The message */,
268 std::string /* The origin */,
269 std::string /* The target*/)
270
[email protected]2ccf45c2011-08-19 23:35:50271IPC_MESSAGE_ROUTED4(ChromeViewMsg_SearchBoxChange,
[email protected]d5a04832011-03-12 21:46:26272 string16 /* value */,
273 bool /* verbatim */,
274 int /* selection_start */,
275 int /* selection_end */)
[email protected]2ccf45c2011-08-19 23:35:50276IPC_MESSAGE_ROUTED2(ChromeViewMsg_SearchBoxSubmit,
[email protected]d5a04832011-03-12 21:46:26277 string16 /* value */,
278 bool /* verbatim */)
[email protected]2ccf45c2011-08-19 23:35:50279IPC_MESSAGE_ROUTED0(ChromeViewMsg_SearchBoxCancel)
280IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxResize,
[email protected]d5a04832011-03-12 21:46:26281 gfx::Rect /* search_box_bounds */)
[email protected]2ccf45c2011-08-19 23:35:50282IPC_MESSAGE_ROUTED4(ChromeViewMsg_DetermineIfPageSupportsInstant,
[email protected]d5a04832011-03-12 21:46:26283 string16 /* value*/,
284 bool /* verbatim */,
285 int /* selection_start */,
286 int /* selection_end */)
287
[email protected]1138cce2011-12-02 21:29:36288// Toggles visual muting of the render view area. This is on when a constrained
289// window is showing.
290IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetVisuallyDeemphasized,
291 bool /* deemphazied */)
292
[email protected]d5a04832011-03-12 21:46:26293// Tells the renderer to translate the page contents from one language to
294// another.
[email protected]2ccf45c2011-08-19 23:35:50295IPC_MESSAGE_ROUTED4(ChromeViewMsg_TranslatePage,
[email protected]d5a04832011-03-12 21:46:26296 int /* page id */,
297 std::string, /* the script injected in the page */
298 std::string, /* BCP 47/RFC 5646 language code the page
299 is in */
300 std::string /* BCP 47/RFC 5646 language code to translate
301 to */)
302
303// Tells the renderer to revert the text of translated page to its original
304// contents.
[email protected]2ccf45c2011-08-19 23:35:50305IPC_MESSAGE_ROUTED1(ChromeViewMsg_RevertTranslation,
[email protected]d5a04832011-03-12 21:46:26306 int /* page id */)
307
[email protected]16e923d2011-04-30 00:41:44308// Tells a renderer if it's currently being prerendered. Must only be set
309// to true before any navigation occurs, and only set to false at most once
310// after that.
[email protected]2ccf45c2011-08-19 23:35:50311IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetIsPrerendering,
[email protected]16e923d2011-04-30 00:41:44312 bool /* whether the RenderView is prerendering */)
313
[email protected]d5a04832011-03-12 21:46:26314// Sent on process startup to indicate whether this process is running in
315// incognito mode.
[email protected]2ccf45c2011-08-19 23:35:50316IPC_MESSAGE_CONTROL1(ChromeViewMsg_SetIsIncognitoProcess,
[email protected]d5a04832011-03-12 21:46:26317 bool /* is_incognito_processs */)
318
[email protected]68cafdb2011-06-10 21:42:18319// Sent in response to ViewHostMsg_DidBlockDisplayingInsecureContent.
[email protected]2ccf45c2011-08-19 23:35:50320IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetAllowDisplayingInsecureContent,
[email protected]68cafdb2011-06-10 21:42:18321 bool /* allowed */)
322
323// Sent in response to ViewHostMsg_DidBlockRunningInsecureContent.
[email protected]2ccf45c2011-08-19 23:35:50324IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetAllowRunningInsecureContent,
[email protected]68cafdb2011-06-10 21:42:18325 bool /* allowed */)
326
[email protected]92d213842011-11-02 20:09:43327// Tells renderer to always enforce mixed content blocking for this host.
328IPC_MESSAGE_ROUTED1(ChromeViewMsg_AddStrictSecurityHost,
329 std::string /* host */)
330
[email protected]8c40da62011-07-13 22:58:46331// Sent when the profile changes the kSafeBrowsingEnabled preference.
[email protected]2ccf45c2011-08-19 23:35:50332IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetClientSidePhishingDetection,
[email protected]8c40da62011-07-13 22:58:46333 bool /* enable_phishing_detection */)
334
[email protected]83af80b22011-09-06 18:49:19335// This message asks frame sniffer start.
336IPC_MESSAGE_ROUTED1(ChromeViewMsg_StartFrameSniffer,
337 string16 /* frame-name */)
338
[email protected]21d898342011-08-23 18:14:41339// JavaScript related messages -----------------------------------------------
340
341// Notify the JavaScript engine in the render to change its parameters
342// while performing stress testing.
343IPC_MESSAGE_ROUTED2(ChromeViewMsg_JavaScriptStressTestControl,
344 int /* cmd */,
345 int /* param */)
346
[email protected]a1127f82011-09-08 17:27:01347// Asks the renderer to send back FPS.
348IPC_MESSAGE_ROUTED0(ChromeViewMsg_GetFPS)
349
[email protected]6f9f7d82011-12-08 12:13:34350// Tells the view it is displaying an interstitial page.
351IPC_MESSAGE_ROUTED0(ChromeViewMsg_SetAsInterstitial)
352
[email protected]d5a04832011-03-12 21:46:26353//-----------------------------------------------------------------------------
354// TabContents messages
355// These are messages sent from the renderer to the browser process.
356
[email protected]93b9d692011-04-13 00:44:31357// Provides the contents for the given page that was loaded recently.
[email protected]2ccf45c2011-08-19 23:35:50358IPC_MESSAGE_ROUTED3(ChromeViewHostMsg_PageContents,
[email protected]93b9d692011-04-13 00:44:31359 GURL /* URL of the page */,
360 int32 /* page id */,
361 string16 /* page contents */)
362
363// Notification that the language for the tab has been determined.
[email protected]2ccf45c2011-08-19 23:35:50364IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_TranslateLanguageDetermined,
[email protected]93b9d692011-04-13 00:44:31365 std::string /* page ISO639_1 language code */,
366 bool /* whether the page can be translated */)
367
[email protected]2ccf45c2011-08-19 23:35:50368IPC_MESSAGE_CONTROL1(ChromeViewHostMsg_UpdatedCacheStats,
[email protected]d5a04832011-03-12 21:46:26369 WebKit::WebCache::UsageStats /* stats */)
370
[email protected]d5a04832011-03-12 21:46:26371// Tells the browser that content in the current page was blocked due to the
372// user's content settings.
[email protected]2ccf45c2011-08-19 23:35:50373IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_ContentBlocked,
[email protected]d5a04832011-03-12 21:46:26374 ContentSettingsType, /* type of blocked content */
375 std::string /* resource identifier */)
376
[email protected]5327dfb2011-05-03 17:50:36377// Sent by the renderer process to check whether access to web databases is
[email protected]bac33eb2011-05-04 01:47:49378// granted by content settings.
[email protected]2ccf45c2011-08-19 23:35:50379IPC_SYNC_MESSAGE_CONTROL5_1(ChromeViewHostMsg_AllowDatabase,
[email protected]9a611a92011-05-07 17:06:18380 int /* render_view_id */,
381 GURL /* origin_url */,
[email protected]c0a45a982011-05-25 16:58:15382 GURL /* top origin url */,
[email protected]bac33eb2011-05-04 01:47:49383 string16 /* database name */,
384 string16 /* database display name */,
[email protected]8c276642011-05-06 09:41:00385 bool /* allowed */)
[email protected]bac33eb2011-05-04 01:47:49386
387// Sent by the renderer process to check whether access to DOM Storage is
388// granted by content settings.
[email protected]2ccf45c2011-08-19 23:35:50389IPC_SYNC_MESSAGE_CONTROL4_1(ChromeViewHostMsg_AllowDOMStorage,
[email protected]bac33eb2011-05-04 01:47:49390 int /* render_view_id */,
391 GURL /* origin_url */,
[email protected]c0a45a982011-05-25 16:58:15392 GURL /* top origin url */,
[email protected]c729db82011-11-23 17:37:27393 bool /* if true local storage, otherwise session */,
[email protected]8c276642011-05-06 09:41:00394 bool /* allowed */)
[email protected]5327dfb2011-05-03 17:50:36395
[email protected]45316d62011-05-12 18:15:30396// Sent by the renderer process to check whether access to FileSystem is
397// granted by content settings.
[email protected]2ccf45c2011-08-19 23:35:50398IPC_SYNC_MESSAGE_CONTROL3_1(ChromeViewHostMsg_AllowFileSystem,
[email protected]45316d62011-05-12 18:15:30399 int /* render_view_id */,
400 GURL /* origin_url */,
[email protected]c0a45a982011-05-25 16:58:15401 GURL /* top origin url */,
[email protected]45316d62011-05-12 18:15:30402 bool /* allowed */)
403
[email protected]9a611a92011-05-07 17:06:18404// Sent by the renderer process to check whether access to Indexed DBis
405// granted by content settings.
[email protected]2ccf45c2011-08-19 23:35:50406IPC_SYNC_MESSAGE_CONTROL4_1(ChromeViewHostMsg_AllowIndexedDB,
[email protected]9a611a92011-05-07 17:06:18407 int /* render_view_id */,
[email protected]c0a45a982011-05-25 16:58:15408 GURL /* origin_url */,
409 GURL /* top origin url */,
[email protected]9a611a92011-05-07 17:06:18410 string16 /* database name */,
411 bool /* allowed */)
[email protected]5327dfb2011-05-03 17:50:36412
[email protected]51b63f62011-10-05 18:55:42413// Return information about a plugin for the given URL and MIME type.
414// In contrast to ViewHostMsg_GetPluginInfo in content/, this IPC call knows
415// about specific reasons why a plug-in can't be used, for example because it's
416// disabled.
417IPC_SYNC_MESSAGE_CONTROL4_3(ChromeViewHostMsg_GetPluginInfo,
418 int /* render_view_id */,
419 GURL /* url */,
420 GURL /* top origin url */,
421 std::string /* mime_type */,
422 ChromeViewHostMsg_GetPluginInfo_Status /* status */,
423 webkit::WebPluginInfo /* plugin */,
424 std::string /* actual_mime_type */)
425
[email protected]43b7eaca2012-01-12 17:27:28426#if defined(ENABLE_PLUGIN_INSTALLATION)
[email protected]1d697f32011-11-28 11:57:51427// Tells the browser to search for a plug-in that can handle the given MIME
428// type. The result will be sent asynchronously to the routing ID
429// |placeholder_id|.
430IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_FindMissingPlugin,
431 int /* placeholder_id */,
432 std::string /* mime_type */)
433
434// Notifies a missing plug-in placeholder that a plug-in with name |plugin_name|
435// has been found.
436IPC_MESSAGE_ROUTED1(ChromeViewMsg_FoundMissingPlugin,
437 string16 /* plugin_name */)
438
439// Notifies a missing plug-in placeholder that no plug-in has been found.
440IPC_MESSAGE_ROUTED0(ChromeViewMsg_DidNotFindMissingPlugin)
441
[email protected]0dd9e8b2012-01-04 13:36:16442// Notifies a missing plug-in placeholder that we have started downloading
443// the plug-in.
444IPC_MESSAGE_ROUTED0(ChromeViewMsg_StartedDownloadingPlugin)
445
446// Notifies a missing plug-in placeholder that we have finished downloading
447// the plug-in.
448IPC_MESSAGE_ROUTED0(ChromeViewMsg_FinishedDownloadingPlugin)
[email protected]43b7eaca2012-01-12 17:27:28449#endif // defined(ENABLE_PLUGIN_INSTALLATION)
[email protected]0dd9e8b2012-01-04 13:36:16450
[email protected]725f6882012-01-13 18:50:06451// Notifies a missing plug-in placeholder that there was an error downloading
452// the plug-in.
453IPC_MESSAGE_ROUTED1(ChromeViewMsg_ErrorDownloadingPlugin,
454 std::string /* message */)
455
[email protected]d5a04832011-03-12 21:46:26456// Specifies the URL as the first parameter (a wstring) and thumbnail as
457// binary data as the second parameter.
[email protected]2ccf45c2011-08-19 23:35:50458IPC_MESSAGE_ROUTED3(ChromeViewHostMsg_Thumbnail,
[email protected]d5a04832011-03-12 21:46:26459 GURL /* url */,
460 ThumbnailScore /* score */,
461 SkBitmap /* bitmap */)
462
463// Send a snapshot of the tab contents to the render host.
[email protected]2ccf45c2011-08-19 23:35:50464IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_Snapshot,
[email protected]d5a04832011-03-12 21:46:26465 SkBitmap /* bitmap */)
466
[email protected]d5a04832011-03-12 21:46:26467// Following message is used to communicate the values received by the
468// callback binding the JS to Cpp.
469// An instance of browser that has an automation host listening to it can
470// have a javascript send a native value (string, number, boolean) to the
471// listener in Cpp. (DomAutomationController)
[email protected]2ccf45c2011-08-19 23:35:50472IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_DomOperationResponse,
[email protected]d5a04832011-03-12 21:46:26473 std::string /* json_string */,
474 int /* automation_id */)
475
[email protected]d5a04832011-03-12 21:46:26476// A message for an external host.
[email protected]2ccf45c2011-08-19 23:35:50477IPC_MESSAGE_ROUTED3(ChromeViewHostMsg_ForwardMessageToExternalHost,
[email protected]d5a04832011-03-12 21:46:26478 std::string /* message */,
479 std::string /* origin */,
480 std::string /* target */)
481
[email protected]d5a04832011-03-12 21:46:26482// A renderer sends this to the browser process when it wants to start
483// a new instance of the Native Client process. The browser will launch
484// the process and return a handle to an IMC channel.
[email protected]2ccf45c2011-08-19 23:35:50485IPC_SYNC_MESSAGE_CONTROL2_3(ChromeViewHostMsg_LaunchNaCl,
[email protected]d5a04832011-03-12 21:46:26486 std::wstring /* url for the NaCl module */,
487 int /* socket count */,
488 std::vector<nacl::FileDescriptor>
489 /* imc channel handles */,
490 base::ProcessHandle /* NaCl process handle */,
491 base::ProcessId /* NaCl process id */)
492
[email protected]d5a04832011-03-12 21:46:26493// Notification that the page has an OpenSearch description document
494// associated with it.
[email protected]2ccf45c2011-08-19 23:35:50495IPC_MESSAGE_ROUTED3(ChromeViewHostMsg_PageHasOSDD,
[email protected]d5a04832011-03-12 21:46:26496 int32 /* page_id */,
497 GURL /* url of OS description document */,
[email protected]c08e7932011-03-29 04:08:14498 search_provider::OSDDType)
[email protected]d5a04832011-03-12 21:46:26499
500// Find out if the given url's security origin is installed as a search
501// provider.
[email protected]2ccf45c2011-08-19 23:35:50502IPC_SYNC_MESSAGE_ROUTED2_1(ChromeViewHostMsg_GetSearchProviderInstallState,
[email protected]c08e7932011-03-29 04:08:14503 GURL /* page url */,
504 GURL /* inquiry url */,
505 search_provider::InstallState /* install */)
[email protected]d5a04832011-03-12 21:46:26506
[email protected]d5a04832011-03-12 21:46:26507// Send back histograms as vector of pickled-histogram strings.
[email protected]2ccf45c2011-08-19 23:35:50508IPC_MESSAGE_CONTROL2(ChromeViewHostMsg_RendererHistograms,
[email protected]d5a04832011-03-12 21:46:26509 int, /* sequence number of Renderer Histograms. */
510 std::vector<std::string>)
511
512#if defined USE_TCMALLOC
513// Send back tcmalloc stats output.
[email protected]2ccf45c2011-08-19 23:35:50514IPC_MESSAGE_CONTROL1(ChromeViewHostMsg_RendererTcmalloc,
[email protected]d5a04832011-03-12 21:46:26515 std::string /* tcmalloc debug output */)
[email protected]768e4ff2011-08-11 20:29:35516// Send back tcmalloc profile to write to a file.
[email protected]2ccf45c2011-08-19 23:35:50517IPC_MESSAGE_CONTROL2(ChromeViewHostMsg_WriteTcmallocHeapProfile_ACK,
[email protected]768e4ff2011-08-11 20:29:35518 FilePath::StringType /* filepath */,
519 std::string /* heap profile */)
[email protected]d5a04832011-03-12 21:46:26520#endif
521
522// Sends back stats about the V8 heap.
[email protected]2ccf45c2011-08-19 23:35:50523IPC_MESSAGE_CONTROL2(ChromeViewHostMsg_V8HeapStats,
[email protected]d5a04832011-03-12 21:46:26524 int /* size of heap (allocated from the OS) */,
525 int /* bytes in use */)
526
527// Request for a DNS prefetch of the names in the array.
528// NameList is typedef'ed std::vector<std::string>
[email protected]2ccf45c2011-08-19 23:35:50529IPC_MESSAGE_CONTROL1(ChromeViewHostMsg_DnsPrefetch,
[email protected]2bf2bd92011-03-31 07:12:44530 std::vector<std::string> /* hostnames */)
[email protected]d5a04832011-03-12 21:46:26531
[email protected]d5a04832011-03-12 21:46:26532// Notifies when a plugin couldn't be loaded because it's outdated.
[email protected]2ccf45c2011-08-19 23:35:50533IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_BlockedOutdatedPlugin,
[email protected]d5a04832011-03-12 21:46:26534 string16, /* name */
535 GURL /* update_url */)
536
[email protected]d5a04832011-03-12 21:46:26537// Provide the browser process with information about the WebCore resource
[email protected]872ae5b2011-05-26 20:20:50538// cache and current renderer framerate.
[email protected]2ccf45c2011-08-19 23:35:50539IPC_MESSAGE_CONTROL1(ChromeViewHostMsg_ResourceTypeStats,
[email protected]d5a04832011-03-12 21:46:26540 WebKit::WebCache::ResourceTypeStats)
541
[email protected]d5a04832011-03-12 21:46:26542
543// Notifies the browser of the language (ISO 639_1 code language, such as fr,
544// en, zh...) of the current page.
[email protected]2ccf45c2011-08-19 23:35:50545IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_PageLanguageDetermined,
[email protected]d5a04832011-03-12 21:46:26546 std::string /* the language */)
547
548// Notifies the browser that a page has been translated.
[email protected]2ccf45c2011-08-19 23:35:50549IPC_MESSAGE_ROUTED4(ChromeViewHostMsg_PageTranslated,
[email protected]d5a04832011-03-12 21:46:26550 int, /* page id */
551 std::string /* the original language */,
552 std::string /* the translated language */,
553 TranslateErrors::Type /* the error type if available */)
554
[email protected]16e923d2011-04-30 00:41:44555// Message sent from the renderer to the browser to notify it of events which
556// may lead to the cancellation of a prerender. The message is sent only when
557// the renderer is prerendering.
[email protected]2ccf45c2011-08-19 23:35:50558IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_MaybeCancelPrerenderForHTML5Media)
[email protected]16e923d2011-04-30 00:41:44559
[email protected]4c94b8c2011-05-17 16:17:45560// Message sent from the renderer to the browser to notify it of a
561// window.print() call which should cancel the prerender. The message is sent
562// only when the renderer is prerendering.
[email protected]2ccf45c2011-08-19 23:35:50563IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_CancelPrerenderForPrinting)
[email protected]4c94b8c2011-05-17 16:17:45564
[email protected]ab2eb9f2011-05-03 23:02:37565// Sent by the renderer to check if a URL has permission to trigger a clipboard
566// read/write operation from the DOM.
[email protected]2ccf45c2011-08-19 23:35:50567IPC_SYNC_MESSAGE_ROUTED1_1(ChromeViewHostMsg_CanTriggerClipboardRead,
[email protected]34eec7ffe32011-11-02 23:49:02568 GURL /* origin */,
[email protected]ab2eb9f2011-05-03 23:02:37569 bool /* allowed */)
[email protected]2ccf45c2011-08-19 23:35:50570IPC_SYNC_MESSAGE_ROUTED1_1(ChromeViewHostMsg_CanTriggerClipboardWrite,
[email protected]34eec7ffe32011-11-02 23:49:02571 GURL /* origin */,
[email protected]ab2eb9f2011-05-03 23:02:37572 bool /* allowed */)
573
[email protected]68cafdb2011-06-10 21:42:18574// Sent when the renderer was prevented from displaying insecure content in
575// a secure page by a security policy. The page may appear incomplete.
[email protected]2ccf45c2011-08-19 23:35:50576IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_DidBlockDisplayingInsecureContent)
[email protected]68cafdb2011-06-10 21:42:18577
578// Sent when the renderer was prevented from running insecure content in
579// a secure origin by a security policy. The page may appear incomplete.
[email protected]2ccf45c2011-08-19 23:35:50580IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_DidBlockRunningInsecureContent)
[email protected]68cafdb2011-06-10 21:42:18581
[email protected]2d0f2e92011-10-03 09:02:24582// Message sent from renderer to the browser when the element that is focused
583// and currently accepts keyboard input inside the webpage has been touched.
584IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_FocusedEditableNodeTouched)
585
[email protected]d5a04832011-03-12 21:46:26586// Suggest results -----------------------------------------------------------
587
[email protected]2ccf45c2011-08-19 23:35:50588IPC_MESSAGE_ROUTED3(ChromeViewHostMsg_SetSuggestions,
[email protected]d5a04832011-03-12 21:46:26589 int32 /* page_id */,
590 std::vector<std::string> /* suggestions */,
591 InstantCompleteBehavior)
592
[email protected]2ccf45c2011-08-19 23:35:50593IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_InstantSupportDetermined,
[email protected]d5a04832011-03-12 21:46:26594 int32 /* page_id */,
595 bool /* result */)
596
[email protected]21d898342011-08-23 18:14:41597// The currently displayed PDF has an unsupported feature.
598IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_PDFHasUnsupportedFeature)
[email protected]d5a04832011-03-12 21:46:26599
[email protected]83af80b22011-09-06 18:49:19600// This message indicates the error appeared in the frame.
601IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_FrameLoadingError,
602 int /* error */)
603
[email protected]ebce9522011-10-27 19:17:17604// This message indicates the monitored frame loading had completed.
605IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_FrameLoadingCompleted)
606
[email protected]6a3eede2011-08-29 23:48:05607// The following messages are used to set and get cookies for ChromeFrame
608// processes.
609// Used to set a cookie. The cookie is set asynchronously, but will be
610// available to a subsequent ChromeViewHostMsg_GetCookies request.
611IPC_MESSAGE_ROUTED3(ChromeViewHostMsg_SetCookie,
612 GURL /* url */,
613 GURL /* first_party_for_cookies */,
614 std::string /* cookie */)
615
616// Used to get cookies for the given URL. This may block waiting for a
617// previous SetCookie message to be processed.
618IPC_SYNC_MESSAGE_ROUTED2_1(ChromeViewHostMsg_GetCookies,
619 GURL /* url */,
620 GURL /* first_party_for_cookies */,
621 std::string /* cookies */)
[email protected]a1127f82011-09-08 17:27:01622
623// Provide the browser process with current renderer framerate.
624IPC_MESSAGE_CONTROL2(ChromeViewHostMsg_FPS,
625 int /* routing id */,
626 float /* frames per second */)