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

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

Issue 12386019: Instant: Use only one hidden WebContents per profile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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
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
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_top_offset)
209 IPC_STRUCT_TRAITS_MEMBER(image_tiling)
210 IPC_STRUCT_TRAITS_MEMBER(image_height)
211 IPC_STRUCT_TRAITS_END()
212
213 IPC_STRUCT_TRAITS_BEGIN(WebKit::WebCache::ResourceTypeStat) 163 IPC_STRUCT_TRAITS_BEGIN(WebKit::WebCache::ResourceTypeStat)
214 IPC_STRUCT_TRAITS_MEMBER(count) 164 IPC_STRUCT_TRAITS_MEMBER(count)
215 IPC_STRUCT_TRAITS_MEMBER(size) 165 IPC_STRUCT_TRAITS_MEMBER(size)
216 IPC_STRUCT_TRAITS_MEMBER(liveSize) 166 IPC_STRUCT_TRAITS_MEMBER(liveSize)
217 IPC_STRUCT_TRAITS_MEMBER(decodedSize) 167 IPC_STRUCT_TRAITS_MEMBER(decodedSize)
218 IPC_STRUCT_TRAITS_END() 168 IPC_STRUCT_TRAITS_END()
219 169
220 IPC_STRUCT_TRAITS_BEGIN(WebKit::WebCache::ResourceTypeStats) 170 IPC_STRUCT_TRAITS_BEGIN(WebKit::WebCache::ResourceTypeStats)
221 IPC_STRUCT_TRAITS_MEMBER(images) 171 IPC_STRUCT_TRAITS_MEMBER(images)
222 IPC_STRUCT_TRAITS_MEMBER(cssStyleSheets) 172 IPC_STRUCT_TRAITS_MEMBER(cssStyleSheets)
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 236
287 // Asks the renderer to send back V8 heap stats. 237 // Asks the renderer to send back V8 heap stats.
288 IPC_MESSAGE_CONTROL0(ChromeViewMsg_GetV8HeapStats) 238 IPC_MESSAGE_CONTROL0(ChromeViewMsg_GetV8HeapStats)
289 239
290 // Posts a message to the renderer. 240 // Posts a message to the renderer.
291 IPC_MESSAGE_ROUTED3(ChromeViewMsg_HandleMessageFromExternalHost, 241 IPC_MESSAGE_ROUTED3(ChromeViewMsg_HandleMessageFromExternalHost,
292 std::string /* The message */, 242 std::string /* The message */,
293 std::string /* The origin */, 243 std::string /* The origin */,
294 std::string /* The target*/) 244 std::string /* The target*/)
295 245
296 IPC_MESSAGE_ROUTED4(ChromeViewMsg_SearchBoxChange,
297 string16 /* value */,
298 bool /* verbatim */,
299 size_t /* selection_start */,
300 size_t /* selection_end */)
301
302 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxSubmit,
303 string16 /* value */)
304
305 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxCancel,
306 string16 /* value */)
307
308 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxPopupResize,
309 gfx::Rect /* bounds */)
310
311 IPC_MESSAGE_ROUTED2(ChromeViewMsg_SearchBoxMarginChange,
312 int /* start */,
313 int /* end */)
314
315 IPC_MESSAGE_ROUTED0(ChromeViewMsg_DetermineIfPageSupportsInstant)
316
317 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxAutocompleteResults,
318 std::vector<InstantAutocompleteResult>
319 /* native_suggestions */)
320
321 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxUpOrDownKeyPressed,
322 int /* count */)
323
324 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxCancelSelection,
325 string16 /* value */)
326
327 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxModeChanged,
328 chrome::search::Mode /* mode */)
329
330 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxSetDisplayInstantResults,
331 bool /* display_instant_results */)
332
333 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxThemeChanged,
334 ThemeBackgroundInfo /* value */)
335
336 IPC_MESSAGE_ROUTED2(ChromeViewMsg_SearchBoxFontInformation,
337 string16 /* omnibox_font */,
338 size_t /* omnibox_font_size */)
339
340 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxKeyCaptureChanged,
341 bool /* is_key_capture_enabled */)
342
343 IPC_MESSAGE_ROUTED1(ChromeViewMsg_InstantMostVisitedItemsChanged,
344 std::vector<MostVisitedItem> /* items */)
345
346 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_InstantDeleteMostVisitedItem,
347 GURL /* url */)
348
349 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_InstantUndoMostVisitedDeletion,
350 GURL /* url */)
351
352 IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_InstantUndoAllMostVisitedDeletions)
353
354 // 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
355 // window is showing. 247 // window is showing.
356 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetVisuallyDeemphasized, 248 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetVisuallyDeemphasized,
357 bool /* deemphazied */) 249 bool /* deemphazied */)
358 250
359 // 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
360 // another. 252 // another.
361 IPC_MESSAGE_ROUTED4(ChromeViewMsg_TranslatePage, 253 IPC_MESSAGE_ROUTED4(ChromeViewMsg_TranslatePage,
362 int /* page id */, 254 int /* page id */,
363 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
659 // Sent when the renderer was prevented from running insecure content in 551 // Sent when the renderer was prevented from running insecure content in
660 // 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.
661 IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_DidBlockRunningInsecureContent) 553 IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_DidBlockRunningInsecureContent)
662 554
663 // 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
664 // 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
665 // node is editable. 557 // node is editable.
666 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_FocusedNodeTouched, 558 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_FocusedNodeTouched,
667 bool /* editable */) 559 bool /* editable */)
668 560
669 // Suggest results -----------------------------------------------------------
670
671 // Sent by Instant to populate the omnibox with query suggestions.
672 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_SetSuggestions,
673 int /* page_id */,
674 std::vector<InstantSuggestion> /* suggestions */)
675
676 // Sent by Instant to indicate whether the page supports the Instant API
677 // (http://dev.chromium.org/searchbox).
678 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_InstantSupportDetermined,
679 int /* page_id */,
680 bool /* result */)
681
682 IPC_MESSAGE_ROUTED4(ChromeViewHostMsg_SearchBoxNavigate,
683 int /* page_id */,
684 GURL /* destination */,
685 content::PageTransition /* transition */,
686 WindowOpenDisposition /* disposition */)
687
688 // Sent by the Instant overlay asking to show itself with the given height.
689 IPC_MESSAGE_ROUTED4(ChromeViewHostMsg_ShowInstantOverlay,
690 int /* page_id */,
691 InstantShownReason /* reason */,
692 int /* height */,
693 InstantSizeUnits /* units */)
694
695 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_StartCapturingKeyStrokes,
696 int /* page_id */)
697
698 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_StopCapturingKeyStrokes,
699 int /* page_id */)
700
701 // The currently displayed PDF has an unsupported feature. 561 // The currently displayed PDF has an unsupported feature.
702 IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_PDFHasUnsupportedFeature) 562 IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_PDFHasUnsupportedFeature)
703 563
704 // This message indicates the error appeared in the frame. 564 // This message indicates the error appeared in the frame.
705 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_FrameLoadingError, 565 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_FrameLoadingError,
706 int /* error */) 566 int /* error */)
707 567
708 // This message indicates the monitored frame loading had completed. 568 // This message indicates the monitored frame loading had completed.
709 IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_FrameLoadingCompleted) 569 IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_FrameLoadingCompleted)
710 570
(...skipping 10 matching lines...) Expand all
721 // previous SetCookie message to be processed. 581 // previous SetCookie message to be processed.
722 IPC_SYNC_MESSAGE_ROUTED2_1(ChromeViewHostMsg_GetCookies, 582 IPC_SYNC_MESSAGE_ROUTED2_1(ChromeViewHostMsg_GetCookies,
723 GURL /* url */, 583 GURL /* url */,
724 GURL /* first_party_for_cookies */, 584 GURL /* first_party_for_cookies */,
725 std::string /* cookies */) 585 std::string /* cookies */)
726 586
727 // Provide the browser process with current renderer framerate. 587 // Provide the browser process with current renderer framerate.
728 IPC_MESSAGE_CONTROL2(ChromeViewHostMsg_FPS, 588 IPC_MESSAGE_CONTROL2(ChromeViewHostMsg_FPS,
729 int /* routing id */, 589 int /* routing id */,
730 float /* frames per second */) 590 float /* frames per second */)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698