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 "chrome/common/common_param_traits.h" | 13 #include "chrome/common/common_param_traits.h" |
14 #include "chrome/common/instant_types.h" | 14 #include "chrome/common/instant_types.h" |
15 #include "chrome/common/ntp_logging_events.h" | 15 #include "chrome/common/ntp_logging_events.h" |
16 #include "chrome/common/search_provider.h" | 16 #include "chrome/common/search_provider.h" |
17 #include "chrome/common/web_application_info.h" | 17 #include "chrome/common/web_application_info.h" |
| 18 #include "components/error_page/common/offline_page_types.h" |
18 #include "components/omnibox/common/omnibox_focus_state.h" | 19 #include "components/omnibox/common/omnibox_focus_state.h" |
19 #include "content/public/common/common_param_traits.h" | 20 #include "content/public/common/common_param_traits.h" |
20 #include "content/public/common/top_controls_state.h" | 21 #include "content/public/common/top_controls_state.h" |
21 #include "ipc/ipc_channel_handle.h" | 22 #include "ipc/ipc_channel_handle.h" |
22 #include "ipc/ipc_message_macros.h" | 23 #include "ipc/ipc_message_macros.h" |
23 #include "ipc/ipc_platform_file.h" | 24 #include "ipc/ipc_platform_file.h" |
24 #include "third_party/WebKit/public/platform/modules/app_banner/WebAppBannerProm
ptReply.h" | 25 #include "third_party/WebKit/public/platform/modules/app_banner/WebAppBannerProm
ptReply.h" |
25 #include "third_party/WebKit/public/web/WebCache.h" | 26 #include "third_party/WebKit/public/web/WebCache.h" |
26 #include "third_party/WebKit/public/web/WebConsoleMessage.h" | 27 #include "third_party/WebKit/public/web/WebConsoleMessage.h" |
27 | 28 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 IPC_ENUM_TRAITS_MIN_MAX_VALUE(search_provider::InstallState, | 69 IPC_ENUM_TRAITS_MIN_MAX_VALUE(search_provider::InstallState, |
69 search_provider::DENIED, | 70 search_provider::DENIED, |
70 search_provider::INSTALLED_STATE_LAST) | 71 search_provider::INSTALLED_STATE_LAST) |
71 IPC_ENUM_TRAITS_MAX_VALUE(ThemeBackgroundImageAlignment, | 72 IPC_ENUM_TRAITS_MAX_VALUE(ThemeBackgroundImageAlignment, |
72 THEME_BKGRND_IMAGE_ALIGN_LAST) | 73 THEME_BKGRND_IMAGE_ALIGN_LAST) |
73 IPC_ENUM_TRAITS_MAX_VALUE(ThemeBackgroundImageTiling, THEME_BKGRND_IMAGE_LAST) | 74 IPC_ENUM_TRAITS_MAX_VALUE(ThemeBackgroundImageTiling, THEME_BKGRND_IMAGE_LAST) |
74 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebConsoleMessage::Level, | 75 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebConsoleMessage::Level, |
75 blink::WebConsoleMessage::LevelLast) | 76 blink::WebConsoleMessage::LevelLast) |
76 IPC_ENUM_TRAITS_MAX_VALUE(content::TopControlsState, | 77 IPC_ENUM_TRAITS_MAX_VALUE(content::TopControlsState, |
77 content::TOP_CONTROLS_STATE_LAST) | 78 content::TOP_CONTROLS_STATE_LAST) |
| 79 IPC_ENUM_TRAITS_MAX_VALUE( |
| 80 error_page::OfflinePageStatus, |
| 81 error_page::OfflinePageStatus::OFFLINE_PAGE_STATUS_LAST) |
78 | 82 |
79 // Output parameters for ChromeViewHostMsg_GetPluginInfo message. | 83 // Output parameters for ChromeViewHostMsg_GetPluginInfo message. |
80 IPC_STRUCT_BEGIN(ChromeViewHostMsg_GetPluginInfo_Output) | 84 IPC_STRUCT_BEGIN(ChromeViewHostMsg_GetPluginInfo_Output) |
81 IPC_STRUCT_MEMBER(ChromeViewHostMsg_GetPluginInfo_Status, status) | 85 IPC_STRUCT_MEMBER(ChromeViewHostMsg_GetPluginInfo_Status, status) |
82 IPC_STRUCT_MEMBER(content::WebPluginInfo, plugin) | 86 IPC_STRUCT_MEMBER(content::WebPluginInfo, plugin) |
83 IPC_STRUCT_MEMBER(std::string, actual_mime_type) | 87 IPC_STRUCT_MEMBER(std::string, actual_mime_type) |
84 IPC_STRUCT_MEMBER(std::string, group_identifier) | 88 IPC_STRUCT_MEMBER(std::string, group_identifier) |
85 IPC_STRUCT_MEMBER(base::string16, group_name) | 89 IPC_STRUCT_MEMBER(base::string16, group_name) |
86 IPC_STRUCT_END() | 90 IPC_STRUCT_END() |
87 | 91 |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
316 // page with more specific troubleshooting suggestions. | 320 // page with more specific troubleshooting suggestions. |
317 IPC_MESSAGE_ROUTED1(ChromeViewMsg_NetErrorInfo, | 321 IPC_MESSAGE_ROUTED1(ChromeViewMsg_NetErrorInfo, |
318 int /* DNS probe status */) | 322 int /* DNS probe status */) |
319 | 323 |
320 // Tells the renderer whether or not there is a local diagnostics service that | 324 // Tells the renderer whether or not there is a local diagnostics service that |
321 // can be run via ChromeViewHostMsg_RunNetworkDiagnostics messages. | 325 // can be run via ChromeViewHostMsg_RunNetworkDiagnostics messages. |
322 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetCanShowNetworkDiagnosticsDialog, | 326 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetCanShowNetworkDiagnosticsDialog, |
323 bool /* can_show_network_diagnostics_dialog */) | 327 bool /* can_show_network_diagnostics_dialog */) |
324 | 328 |
325 #if defined(OS_ANDROID) | 329 #if defined(OS_ANDROID) |
326 // Tells the renderer whether or not an offline page exists. This is used to | 330 // Tells the renderer about the status of the offline pages. This is used to |
327 // decide if "show saved pages" button will be provided on certain error page. | 331 // decide if offline related button will be provided on certain error page. |
328 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetHasOfflinePages, | 332 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetOfflinePageInfo, |
329 bool /* has_offline_pages */) | 333 error_page::OfflinePageStatus /* offline_page_status */) |
330 #endif | 334 #endif // defined(OS_ANDROID) |
331 | 335 |
332 // Provides the information needed by the renderer process to contact a | 336 // Provides the information needed by the renderer process to contact a |
333 // navigation correction service. Handled by the NetErrorHelper. | 337 // navigation correction service. Handled by the NetErrorHelper. |
334 IPC_MESSAGE_ROUTED5(ChromeViewMsg_SetNavigationCorrectionInfo, | 338 IPC_MESSAGE_ROUTED5(ChromeViewMsg_SetNavigationCorrectionInfo, |
335 GURL /* Navigation correction service base URL */, | 339 GURL /* Navigation correction service base URL */, |
336 std::string /* language */, | 340 std::string /* language */, |
337 std::string /* origin_country */, | 341 std::string /* origin_country */, |
338 std::string /* API key to use */, | 342 std::string /* API key to use */, |
339 GURL /* Google Search URL to use */) | 343 GURL /* Google Search URL to use */) |
340 | 344 |
341 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_RunNetworkDiagnostics, | 345 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_RunNetworkDiagnostics, |
342 GURL /* failed_url */) | 346 GURL /* failed_url */) |
343 | 347 |
344 #if defined(OS_ANDROID) | 348 #if defined(OS_ANDROID) |
345 // Message sent from the renderer to the browser to show the UI for offline | 349 // Message sent from the renderer to the browser to show the UI for offline |
346 // pages. | 350 // pages. |
347 IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_ShowOfflinePages) | 351 IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_ShowOfflinePages) |
348 #endif | 352 |
| 353 // Message sent from the renderer to the browser to load the offline copy of |
| 354 // the page that fails to load due to no network connectivity. |
| 355 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_LoadOfflineCopy, GURL /* url */) |
| 356 #endif // defined(OS_ANDROID) |
349 | 357 |
350 //----------------------------------------------------------------------------- | 358 //----------------------------------------------------------------------------- |
351 // Misc messages | 359 // Misc messages |
352 // These are messages sent from the renderer to the browser process. | 360 // These are messages sent from the renderer to the browser process. |
353 | 361 |
354 IPC_MESSAGE_CONTROL1(ChromeViewHostMsg_UpdatedCacheStats, | 362 IPC_MESSAGE_CONTROL1(ChromeViewHostMsg_UpdatedCacheStats, |
355 blink::WebCache::UsageStats /* stats */) | 363 blink::WebCache::UsageStats /* stats */) |
356 | 364 |
357 // Sent by the renderer process to check whether access to FileSystem is | 365 // Sent by the renderer process to check whether access to FileSystem is |
358 // granted by content settings. | 366 // granted by content settings. |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
579 | 587 |
580 // Record a sample string to a Rappor metric. | 588 // Record a sample string to a Rappor metric. |
581 IPC_MESSAGE_CONTROL2(ChromeViewHostMsg_RecordRappor, | 589 IPC_MESSAGE_CONTROL2(ChromeViewHostMsg_RecordRappor, |
582 std::string /* metric */, | 590 std::string /* metric */, |
583 std::string /* sample */) | 591 std::string /* sample */) |
584 | 592 |
585 // Record a domain and registry of a url to a Rappor metric. | 593 // Record a domain and registry of a url to a Rappor metric. |
586 IPC_MESSAGE_CONTROL2(ChromeViewHostMsg_RecordRapporURL, | 594 IPC_MESSAGE_CONTROL2(ChromeViewHostMsg_RecordRapporURL, |
587 std::string /* metric */, | 595 std::string /* metric */, |
588 GURL /* sample url */) | 596 GURL /* sample url */) |
OLD | NEW |