| OLD | NEW |
| 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 <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| 11 #include "base/strings/string16.h" | 11 #include "base/strings/string16.h" |
| 12 #include "base/time/time.h" | 12 #include "base/time/time.h" |
| 13 #include "build/build_config.h" | 13 #include "build/build_config.h" |
| 14 #include "chrome/common/features.h" | 14 #include "chrome/common/features.h" |
| 15 #include "chrome/common/instant_type_traits.h" |
| 15 #include "chrome/common/search/instant_types.h" | 16 #include "chrome/common/search/instant_types.h" |
| 16 #include "chrome/common/search/ntp_logging_events.h" | 17 #include "chrome/common/search/ntp_logging_events.h" |
| 17 #include "chrome/common/web_application_info.h" | 18 #include "chrome/common/web_application_info.h" |
| 18 #include "components/content_settings/core/common/content_settings.h" | 19 #include "components/content_settings/core/common/content_settings.h" |
| 19 #include "components/content_settings/core/common/content_settings_pattern.h" | 20 #include "components/content_settings/core/common/content_settings_pattern.h" |
| 20 #include "components/content_settings/core/common/content_settings_types.h" | 21 #include "components/content_settings/core/common/content_settings_types.h" |
| 21 #include "components/omnibox/common/omnibox_focus_state.h" | 22 #include "components/omnibox/common/omnibox_focus_state.h" |
| 22 #include "content/public/common/top_controls_state.h" | 23 #include "content/public/common/top_controls_state.h" |
| 23 #include "content/public/common/webplugininfo.h" | 24 #include "content/public/common/webplugininfo.h" |
| 24 #include "ipc/ipc_channel_handle.h" | 25 #include "ipc/ipc_channel_handle.h" |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 }; | 68 }; |
| 68 | 69 |
| 69 } // namespace IPC | 70 } // namespace IPC |
| 70 | 71 |
| 71 #endif // CHROME_COMMON_RENDER_MESSAGES_H_ | 72 #endif // CHROME_COMMON_RENDER_MESSAGES_H_ |
| 72 | 73 |
| 73 #define IPC_MESSAGE_START ChromeMsgStart | 74 #define IPC_MESSAGE_START ChromeMsgStart |
| 74 | 75 |
| 75 IPC_ENUM_TRAITS_MAX_VALUE(ChromeViewHostMsg_GetPluginInfo_Status, | 76 IPC_ENUM_TRAITS_MAX_VALUE(ChromeViewHostMsg_GetPluginInfo_Status, |
| 76 ChromeViewHostMsg_GetPluginInfo_Status::kUnauthorized) | 77 ChromeViewHostMsg_GetPluginInfo_Status::kUnauthorized) |
| 77 IPC_ENUM_TRAITS_MAX_VALUE(OmniboxFocusChangeReason, | |
| 78 OMNIBOX_FOCUS_CHANGE_REASON_LAST) | |
| 79 IPC_ENUM_TRAITS_MAX_VALUE(OmniboxFocusState, OMNIBOX_FOCUS_STATE_LAST) | |
| 80 IPC_ENUM_TRAITS_MAX_VALUE(ThemeBackgroundImageAlignment, | 78 IPC_ENUM_TRAITS_MAX_VALUE(ThemeBackgroundImageAlignment, |
| 81 THEME_BKGRND_IMAGE_ALIGN_LAST) | 79 THEME_BKGRND_IMAGE_ALIGN_LAST) |
| 82 IPC_ENUM_TRAITS_MAX_VALUE(ThemeBackgroundImageTiling, THEME_BKGRND_IMAGE_LAST) | 80 IPC_ENUM_TRAITS_MAX_VALUE(ThemeBackgroundImageTiling, THEME_BKGRND_IMAGE_LAST) |
| 83 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebConsoleMessage::Level, | 81 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebConsoleMessage::Level, |
| 84 blink::WebConsoleMessage::LevelLast) | 82 blink::WebConsoleMessage::LevelLast) |
| 85 IPC_ENUM_TRAITS_MAX_VALUE(content::TopControlsState, | 83 IPC_ENUM_TRAITS_MAX_VALUE(content::TopControlsState, |
| 86 content::TOP_CONTROLS_STATE_LAST) | 84 content::TOP_CONTROLS_STATE_LAST) |
| 87 | 85 |
| 88 // Output parameters for ChromeViewHostMsg_GetPluginInfo message. | 86 // Output parameters for ChromeViewHostMsg_GetPluginInfo message. |
| 89 IPC_STRUCT_BEGIN(ChromeViewHostMsg_GetPluginInfo_Output) | 87 IPC_STRUCT_BEGIN(ChromeViewHostMsg_GetPluginInfo_Output) |
| (...skipping 16 matching lines...) Expand all Loading... |
| 106 IPC_STRUCT_TRAITS_END() | 104 IPC_STRUCT_TRAITS_END() |
| 107 | 105 |
| 108 IPC_STRUCT_TRAITS_BEGIN(ContentSettingPatternSource) | 106 IPC_STRUCT_TRAITS_BEGIN(ContentSettingPatternSource) |
| 109 IPC_STRUCT_TRAITS_MEMBER(primary_pattern) | 107 IPC_STRUCT_TRAITS_MEMBER(primary_pattern) |
| 110 IPC_STRUCT_TRAITS_MEMBER(secondary_pattern) | 108 IPC_STRUCT_TRAITS_MEMBER(secondary_pattern) |
| 111 IPC_STRUCT_TRAITS_MEMBER(setting) | 109 IPC_STRUCT_TRAITS_MEMBER(setting) |
| 112 IPC_STRUCT_TRAITS_MEMBER(source) | 110 IPC_STRUCT_TRAITS_MEMBER(source) |
| 113 IPC_STRUCT_TRAITS_MEMBER(incognito) | 111 IPC_STRUCT_TRAITS_MEMBER(incognito) |
| 114 IPC_STRUCT_TRAITS_END() | 112 IPC_STRUCT_TRAITS_END() |
| 115 | 113 |
| 116 IPC_STRUCT_TRAITS_BEGIN(EmbeddedSearchRequestParams) | |
| 117 IPC_STRUCT_TRAITS_MEMBER(search_query) | |
| 118 IPC_STRUCT_TRAITS_MEMBER(original_query) | |
| 119 IPC_STRUCT_TRAITS_MEMBER(rlz_parameter_value) | |
| 120 IPC_STRUCT_TRAITS_MEMBER(input_encoding) | |
| 121 IPC_STRUCT_TRAITS_MEMBER(assisted_query_stats) | |
| 122 IPC_STRUCT_TRAITS_END() | |
| 123 | |
| 124 IPC_STRUCT_TRAITS_BEGIN(InstantSuggestion) | |
| 125 IPC_STRUCT_TRAITS_MEMBER(text) | |
| 126 IPC_STRUCT_TRAITS_MEMBER(metadata) | |
| 127 IPC_STRUCT_TRAITS_END() | |
| 128 | |
| 129 IPC_STRUCT_TRAITS_BEGIN(InstantMostVisitedItem) | |
| 130 IPC_STRUCT_TRAITS_MEMBER(url) | |
| 131 IPC_STRUCT_TRAITS_MEMBER(title) | |
| 132 IPC_STRUCT_TRAITS_MEMBER(thumbnail) | |
| 133 IPC_STRUCT_TRAITS_MEMBER(favicon) | |
| 134 IPC_STRUCT_TRAITS_MEMBER(impression_url) | |
| 135 IPC_STRUCT_TRAITS_MEMBER(click_url) | |
| 136 IPC_STRUCT_TRAITS_END() | |
| 137 | |
| 138 IPC_STRUCT_TRAITS_BEGIN(RendererContentSettingRules) | 114 IPC_STRUCT_TRAITS_BEGIN(RendererContentSettingRules) |
| 139 IPC_STRUCT_TRAITS_MEMBER(image_rules) | 115 IPC_STRUCT_TRAITS_MEMBER(image_rules) |
| 140 IPC_STRUCT_TRAITS_MEMBER(script_rules) | 116 IPC_STRUCT_TRAITS_MEMBER(script_rules) |
| 141 IPC_STRUCT_TRAITS_MEMBER(autoplay_rules) | 117 IPC_STRUCT_TRAITS_MEMBER(autoplay_rules) |
| 142 IPC_STRUCT_TRAITS_END() | 118 IPC_STRUCT_TRAITS_END() |
| 143 | 119 |
| 144 IPC_STRUCT_TRAITS_BEGIN(RGBAColor) | 120 IPC_STRUCT_TRAITS_BEGIN(RGBAColor) |
| 145 IPC_STRUCT_TRAITS_MEMBER(r) | 121 IPC_STRUCT_TRAITS_MEMBER(r) |
| 146 IPC_STRUCT_TRAITS_MEMBER(g) | 122 IPC_STRUCT_TRAITS_MEMBER(g) |
| 147 IPC_STRUCT_TRAITS_MEMBER(b) | 123 IPC_STRUCT_TRAITS_MEMBER(b) |
| 148 IPC_STRUCT_TRAITS_MEMBER(a) | 124 IPC_STRUCT_TRAITS_MEMBER(a) |
| 149 IPC_STRUCT_TRAITS_END() | 125 IPC_STRUCT_TRAITS_END() |
| 150 | 126 |
| 151 IPC_STRUCT_TRAITS_BEGIN(ThemeBackgroundInfo) | |
| 152 IPC_STRUCT_TRAITS_MEMBER(using_default_theme) | |
| 153 IPC_STRUCT_TRAITS_MEMBER(background_color) | |
| 154 IPC_STRUCT_TRAITS_MEMBER(text_color) | |
| 155 IPC_STRUCT_TRAITS_MEMBER(link_color) | |
| 156 IPC_STRUCT_TRAITS_MEMBER(text_color_light) | |
| 157 IPC_STRUCT_TRAITS_MEMBER(header_color) | |
| 158 IPC_STRUCT_TRAITS_MEMBER(section_border_color) | |
| 159 IPC_STRUCT_TRAITS_MEMBER(theme_id) | |
| 160 IPC_STRUCT_TRAITS_MEMBER(image_horizontal_alignment) | |
| 161 IPC_STRUCT_TRAITS_MEMBER(image_vertical_alignment) | |
| 162 IPC_STRUCT_TRAITS_MEMBER(image_tiling) | |
| 163 IPC_STRUCT_TRAITS_MEMBER(image_height) | |
| 164 IPC_STRUCT_TRAITS_MEMBER(has_attribution) | |
| 165 IPC_STRUCT_TRAITS_MEMBER(logo_alternate) | |
| 166 IPC_STRUCT_TRAITS_END() | |
| 167 | |
| 168 IPC_ENUM_TRAITS_MAX_VALUE(NTPLoggingEventType, | |
| 169 NTP_EVENT_TYPE_LAST) | |
| 170 | |
| 171 IPC_ENUM_TRAITS_MAX_VALUE(NTPLoggingTileSource, | |
| 172 NTPLoggingTileSource::LAST) | |
| 173 | |
| 174 IPC_ENUM_TRAITS_MAX_VALUE(WebApplicationInfo::MobileCapable, | 127 IPC_ENUM_TRAITS_MAX_VALUE(WebApplicationInfo::MobileCapable, |
| 175 WebApplicationInfo::MOBILE_CAPABLE_APPLE) | 128 WebApplicationInfo::MOBILE_CAPABLE_APPLE) |
| 176 | 129 |
| 177 IPC_STRUCT_TRAITS_BEGIN(WebApplicationInfo::IconInfo) | 130 IPC_STRUCT_TRAITS_BEGIN(WebApplicationInfo::IconInfo) |
| 178 IPC_STRUCT_TRAITS_MEMBER(url) | 131 IPC_STRUCT_TRAITS_MEMBER(url) |
| 179 IPC_STRUCT_TRAITS_MEMBER(width) | 132 IPC_STRUCT_TRAITS_MEMBER(width) |
| 180 IPC_STRUCT_TRAITS_MEMBER(height) | 133 IPC_STRUCT_TRAITS_MEMBER(height) |
| 181 IPC_STRUCT_TRAITS_MEMBER(data) | 134 IPC_STRUCT_TRAITS_MEMBER(data) |
| 182 IPC_STRUCT_TRAITS_END() | 135 IPC_STRUCT_TRAITS_END() |
| 183 | 136 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 211 // Tells the render frame to load all blocked plugins with the given identifier. | 164 // Tells the render frame to load all blocked plugins with the given identifier. |
| 212 IPC_MESSAGE_ROUTED1(ChromeViewMsg_LoadBlockedPlugins, | 165 IPC_MESSAGE_ROUTED1(ChromeViewMsg_LoadBlockedPlugins, |
| 213 std::string /* identifier */) | 166 std::string /* identifier */) |
| 214 | 167 |
| 215 // Tells the renderer to create a FieldTrial, and by using a 100% probability | 168 // Tells the renderer to create a FieldTrial, and by using a 100% probability |
| 216 // for the FieldTrial, forces the FieldTrial to have assigned group name. | 169 // for the FieldTrial, forces the FieldTrial to have assigned group name. |
| 217 IPC_MESSAGE_CONTROL2(ChromeViewMsg_SetFieldTrialGroup, | 170 IPC_MESSAGE_CONTROL2(ChromeViewMsg_SetFieldTrialGroup, |
| 218 std::string /* field trial name */, | 171 std::string /* field trial name */, |
| 219 std::string /* group name that was assigned. */) | 172 std::string /* group name that was assigned. */) |
| 220 | 173 |
| 221 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetPageSequenceNumber, | |
| 222 int /* page_seq_no */) | |
| 223 | |
| 224 IPC_MESSAGE_ROUTED0(ChromeViewMsg_DetermineIfPageSupportsInstant) | |
| 225 | |
| 226 IPC_MESSAGE_ROUTED2(ChromeViewMsg_SearchBoxFocusChanged, | |
| 227 OmniboxFocusState /* new_focus_state */, | |
| 228 OmniboxFocusChangeReason /* reason */) | |
| 229 | |
| 230 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxMostVisitedItemsChanged, | |
| 231 std::vector<InstantMostVisitedItem> /* items */) | |
| 232 | |
| 233 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxSetInputInProgress, | |
| 234 bool /* input_in_progress */) | |
| 235 | |
| 236 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxSetSuggestionToPrefetch, | |
| 237 InstantSuggestion /* suggestion */) | |
| 238 | |
| 239 IPC_MESSAGE_ROUTED2(ChromeViewMsg_SearchBoxSubmit, | |
| 240 base::string16 /* value */, | |
| 241 EmbeddedSearchRequestParams /* params */) | |
| 242 | |
| 243 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxThemeChanged, | |
| 244 ThemeBackgroundInfo /* value */) | |
| 245 | |
| 246 IPC_MESSAGE_ROUTED1(ChromeViewMsg_HistorySyncCheckResult, | |
| 247 bool /* sync_history */) | |
| 248 | |
| 249 IPC_MESSAGE_ROUTED2(ChromeViewMsg_ChromeIdentityCheckResult, | |
| 250 base::string16 /* identity */, | |
| 251 bool /* identity_match */) | |
| 252 | |
| 253 // Sent on process startup to indicate whether this process is running in | 174 // Sent on process startup to indicate whether this process is running in |
| 254 // incognito mode. | 175 // incognito mode. |
| 255 IPC_MESSAGE_CONTROL1(ChromeViewMsg_SetIsIncognitoProcess, | 176 IPC_MESSAGE_CONTROL1(ChromeViewMsg_SetIsIncognitoProcess, |
| 256 bool /* is_incognito_processs */) | 177 bool /* is_incognito_processs */) |
| 257 | 178 |
| 258 // Sent in response to FrameHostMsg_DidBlockRunningInsecureContent. | 179 // Sent in response to FrameHostMsg_DidBlockRunningInsecureContent. |
| 259 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetAllowRunningInsecureContent, | 180 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetAllowRunningInsecureContent, |
| 260 bool /* allowed */) | 181 bool /* allowed */) |
| 261 | 182 |
| 262 IPC_MESSAGE_ROUTED0(ChromeViewMsg_ReloadFrame) | 183 IPC_MESSAGE_ROUTED0(ChromeViewMsg_ReloadFrame) |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 545 // only when the renderer is prerendering. | 466 // only when the renderer is prerendering. |
| 546 IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_CancelPrerenderForPrinting) | 467 IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_CancelPrerenderForPrinting) |
| 547 | 468 |
| 548 // Sent when the renderer was prevented from displaying insecure content in | 469 // Sent when the renderer was prevented from displaying insecure content in |
| 549 // a secure page by a security policy. The page may appear incomplete. | 470 // a secure page by a security policy. The page may appear incomplete. |
| 550 IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_DidBlockDisplayingInsecureContent) | 471 IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_DidBlockDisplayingInsecureContent) |
| 551 | 472 |
| 552 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_DidGetWebApplicationInfo, | 473 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_DidGetWebApplicationInfo, |
| 553 WebApplicationInfo) | 474 WebApplicationInfo) |
| 554 | 475 |
| 555 // Logs events from InstantExtended New Tab Pages. | |
| 556 IPC_MESSAGE_ROUTED3(ChromeViewHostMsg_LogEvent, | |
| 557 int /* page_seq_no */, | |
| 558 NTPLoggingEventType /* event */, | |
| 559 base::TimeDelta /* time */) | |
| 560 | |
| 561 // Logs an impression on one of the Most Visited tile on the InstantExtended | |
| 562 // New Tab Page. | |
| 563 IPC_MESSAGE_ROUTED3(ChromeViewHostMsg_LogMostVisitedImpression, | |
| 564 int /* page_seq_no */, | |
| 565 int /* position */, | |
| 566 NTPLoggingTileSource /* tile_source */) | |
| 567 | |
| 568 // Logs a navigation on one of the Most Visited tile on the InstantExtended | |
| 569 // New Tab Page. | |
| 570 IPC_MESSAGE_ROUTED3(ChromeViewHostMsg_LogMostVisitedNavigation, | |
| 571 int /* page_seq_no */, | |
| 572 int /* position */, | |
| 573 NTPLoggingTileSource /* tile_source */) | |
| 574 | |
| 575 // The Instant page asks whether the user syncs its history. | |
| 576 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_HistorySyncCheck, | |
| 577 int /* page_seq_no */) | |
| 578 | |
| 579 // The Instant page asks for Chrome identity check against |identity|. | |
| 580 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_ChromeIdentityCheck, | |
| 581 int /* page_seq_no */, | |
| 582 base::string16 /* identity */) | |
| 583 | |
| 584 // Tells InstantExtended to set the omnibox focus state. | |
| 585 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_FocusOmnibox, | |
| 586 int /* page_seq_no */, | |
| 587 OmniboxFocusState /* state */) | |
| 588 | |
| 589 // Tells InstantExtended to paste text into the omnibox. If text is empty, | |
| 590 // the clipboard contents will be pasted. This causes the omnibox dropdown to | |
| 591 // open. | |
| 592 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_PasteAndOpenDropdown, | |
| 593 int /* page_seq_no */, | |
| 594 base::string16 /* text to be pasted */) | |
| 595 | |
| 596 // Tells InstantExtended whether the embedded search API is supported. | |
| 597 // See http://dev.chromium.org/embeddedsearch | |
| 598 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_InstantSupportDetermined, | |
| 599 int /* page_seq_no */, | |
| 600 bool /* result */) | |
| 601 | |
| 602 // Tells InstantExtended to delete a most visited item. | |
| 603 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_SearchBoxDeleteMostVisitedItem, | |
| 604 int /* page_seq_no */, | |
| 605 GURL /* url */) | |
| 606 | |
| 607 // Tells InstantExtended to undo all most visited item deletions. | |
| 608 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_SearchBoxUndoAllMostVisitedDeletions, | |
| 609 int /* page_seq_no */) | |
| 610 | |
| 611 // Tells InstantExtended to undo one most visited item deletion. | |
| 612 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_SearchBoxUndoMostVisitedDeletion, | |
| 613 int /* page_seq_no */, | |
| 614 GURL /* url */) | |
| 615 | |
| 616 // Tells the renderer a list of URLs which should be bounced back to the browser | 476 // Tells the renderer a list of URLs which should be bounced back to the browser |
| 617 // process so that they can be assigned to an Instant renderer. | 477 // process so that they can be assigned to an Instant renderer. |
| 618 IPC_MESSAGE_CONTROL2(ChromeViewMsg_SetSearchURLs, | 478 IPC_MESSAGE_CONTROL2(ChromeViewMsg_SetSearchURLs, |
| 619 std::vector<GURL> /* search_urls */, | 479 std::vector<GURL> /* search_urls */, |
| 620 GURL /* new_tab_page_url */) | 480 GURL /* new_tab_page_url */) |
| 621 | 481 |
| 622 #if defined(ENABLE_PLUGINS) | 482 #if defined(ENABLE_PLUGINS) |
| 623 // Sent by the renderer to check if crash reporting is enabled. | 483 // Sent by the renderer to check if crash reporting is enabled. |
| 624 IPC_SYNC_MESSAGE_CONTROL0_1(ChromeViewHostMsg_IsCrashReportingEnabled, | 484 IPC_SYNC_MESSAGE_CONTROL0_1(ChromeViewHostMsg_IsCrashReportingEnabled, |
| 625 bool /* enabled */) | 485 bool /* enabled */) |
| (...skipping 16 matching lines...) Expand all Loading... |
| 642 | 502 |
| 643 // Record a sample string to a Rappor metric. | 503 // Record a sample string to a Rappor metric. |
| 644 IPC_MESSAGE_CONTROL2(ChromeViewHostMsg_RecordRappor, | 504 IPC_MESSAGE_CONTROL2(ChromeViewHostMsg_RecordRappor, |
| 645 std::string /* metric */, | 505 std::string /* metric */, |
| 646 std::string /* sample */) | 506 std::string /* sample */) |
| 647 | 507 |
| 648 // Record a domain and registry of a url to a Rappor metric. | 508 // Record a domain and registry of a url to a Rappor metric. |
| 649 IPC_MESSAGE_CONTROL2(ChromeViewHostMsg_RecordRapporURL, | 509 IPC_MESSAGE_CONTROL2(ChromeViewHostMsg_RecordRapporURL, |
| 650 std::string /* metric */, | 510 std::string /* metric */, |
| 651 GURL /* sample url */) | 511 GURL /* sample url */) |
| OLD | NEW |