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

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

Issue 363563004: Move extensions-only render IPC messages into the extension messages header. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix tests Created 6 years, 5 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 <stdint.h> 6 #include <stdint.h>
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/files/file_path.h" 12 #include "base/files/file_path.h"
13 #include "base/memory/shared_memory.h" 13 #include "base/memory/shared_memory.h"
14 #include "base/process/process.h" 14 #include "base/process/process.h"
15 #include "base/strings/string16.h" 15 #include "base/strings/string16.h"
16 #include "base/strings/stringprintf.h" 16 #include "base/strings/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" 22 #include "chrome/common/instant_types.h"
23 #include "chrome/common/ntp_logging_events.h" 23 #include "chrome/common/ntp_logging_events.h"
24 #include "chrome/common/omnibox_focus_state.h" 24 #include "chrome/common/omnibox_focus_state.h"
25 #include "chrome/common/search_provider.h" 25 #include "chrome/common/search_provider.h"
26 #include "components/nacl/common/nacl_types.h" 26 #include "components/nacl/common/nacl_types.h"
27 #include "content/public/common/common_param_traits.h" 27 #include "content/public/common/common_param_traits.h"
28 #include "content/public/common/referrer.h" 28 #include "content/public/common/referrer.h"
29 #include "content/public/common/top_controls_state.h" 29 #include "content/public/common/top_controls_state.h"
30 #include "extensions/common/stack_frame.h"
31 #include "ipc/ipc_channel_handle.h" 30 #include "ipc/ipc_channel_handle.h"
32 #include "ipc/ipc_message_macros.h" 31 #include "ipc/ipc_message_macros.h"
33 #include "ipc/ipc_platform_file.h" 32 #include "ipc/ipc_platform_file.h"
34 #include "third_party/WebKit/public/web/WebCache.h" 33 #include "third_party/WebKit/public/web/WebCache.h"
35 #include "third_party/WebKit/public/web/WebConsoleMessage.h" 34 #include "third_party/WebKit/public/web/WebConsoleMessage.h"
36 #include "third_party/skia/include/core/SkBitmap.h" 35 #include "third_party/skia/include/core/SkBitmap.h"
37 #include "ui/base/window_open_disposition.h" 36 #include "ui/base/window_open_disposition.h"
38 #include "ui/gfx/ipc/gfx_param_traits.h" 37 #include "ui/gfx/ipc/gfx_param_traits.h"
39 #include "ui/gfx/rect.h" 38 #include "ui/gfx/rect.h"
40 39
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 IPC_STRUCT_TRAITS_END() 176 IPC_STRUCT_TRAITS_END()
178 177
179 IPC_STRUCT_TRAITS_BEGIN(blink::WebCache::UsageStats) 178 IPC_STRUCT_TRAITS_BEGIN(blink::WebCache::UsageStats)
180 IPC_STRUCT_TRAITS_MEMBER(minDeadCapacity) 179 IPC_STRUCT_TRAITS_MEMBER(minDeadCapacity)
181 IPC_STRUCT_TRAITS_MEMBER(maxDeadCapacity) 180 IPC_STRUCT_TRAITS_MEMBER(maxDeadCapacity)
182 IPC_STRUCT_TRAITS_MEMBER(capacity) 181 IPC_STRUCT_TRAITS_MEMBER(capacity)
183 IPC_STRUCT_TRAITS_MEMBER(liveSize) 182 IPC_STRUCT_TRAITS_MEMBER(liveSize)
184 IPC_STRUCT_TRAITS_MEMBER(deadSize) 183 IPC_STRUCT_TRAITS_MEMBER(deadSize)
185 IPC_STRUCT_TRAITS_END() 184 IPC_STRUCT_TRAITS_END()
186 185
187 IPC_STRUCT_TRAITS_BEGIN(extensions::StackFrame)
188 IPC_STRUCT_TRAITS_MEMBER(line_number)
189 IPC_STRUCT_TRAITS_MEMBER(column_number)
190 IPC_STRUCT_TRAITS_MEMBER(source)
191 IPC_STRUCT_TRAITS_MEMBER(function)
192 IPC_STRUCT_TRAITS_END()
193
194 IPC_ENUM_TRAITS_MAX_VALUE(NTPLoggingEventType, 186 IPC_ENUM_TRAITS_MAX_VALUE(NTPLoggingEventType,
195 NTP_NUM_EVENT_TYPES) 187 NTP_NUM_EVENT_TYPES)
196 188
197 //----------------------------------------------------------------------------- 189 //-----------------------------------------------------------------------------
198 // RenderView messages 190 // RenderView messages
199 // These are messages sent from the browser to the renderer process. 191 // These are messages sent from the browser to the renderer process.
200 192
201 // Tells the renderer to set its maximum cache size to the supplied value. 193 // Tells the renderer to set its maximum cache size to the supplied value.
202 IPC_MESSAGE_CONTROL3(ChromeViewMsg_SetCacheCapacities, 194 IPC_MESSAGE_CONTROL3(ChromeViewMsg_SetCacheCapacities,
203 size_t /* min_dead_capacity */, 195 size_t /* min_dead_capacity */,
204 size_t /* max_dead_capacity */, 196 size_t /* max_dead_capacity */,
205 size_t /* capacity */) 197 size_t /* capacity */)
206 198
207 // Tells the renderer to clear the cache. 199 // Tells the renderer to clear the cache.
208 IPC_MESSAGE_CONTROL1(ChromeViewMsg_ClearCache, 200 IPC_MESSAGE_CONTROL1(ChromeViewMsg_ClearCache,
209 bool /* on_navigation */) 201 bool /* on_navigation */)
210 202
211 #if defined(ENABLE_EXTENSIONS)
212 // Set the top-level frame to the provided name.
213 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetName,
214 std::string /* frame_name */)
215 #endif
216
217 #if !defined(OS_ANDROID) && !defined(OS_IOS) 203 #if !defined(OS_ANDROID) && !defined(OS_IOS)
218 // For WebUI testing, this message requests JavaScript to be executed at a time 204 // For WebUI testing, this message requests JavaScript to be executed at a time
219 // which is late enough to not be thrown out, and early enough to be before 205 // which is late enough to not be thrown out, and early enough to be before
220 // onload events are fired. 206 // onload events are fired.
221 IPC_MESSAGE_ROUTED1(ChromeViewMsg_WebUIJavaScript, 207 IPC_MESSAGE_ROUTED1(ChromeViewMsg_WebUIJavaScript,
222 base::string16 /* javascript */) 208 base::string16 /* javascript */)
223 #endif 209 #endif
224 210
225 // Set the content setting rules stored by the renderer. 211 // Set the content setting rules stored by the renderer.
226 IPC_MESSAGE_CONTROL1(ChromeViewMsg_SetContentSettingRules, 212 IPC_MESSAGE_CONTROL1(ChromeViewMsg_SetContentSettingRules,
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 260
275 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxThemeChanged, 261 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxThemeChanged,
276 ThemeBackgroundInfo /* value */) 262 ThemeBackgroundInfo /* value */)
277 263
278 IPC_MESSAGE_ROUTED2(ChromeViewMsg_ChromeIdentityCheckResult, 264 IPC_MESSAGE_ROUTED2(ChromeViewMsg_ChromeIdentityCheckResult,
279 base::string16 /* identity */, 265 base::string16 /* identity */,
280 bool /* identity_match */) 266 bool /* identity_match */)
281 267
282 IPC_MESSAGE_ROUTED0(ChromeViewMsg_SearchBoxToggleVoiceSearch) 268 IPC_MESSAGE_ROUTED0(ChromeViewMsg_SearchBoxToggleVoiceSearch)
283 269
284 #if defined(ENABLE_EXTENSIONS)
285 // Toggles visual muting of the render view area. This is on when a constrained
286 // window is showing.
287 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetVisuallyDeemphasized,
288 bool /* deemphazied */)
289 #endif
290
291 // Sent on process startup to indicate whether this process is running in 270 // Sent on process startup to indicate whether this process is running in
292 // incognito mode. 271 // incognito mode.
293 IPC_MESSAGE_CONTROL1(ChromeViewMsg_SetIsIncognitoProcess, 272 IPC_MESSAGE_CONTROL1(ChromeViewMsg_SetIsIncognitoProcess,
294 bool /* is_incognito_processs */) 273 bool /* is_incognito_processs */)
295 274
296 // Sent in response to ViewHostMsg_DidBlockDisplayingInsecureContent. 275 // Sent in response to ViewHostMsg_DidBlockDisplayingInsecureContent.
297 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetAllowDisplayingInsecureContent, 276 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetAllowDisplayingInsecureContent,
298 bool /* allowed */) 277 bool /* allowed */)
299 278
300 // Sent in response to ViewHostMsg_DidBlockRunningInsecureContent. 279 // Sent in response to ViewHostMsg_DidBlockRunningInsecureContent.
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 // |additional_param_values| contain the name-value pairs, if any, specified 437 // |additional_param_values| contain the name-value pairs, if any, specified
459 // for the *first* plugin found that is registered for |mime_type|. 438 // for the *first* plugin found that is registered for |mime_type|.
460 IPC_SYNC_MESSAGE_CONTROL1_3( 439 IPC_SYNC_MESSAGE_CONTROL1_3(
461 ChromeViewHostMsg_IsInternalPluginRegisteredForMimeType, 440 ChromeViewHostMsg_IsInternalPluginRegisteredForMimeType,
462 std::string /* mime_type */, 441 std::string /* mime_type */,
463 bool /* registered */, 442 bool /* registered */,
464 std::vector<base::string16> /* additional_param_names */, 443 std::vector<base::string16> /* additional_param_names */,
465 std::vector<base::string16> /* additional_param_values */) 444 std::vector<base::string16> /* additional_param_values */)
466 #endif 445 #endif
467 446
468 #if defined(ENABLE_EXTENSIONS)
469 // Informs the browser of updated frame names.
470 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_UpdateFrameName,
471 bool /* is_top_level */,
472 std::string /* name */)
473 #endif
474
475 #if defined(ENABLE_PLUGIN_INSTALLATION) 447 #if defined(ENABLE_PLUGIN_INSTALLATION)
476 // Tells the browser to search for a plug-in that can handle the given MIME 448 // Tells the browser to search for a plug-in that can handle the given MIME
477 // type. The result will be sent asynchronously to the routing ID 449 // type. The result will be sent asynchronously to the routing ID
478 // |placeholder_id|. 450 // |placeholder_id|.
479 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_FindMissingPlugin, 451 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_FindMissingPlugin,
480 int /* placeholder_id */, 452 int /* placeholder_id */,
481 std::string /* mime_type */) 453 std::string /* mime_type */)
482 454
483 // Notifies the browser that a missing plug-in placeholder has been removed, so 455 // Notifies the browser that a missing plug-in placeholder has been removed, so
484 // the corresponding PluginPlaceholderHost can be deleted. 456 // the corresponding PluginPlaceholderHost can be deleted.
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
569 // Provide the browser process with information about the WebCore resource 541 // Provide the browser process with information about the WebCore resource
570 // cache and current renderer framerate. 542 // cache and current renderer framerate.
571 IPC_MESSAGE_CONTROL1(ChromeViewHostMsg_ResourceTypeStats, 543 IPC_MESSAGE_CONTROL1(ChromeViewHostMsg_ResourceTypeStats,
572 blink::WebCache::ResourceTypeStats) 544 blink::WebCache::ResourceTypeStats)
573 545
574 // Message sent from the renderer to the browser to notify it of a 546 // Message sent from the renderer to the browser to notify it of a
575 // window.print() call which should cancel the prerender. The message is sent 547 // window.print() call which should cancel the prerender. The message is sent
576 // only when the renderer is prerendering. 548 // only when the renderer is prerendering.
577 IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_CancelPrerenderForPrinting) 549 IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_CancelPrerenderForPrinting)
578 550
579 #if defined(ENABLE_EXTENSIONS)
580 // Sent by the renderer to check if a URL has permission to trigger a clipboard
581 // read/write operation from the DOM.
582 IPC_SYNC_MESSAGE_CONTROL1_1(ChromeViewHostMsg_CanTriggerClipboardRead,
583 GURL /* origin */,
584 bool /* allowed */)
585 IPC_SYNC_MESSAGE_CONTROL1_1(ChromeViewHostMsg_CanTriggerClipboardWrite,
586 GURL /* origin */,
587 bool /* allowed */)
588 #endif
589
590 // Sent when the renderer was prevented from displaying insecure content in 551 // Sent when the renderer was prevented from displaying insecure content in
591 // a secure page by a security policy. The page may appear incomplete. 552 // a secure page by a security policy. The page may appear incomplete.
592 IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_DidBlockDisplayingInsecureContent) 553 IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_DidBlockDisplayingInsecureContent)
593 554
594 // Sent when the renderer was prevented from running insecure content in 555 // Sent when the renderer was prevented from running insecure content in
595 // a secure origin by a security policy. The page may appear incomplete. 556 // a secure origin by a security policy. The page may appear incomplete.
596 IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_DidBlockRunningInsecureContent) 557 IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_DidBlockRunningInsecureContent)
597 558
598 #if defined(OS_ANDROID) 559 #if defined(OS_ANDROID)
599 // Contains info about whether the current page can be treated as a webapp. 560 // Contains info about whether the current page can be treated as a webapp.
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
702 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_SetVoiceSearchSupported, 663 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_SetVoiceSearchSupported,
703 int /* page_seq_no */, 664 int /* page_seq_no */,
704 bool /* supported */) 665 bool /* supported */)
705 666
706 // Tells the renderer a list of URLs which should be bounced back to the browser 667 // Tells the renderer a list of URLs which should be bounced back to the browser
707 // process so that they can be assigned to an Instant renderer. 668 // process so that they can be assigned to an Instant renderer.
708 IPC_MESSAGE_CONTROL2(ChromeViewMsg_SetSearchURLs, 669 IPC_MESSAGE_CONTROL2(ChromeViewMsg_SetSearchURLs,
709 std::vector<GURL> /* search_urls */, 670 std::vector<GURL> /* search_urls */,
710 GURL /* new_tab_page_url */) 671 GURL /* new_tab_page_url */)
711 672
712 // TODO(thestig) Eventually separate out all the extensions messages.
713 #if defined(ENABLE_EXTENSIONS)
714 // Tells listeners that a detailed message was reported to the console by
715 // WebKit.
716 IPC_MESSAGE_ROUTED4(ChromeViewHostMsg_DetailedConsoleMessageAdded,
717 base::string16 /* message */,
718 base::string16 /* source */,
719 extensions::StackTrace /* stack trace */,
720 int32 /* severity level */)
721 #endif
722
723 #if defined(ENABLE_PLUGINS) 673 #if defined(ENABLE_PLUGINS)
724 // Sent by the renderer to check if crash reporting is enabled. 674 // Sent by the renderer to check if crash reporting is enabled.
725 IPC_SYNC_MESSAGE_CONTROL0_1(ChromeViewHostMsg_IsCrashReportingEnabled, 675 IPC_SYNC_MESSAGE_CONTROL0_1(ChromeViewHostMsg_IsCrashReportingEnabled,
726 bool /* enabled */) 676 bool /* enabled */)
727 #endif 677 #endif
OLDNEW
« no previous file with comments | « chrome/common/extensions/chrome_extension_messages.h ('k') | chrome/renderer/chrome_render_view_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698