OLD | NEW |
---|---|
(Empty) | |
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. | |
4 | |
5 // Message definition file, included multiple times, hence no include guard. | |
6 | |
7 #include <string> | |
8 #include <vector> | |
9 | |
10 #include "base/strings/string16.h" | |
11 #include "components/password_manager/content/common/credential_manager_types.h" | |
12 #include "content/public/common/common_param_traits.h" | |
13 #include "content/public/common/common_param_traits_macros.h" | |
14 #include "ipc/ipc_message_macros.h" | |
15 #include "ipc/ipc_message_utils.h" | |
16 #include "third_party/WebKit/public/platform/WebCredentialManagerError.h" | |
17 #include "url/gurl.h" | |
18 | |
19 #define IPC_MESSAGE_START CredentialManagerMsgStart | |
20 | |
21 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebCredentialManagerError::ErrorType, | |
22 blink::WebCredentialManagerError::ErrorTypeLast); | |
23 | |
24 IPC_ENUM_TRAITS_MAX_VALUE( | |
25 password_manager::CredentialType, | |
26 password_manager::CREDENTIAL_MANAGER_CREDENTIAL_TYPE_LAST); | |
27 | |
28 IPC_STRUCT_TRAITS_BEGIN(password_manager::CredentialInfo) | |
29 IPC_STRUCT_TRAITS_MEMBER(type) | |
30 IPC_STRUCT_TRAITS_MEMBER(id) | |
31 IPC_STRUCT_TRAITS_MEMBER(name) | |
32 IPC_STRUCT_TRAITS_MEMBER(avatarURL) | |
33 IPC_STRUCT_TRAITS_MEMBER(password) | |
34 IPC_STRUCT_TRAITS_MEMBER(federation) | |
35 IPC_STRUCT_TRAITS_END() | |
36 | |
37 // ---------------------------------------------------------------------------- | |
38 // Messages sent from the renderer to the browser | |
39 | |
40 // Passes the notification from 'navigator.credentials.notifyFailedSignIn()' up | |
41 // to the browser process in order to suppress the automatic bubble which would | |
42 // pop up in order to prompt the user to save the credential she used for | |
43 // signin. The browser process will respond with a | |
44 // CredentialManagerMsg_AcknowledgeFailedSignedIn message. | |
45 IPC_MESSAGE_ROUTED2(CredentialManagerHostMsg_NotifyFailedSignIn, | |
46 int /* request_id */, | |
47 password_manager::CredentialInfo /* credential */) | |
48 | |
49 // Passes the notification from 'navigator.credentials.notifySignedIn()' up to | |
50 // the browser process in order to (among other things) prompt the user to save | |
51 // the credential she used for signin. The browser process will respond with a | |
52 // CredentialManagerMsg_AcknowledgeSignedIn message. | |
53 IPC_MESSAGE_ROUTED2(CredentialManagerHostMsg_NotifySignedIn, | |
54 int /* request_id */, | |
55 password_manager::CredentialInfo /* credential */) | |
56 | |
57 // Passes the notification from 'navigator.credentials.notifySignedOut()' up to | |
58 // the browser process in order to clear the "zeroclick" bit on that origin's | |
59 // stored credentials. The browser process will respond with a | |
60 // CredentialManagerMsg_AcknowledgeSignedOut message. | |
61 IPC_MESSAGE_ROUTED1(CredentialManagerHostMsg_NotifySignedOut, | |
62 int /* request_id */) | |
63 | |
64 // Requests credentials from the browser process in response to a page calling | |
65 // 'navigator.credentials.request()'. The browser process will respond with a | |
66 // CredentialManagerMsg_SendCredentials message. | |
67 IPC_MESSAGE_ROUTED3(CredentialManagerHostMsg_RequestCredentials, | |
68 int /* request_id */, | |
69 bool /* zeroclick_only */, | |
Ilya Sherman
2014/08/19 23:55:51
nit: "zeroclick_only" -> "zero_click_only"
Mike West
2014/08/20 13:17:18
Done.
| |
70 std::vector<GURL> /* federations */) | |
71 | |
72 // ---------------------------------------------------------------------------- | |
73 // Messages sent from the browser to the renderer | |
74 | |
75 // Notify the renderer that the browser process has finished processing a | |
76 // CredentialManagerHostMsg_NotifyFailedSignedIn message. | |
77 IPC_MESSAGE_ROUTED1(CredentialManagerMsg_AcknowledgeFailedSignIn, | |
78 int /* request_id */); | |
79 | |
80 // Notify the renderer that the browser process has finished processing a | |
81 // CredentialManagerHostMsg_NotifySignedIn message. | |
82 IPC_MESSAGE_ROUTED1(CredentialManagerMsg_AcknowledgeSignedIn, | |
83 int /* request_id */); | |
84 | |
85 // Notify the renderer that the browser process has finished processing a | |
86 // CredentialManagerHostMsg_NotifySignedOut message. | |
87 IPC_MESSAGE_ROUTED1(CredentialManagerMsg_AcknowledgeSignedOut, | |
88 int /* request_id */); | |
89 | |
90 // Send a credential to the renderer in response to a | |
91 // CredentialManagerHostMsg_RequestCredentials message. | |
92 IPC_MESSAGE_ROUTED2(CredentialManagerMsg_SendCredentials, | |
Ilya Sherman
2014/08/19 23:55:51
nit: You use "credentials" here and "credential" b
Mike West
2014/08/20 13:17:18
Yeah, "credentials" is one of those words that's c
Ilya Sherman
2014/08/21 00:11:21
I don't mind which one you choose -- I just ask th
| |
93 int /* request_id */, | |
94 password_manager::CredentialInfo /* credential */) | |
OLD | NEW |