1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 // Multiply-included file, no traditional include guard.
6 #include "base/strings/string16.h"
7 #include "components/content_settings/core/common/content_settings_types.h"
8 #include "content/public/common/common_param_traits.h"
9 #include "content/public/common/common_param_traits_macros.h"
10 #include "ipc/ipc_message_macros.h"
13 #define IPC_MESSAGE_START ContentSettingsMsgStart
15 IPC_ENUM_TRAITS_MAX_VALUE(ContentSettingsType
, CONTENT_SETTINGS_NUM_TYPES
- 1)
17 //-----------------------------------------------------------------------------
18 // These are messages sent from the browser to the renderer process.
20 // Sent in response to ViewHostMsg_DidBlockDisplayingInsecureContent.
21 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetAllowDisplayingInsecureContent
,
24 // Sent in response to ViewHostMsg_DidBlockRunningInsecureContent.
25 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetAllowRunningInsecureContent
,
28 IPC_MESSAGE_ROUTED0(ChromeViewMsg_ReloadFrame
)
30 // Tells the renderer whether or not a file system access has been allowed.
31 IPC_MESSAGE_ROUTED2(ChromeViewMsg_RequestFileSystemAccessAsyncResponse
,
35 // Tells the renderer that the NPAPI cannot be used. For example Ash on windows.
36 IPC_MESSAGE_ROUTED0(ChromeViewMsg_NPAPINotSupported
)
38 // Tells the render frame to load all blocked plugins with the given identifier.
39 IPC_MESSAGE_ROUTED1(ChromeViewMsg_LoadBlockedPlugins
,
40 std::string
/* identifier */)
42 // JavaScript related messages -----------------------------------------------
44 // Tells the frame it is displaying an interstitial page.
45 IPC_MESSAGE_ROUTED0(ChromeViewMsg_SetAsInterstitial
)
47 //-----------------------------------------------------------------------------
48 // These are messages sent from the renderer to the browser process.
50 // Tells the browser that content in the current page was blocked due to the
51 // user's content settings.
52 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_ContentBlocked
,
53 ContentSettingsType
/* type of blocked content */,
54 base::string16
/* details on blocked content */)
56 // Sent by the renderer process to check whether access to web databases is
57 // granted by content settings.
58 IPC_SYNC_MESSAGE_CONTROL5_1(ChromeViewHostMsg_AllowDatabase
,
59 int /* render_frame_id */,
60 GURL
/* origin_url */,
61 GURL
/* top origin url */,
62 base::string16
/* database name */,
63 base::string16
/* database display name */,
66 // Sent by the renderer process to check whether access to DOM Storage is
67 // granted by content settings.
68 IPC_SYNC_MESSAGE_CONTROL4_1(ChromeViewHostMsg_AllowDOMStorage
,
69 int /* render_frame_id */,
70 GURL
/* origin_url */,
71 GURL
/* top origin url */,
72 bool /* if true local storage, otherwise session */,
75 // Sent by the renderer process to check whether access to FileSystem is
76 // granted by content settings.
77 IPC_MESSAGE_CONTROL4(ChromeViewHostMsg_RequestFileSystemAccessAsync
,
78 int /* render_frame_id */,
80 GURL
/* origin_url */,
81 GURL
/* top origin url */)
83 // Sent by the renderer process to check whether access to Indexed DBis
84 // granted by content settings.
85 IPC_SYNC_MESSAGE_CONTROL4_1(ChromeViewHostMsg_AllowIndexedDB
,
86 int /* render_frame_id */,
87 GURL
/* origin_url */,
88 GURL
/* top origin url */,
89 base::string16
/* database name */,
92 // Sent when the renderer was prevented from displaying insecure content in
93 // a secure page by a security policy. The page may appear incomplete.
94 IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_DidBlockDisplayingInsecureContent
)