OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 // Multiply-included file, no traditional include guard. | 5 // Multiply-included file, no traditional include guard. |
6 #include <map> | 6 #include <map> |
7 #include <set> | 7 #include <set> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/files/file_path.h" | 12 #include "base/files/file_path.h" |
13 #include "base/process.h" | 13 #include "base/process.h" |
14 #include "base/shared_memory.h" | 14 #include "base/shared_memory.h" |
15 #include "base/string16.h" | 15 #include "base/string16.h" |
16 #include "base/stringprintf.h" | 16 #include "base/stringprintf.h" |
17 #include "base/values.h" | 17 #include "base/values.h" |
18 #include "build/build_config.h" | 18 #include "build/build_config.h" |
19 #include "chrome/common/common_param_traits.h" | 19 #include "chrome/common/common_param_traits.h" |
20 #include "chrome/common/content_settings.h" | 20 #include "chrome/common/content_settings.h" |
21 #include "chrome/common/content_settings_pattern.h" | 21 #include "chrome/common/content_settings_pattern.h" |
22 #include "chrome/common/instant_types.h" | |
23 #include "chrome/common/nacl_types.h" | 22 #include "chrome/common/nacl_types.h" |
24 #include "chrome/common/search_provider.h" | 23 #include "chrome/common/search_provider.h" |
25 #include "chrome/common/search_types.h" | |
26 #include "chrome/common/translate_errors.h" | 24 #include "chrome/common/translate_errors.h" |
27 #include "content/public/common/common_param_traits.h" | 25 #include "content/public/common/common_param_traits.h" |
28 #include "ipc/ipc_channel_handle.h" | 26 #include "ipc/ipc_channel_handle.h" |
29 #include "ipc/ipc_message_macros.h" | 27 #include "ipc/ipc_message_macros.h" |
30 #include "ipc/ipc_platform_file.h" | 28 #include "ipc/ipc_platform_file.h" |
31 #include "third_party/skia/include/core/SkBitmap.h" | 29 #include "third_party/skia/include/core/SkBitmap.h" |
32 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCache.h" | 30 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCache.h" |
33 #include "third_party/WebKit/Source/WebKit/chromium/public/WebConsoleMessage.h" | 31 #include "third_party/WebKit/Source/WebKit/chromium/public/WebConsoleMessage.h" |
34 #include "ui/base/window_open_disposition.h" | |
35 #include "ui/gfx/rect.h" | |
36 | 32 |
37 // Singly-included section for enums and custom IPC traits. | 33 // Singly-included section for enums and custom IPC traits. |
38 #ifndef CHROME_COMMON_RENDER_MESSAGES_H_ | 34 #ifndef CHROME_COMMON_RENDER_MESSAGES_H_ |
39 #define CHROME_COMMON_RENDER_MESSAGES_H_ | 35 #define CHROME_COMMON_RENDER_MESSAGES_H_ |
40 | 36 |
41 class SkBitmap; | 37 class SkBitmap; |
42 | 38 |
43 // Command values for the cmd parameter of the | 39 // Command values for the cmd parameter of the |
44 // ViewHost_JavaScriptStressTestControl message. For each command the parameter | 40 // ViewHost_JavaScriptStressTestControl message. For each command the parameter |
45 // passed has a different meaning: | 41 // passed has a different meaning: |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 static void Log(const param_type& p, std::string* l); | 104 static void Log(const param_type& p, std::string* l); |
109 }; | 105 }; |
110 | 106 |
111 } // namespace IPC | 107 } // namespace IPC |
112 | 108 |
113 #endif // CHROME_COMMON_RENDER_MESSAGES_H_ | 109 #endif // CHROME_COMMON_RENDER_MESSAGES_H_ |
114 | 110 |
115 #define IPC_MESSAGE_START ChromeMsgStart | 111 #define IPC_MESSAGE_START ChromeMsgStart |
116 | 112 |
117 IPC_ENUM_TRAITS(ChromeViewHostMsg_GetPluginInfo_Status::Value) | 113 IPC_ENUM_TRAITS(ChromeViewHostMsg_GetPluginInfo_Status::Value) |
118 IPC_ENUM_TRAITS(InstantCompleteBehavior) | |
119 IPC_ENUM_TRAITS(InstantSizeUnits) | |
120 IPC_ENUM_TRAITS(InstantSuggestionType) | |
121 IPC_ENUM_TRAITS(InstantShownReason) | |
122 IPC_ENUM_TRAITS(search_provider::OSDDType) | 114 IPC_ENUM_TRAITS(search_provider::OSDDType) |
123 IPC_ENUM_TRAITS(search_provider::InstallState) | 115 IPC_ENUM_TRAITS(search_provider::InstallState) |
124 IPC_ENUM_TRAITS(ThemeBackgroundImageAlignment) | |
125 IPC_ENUM_TRAITS(ThemeBackgroundImageTiling) | |
126 IPC_ENUM_TRAITS(TranslateErrors::Type) | 116 IPC_ENUM_TRAITS(TranslateErrors::Type) |
127 IPC_ENUM_TRAITS(WebKit::WebConsoleMessage::Level) | 117 IPC_ENUM_TRAITS(WebKit::WebConsoleMessage::Level) |
128 | 118 |
129 IPC_STRUCT_TRAITS_BEGIN(ChromeViewHostMsg_GetPluginInfo_Status) | 119 IPC_STRUCT_TRAITS_BEGIN(ChromeViewHostMsg_GetPluginInfo_Status) |
130 IPC_STRUCT_TRAITS_MEMBER(value) | 120 IPC_STRUCT_TRAITS_MEMBER(value) |
131 IPC_STRUCT_TRAITS_END() | 121 IPC_STRUCT_TRAITS_END() |
132 | 122 |
133 // Output parameters for ChromeViewHostMsg_GetPluginInfo message. | 123 // Output parameters for ChromeViewHostMsg_GetPluginInfo message. |
134 IPC_STRUCT_BEGIN(ChromeViewHostMsg_GetPluginInfo_Output) | 124 IPC_STRUCT_BEGIN(ChromeViewHostMsg_GetPluginInfo_Output) |
135 IPC_STRUCT_MEMBER(ChromeViewHostMsg_GetPluginInfo_Status, status) | 125 IPC_STRUCT_MEMBER(ChromeViewHostMsg_GetPluginInfo_Status, status) |
(...skipping 15 matching lines...) Expand all Loading... |
151 IPC_STRUCT_TRAITS_END() | 141 IPC_STRUCT_TRAITS_END() |
152 | 142 |
153 IPC_STRUCT_TRAITS_BEGIN(ContentSettingPatternSource) | 143 IPC_STRUCT_TRAITS_BEGIN(ContentSettingPatternSource) |
154 IPC_STRUCT_TRAITS_MEMBER(primary_pattern) | 144 IPC_STRUCT_TRAITS_MEMBER(primary_pattern) |
155 IPC_STRUCT_TRAITS_MEMBER(secondary_pattern) | 145 IPC_STRUCT_TRAITS_MEMBER(secondary_pattern) |
156 IPC_STRUCT_TRAITS_MEMBER(setting) | 146 IPC_STRUCT_TRAITS_MEMBER(setting) |
157 IPC_STRUCT_TRAITS_MEMBER(source) | 147 IPC_STRUCT_TRAITS_MEMBER(source) |
158 IPC_STRUCT_TRAITS_MEMBER(incognito) | 148 IPC_STRUCT_TRAITS_MEMBER(incognito) |
159 IPC_STRUCT_TRAITS_END() | 149 IPC_STRUCT_TRAITS_END() |
160 | 150 |
161 IPC_STRUCT_TRAITS_BEGIN(InstantAutocompleteResult) | |
162 IPC_STRUCT_TRAITS_MEMBER(provider) | |
163 IPC_STRUCT_TRAITS_MEMBER(type) | |
164 IPC_STRUCT_TRAITS_MEMBER(description) | |
165 IPC_STRUCT_TRAITS_MEMBER(destination_url) | |
166 IPC_STRUCT_TRAITS_MEMBER(transition) | |
167 IPC_STRUCT_TRAITS_MEMBER(relevance) | |
168 IPC_STRUCT_TRAITS_END() | |
169 | |
170 IPC_STRUCT_TRAITS_BEGIN(MostVisitedItem) | |
171 IPC_STRUCT_TRAITS_MEMBER(url) | |
172 IPC_STRUCT_TRAITS_MEMBER(title) | |
173 IPC_STRUCT_TRAITS_END() | |
174 | |
175 IPC_STRUCT_TRAITS_BEGIN(InstantSuggestion) | |
176 IPC_STRUCT_TRAITS_MEMBER(text) | |
177 IPC_STRUCT_TRAITS_MEMBER(behavior) | |
178 IPC_STRUCT_TRAITS_MEMBER(type) | |
179 IPC_STRUCT_TRAITS_END() | |
180 | |
181 IPC_ENUM_TRAITS(chrome::search::Mode::Type) | |
182 IPC_ENUM_TRAITS(chrome::search::Mode::Origin) | |
183 IPC_STRUCT_TRAITS_BEGIN(chrome::search::Mode) | |
184 IPC_STRUCT_TRAITS_MEMBER(mode) | |
185 IPC_STRUCT_TRAITS_MEMBER(origin) | |
186 IPC_STRUCT_TRAITS_END() | |
187 | |
188 IPC_STRUCT_TRAITS_BEGIN(nacl::NaClLaunchParams) | 151 IPC_STRUCT_TRAITS_BEGIN(nacl::NaClLaunchParams) |
189 IPC_STRUCT_TRAITS_MEMBER(manifest_url) | 152 IPC_STRUCT_TRAITS_MEMBER(manifest_url) |
190 IPC_STRUCT_TRAITS_MEMBER(render_view_id) | 153 IPC_STRUCT_TRAITS_MEMBER(render_view_id) |
191 IPC_STRUCT_TRAITS_MEMBER(permission_bits) | 154 IPC_STRUCT_TRAITS_MEMBER(permission_bits) |
192 IPC_STRUCT_TRAITS_MEMBER(uses_irt) | 155 IPC_STRUCT_TRAITS_MEMBER(uses_irt) |
193 IPC_STRUCT_TRAITS_END() | 156 IPC_STRUCT_TRAITS_END() |
194 | 157 |
195 IPC_STRUCT_TRAITS_BEGIN(RendererContentSettingRules) | 158 IPC_STRUCT_TRAITS_BEGIN(RendererContentSettingRules) |
196 IPC_STRUCT_TRAITS_MEMBER(image_rules) | 159 IPC_STRUCT_TRAITS_MEMBER(image_rules) |
197 IPC_STRUCT_TRAITS_MEMBER(script_rules) | 160 IPC_STRUCT_TRAITS_MEMBER(script_rules) |
198 IPC_STRUCT_TRAITS_END() | 161 IPC_STRUCT_TRAITS_END() |
199 | 162 |
200 IPC_STRUCT_TRAITS_BEGIN(ThemeBackgroundInfo) | |
201 IPC_STRUCT_TRAITS_MEMBER(color_r) | |
202 IPC_STRUCT_TRAITS_MEMBER(color_g) | |
203 IPC_STRUCT_TRAITS_MEMBER(color_b) | |
204 IPC_STRUCT_TRAITS_MEMBER(color_a) | |
205 IPC_STRUCT_TRAITS_MEMBER(theme_id) | |
206 IPC_STRUCT_TRAITS_MEMBER(image_horizontal_alignment) | |
207 IPC_STRUCT_TRAITS_MEMBER(image_vertical_alignment) | |
208 IPC_STRUCT_TRAITS_MEMBER(image_tiling) | |
209 IPC_STRUCT_TRAITS_MEMBER(image_height) | |
210 IPC_STRUCT_TRAITS_END() | |
211 | |
212 IPC_STRUCT_TRAITS_BEGIN(WebKit::WebCache::ResourceTypeStat) | 163 IPC_STRUCT_TRAITS_BEGIN(WebKit::WebCache::ResourceTypeStat) |
213 IPC_STRUCT_TRAITS_MEMBER(count) | 164 IPC_STRUCT_TRAITS_MEMBER(count) |
214 IPC_STRUCT_TRAITS_MEMBER(size) | 165 IPC_STRUCT_TRAITS_MEMBER(size) |
215 IPC_STRUCT_TRAITS_MEMBER(liveSize) | 166 IPC_STRUCT_TRAITS_MEMBER(liveSize) |
216 IPC_STRUCT_TRAITS_MEMBER(decodedSize) | 167 IPC_STRUCT_TRAITS_MEMBER(decodedSize) |
217 IPC_STRUCT_TRAITS_END() | 168 IPC_STRUCT_TRAITS_END() |
218 | 169 |
219 IPC_STRUCT_TRAITS_BEGIN(WebKit::WebCache::ResourceTypeStats) | 170 IPC_STRUCT_TRAITS_BEGIN(WebKit::WebCache::ResourceTypeStats) |
220 IPC_STRUCT_TRAITS_MEMBER(images) | 171 IPC_STRUCT_TRAITS_MEMBER(images) |
221 IPC_STRUCT_TRAITS_MEMBER(cssStyleSheets) | 172 IPC_STRUCT_TRAITS_MEMBER(cssStyleSheets) |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
285 | 236 |
286 // Asks the renderer to send back V8 heap stats. | 237 // Asks the renderer to send back V8 heap stats. |
287 IPC_MESSAGE_CONTROL0(ChromeViewMsg_GetV8HeapStats) | 238 IPC_MESSAGE_CONTROL0(ChromeViewMsg_GetV8HeapStats) |
288 | 239 |
289 // Posts a message to the renderer. | 240 // Posts a message to the renderer. |
290 IPC_MESSAGE_ROUTED3(ChromeViewMsg_HandleMessageFromExternalHost, | 241 IPC_MESSAGE_ROUTED3(ChromeViewMsg_HandleMessageFromExternalHost, |
291 std::string /* The message */, | 242 std::string /* The message */, |
292 std::string /* The origin */, | 243 std::string /* The origin */, |
293 std::string /* The target*/) | 244 std::string /* The target*/) |
294 | 245 |
295 IPC_MESSAGE_ROUTED4(ChromeViewMsg_SearchBoxChange, | |
296 string16 /* value */, | |
297 bool /* verbatim */, | |
298 size_t /* selection_start */, | |
299 size_t /* selection_end */) | |
300 | |
301 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxSubmit, | |
302 string16 /* value */) | |
303 | |
304 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxCancel, | |
305 string16 /* value */) | |
306 | |
307 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxPopupResize, | |
308 gfx::Rect /* bounds */) | |
309 | |
310 IPC_MESSAGE_ROUTED2(ChromeViewMsg_SearchBoxMarginChange, | |
311 int /* start */, | |
312 int /* end */) | |
313 | |
314 IPC_MESSAGE_ROUTED0(ChromeViewMsg_DetermineIfPageSupportsInstant) | |
315 | |
316 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxAutocompleteResults, | |
317 std::vector<InstantAutocompleteResult> | |
318 /* native_suggestions */) | |
319 | |
320 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxUpOrDownKeyPressed, | |
321 int /* count */) | |
322 | |
323 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxCancelSelection, | |
324 string16 /* value */) | |
325 | |
326 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxModeChanged, | |
327 chrome::search::Mode /* mode */) | |
328 | |
329 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxSetDisplayInstantResults, | |
330 bool /* display_instant_results */) | |
331 | |
332 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxThemeChanged, | |
333 ThemeBackgroundInfo /* value */) | |
334 | |
335 IPC_MESSAGE_ROUTED2(ChromeViewMsg_SearchBoxFontInformation, | |
336 string16 /* omnibox_font */, | |
337 size_t /* omnibox_font_size */) | |
338 | |
339 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxKeyCaptureChanged, | |
340 bool /* is_key_capture_enabled */) | |
341 | |
342 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxGrantChromeSearchAccessFromOrigin, | |
343 GURL /* origin_url */) | |
344 | |
345 IPC_MESSAGE_ROUTED1(ChromeViewMsg_InstantMostVisitedItemsChanged, | |
346 std::vector<MostVisitedItem> /* items */) | |
347 | |
348 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_InstantDeleteMostVisitedItem, | |
349 GURL /* url */) | |
350 | |
351 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_InstantUndoMostVisitedDeletion, | |
352 GURL /* url */) | |
353 | |
354 IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_InstantUndoAllMostVisitedDeletions) | |
355 | |
356 // Toggles visual muting of the render view area. This is on when a constrained | 246 // Toggles visual muting of the render view area. This is on when a constrained |
357 // window is showing. | 247 // window is showing. |
358 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetVisuallyDeemphasized, | 248 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetVisuallyDeemphasized, |
359 bool /* deemphazied */) | 249 bool /* deemphazied */) |
360 | 250 |
361 // Tells the renderer to translate the page contents from one language to | 251 // Tells the renderer to translate the page contents from one language to |
362 // another. | 252 // another. |
363 IPC_MESSAGE_ROUTED4(ChromeViewMsg_TranslatePage, | 253 IPC_MESSAGE_ROUTED4(ChromeViewMsg_TranslatePage, |
364 int /* page id */, | 254 int /* page id */, |
365 std::string, /* the script injected in the page */ | 255 std::string, /* the script injected in the page */ |
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
661 // Sent when the renderer was prevented from running insecure content in | 551 // Sent when the renderer was prevented from running insecure content in |
662 // a secure origin by a security policy. The page may appear incomplete. | 552 // a secure origin by a security policy. The page may appear incomplete. |
663 IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_DidBlockRunningInsecureContent) | 553 IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_DidBlockRunningInsecureContent) |
664 | 554 |
665 // Message sent from renderer to the browser when the element that is focused | 555 // Message sent from renderer to the browser when the element that is focused |
666 // has been touched. A bool is passed in this message which indicates if the | 556 // has been touched. A bool is passed in this message which indicates if the |
667 // node is editable. | 557 // node is editable. |
668 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_FocusedNodeTouched, | 558 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_FocusedNodeTouched, |
669 bool /* editable */) | 559 bool /* editable */) |
670 | 560 |
671 // Suggest results ----------------------------------------------------------- | |
672 | |
673 // Sent by Instant to populate the omnibox with query suggestions. | |
674 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_SetSuggestions, | |
675 int /* page_id */, | |
676 std::vector<InstantSuggestion> /* suggestions */) | |
677 | |
678 // Sent by Instant to indicate whether the page supports the Instant API | |
679 // (http://dev.chromium.org/searchbox). | |
680 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_InstantSupportDetermined, | |
681 int /* page_id */, | |
682 bool /* result */) | |
683 | |
684 IPC_MESSAGE_ROUTED4(ChromeViewHostMsg_SearchBoxNavigate, | |
685 int /* page_id */, | |
686 GURL /* destination */, | |
687 content::PageTransition /* transition */, | |
688 WindowOpenDisposition /* disposition */) | |
689 | |
690 // Sent by the Instant overlay asking to show itself with the given height. | |
691 IPC_MESSAGE_ROUTED4(ChromeViewHostMsg_ShowInstantOverlay, | |
692 int /* page_id */, | |
693 InstantShownReason /* reason */, | |
694 int /* height */, | |
695 InstantSizeUnits /* units */) | |
696 | |
697 // Sent by Instant to focus the omnibox. | |
698 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_FocusOmnibox, | |
699 int /* page_id */) | |
700 | |
701 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_StartCapturingKeyStrokes, | |
702 int /* page_id */) | |
703 | |
704 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_StopCapturingKeyStrokes, | |
705 int /* page_id */) | |
706 | |
707 // The currently displayed PDF has an unsupported feature. | 561 // The currently displayed PDF has an unsupported feature. |
708 IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_PDFHasUnsupportedFeature) | 562 IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_PDFHasUnsupportedFeature) |
709 | 563 |
710 // This message indicates the error appeared in the frame. | 564 // This message indicates the error appeared in the frame. |
711 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_FrameLoadingError, | 565 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_FrameLoadingError, |
712 int /* error */) | 566 int /* error */) |
713 | 567 |
714 // This message indicates the monitored frame loading had completed. | 568 // This message indicates the monitored frame loading had completed. |
715 IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_FrameLoadingCompleted) | 569 IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_FrameLoadingCompleted) |
716 | 570 |
(...skipping 10 matching lines...) Expand all Loading... |
727 // previous SetCookie message to be processed. | 581 // previous SetCookie message to be processed. |
728 IPC_SYNC_MESSAGE_ROUTED2_1(ChromeViewHostMsg_GetCookies, | 582 IPC_SYNC_MESSAGE_ROUTED2_1(ChromeViewHostMsg_GetCookies, |
729 GURL /* url */, | 583 GURL /* url */, |
730 GURL /* first_party_for_cookies */, | 584 GURL /* first_party_for_cookies */, |
731 std::string /* cookies */) | 585 std::string /* cookies */) |
732 | 586 |
733 // Provide the browser process with current renderer framerate. | 587 // Provide the browser process with current renderer framerate. |
734 IPC_MESSAGE_CONTROL2(ChromeViewHostMsg_FPS, | 588 IPC_MESSAGE_CONTROL2(ChromeViewHostMsg_FPS, |
735 int /* routing id */, | 589 int /* routing id */, |
736 float /* frames per second */) | 590 float /* frames per second */) |
OLD | NEW |