| 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/core/common/credential_manager_types.h" | |
| 12 #include "content/public/common/common_param_traits.h" | |
| 13 #include "ipc/ipc_message_macros.h" | |
| 14 #include "ipc/ipc_message_utils.h" | |
| 15 #include "third_party/WebKit/public/platform/WebCredentialManagerError.h" | |
| 16 #include "url/gurl.h" | |
| 17 #include "url/ipc/url_param_traits.h" | |
| 18 | |
| 19 #define IPC_MESSAGE_START CredentialManagerMsgStart | |
| 20 | |
| 21 IPC_ENUM_TRAITS_MAX_VALUE( | |
| 22 password_manager::CredentialType, | |
| 23 password_manager::CredentialType::CREDENTIAL_TYPE_LAST) | |
| 24 | |
| 25 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebCredentialManagerError, | |
| 26 blink::WebCredentialManagerErrorLastType) | |
| 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(icon) | |
| 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.store()' up to | |
| 41 // the browser process in order to (among other things) prompt the user to save | |
| 42 // the credential she used for signin. The browser process will respond with a | |
| 43 // CredentialManagerMsg_AcknowledgeStore message. | |
| 44 IPC_MESSAGE_ROUTED2(CredentialManagerHostMsg_Store, | |
| 45 int /* request_id */, | |
| 46 password_manager::CredentialInfo /* credential */) | |
| 47 | |
| 48 // Passes the notification from 'navigator.credentials.requireUserMediation()' | |
| 49 // up to the browser process in order to clear the "zeroclick" bit on that | |
| 50 // origin's stored credentials. The browser process will respond with a | |
| 51 // CredentialManagerMsg_AcknowledgeRequireUserMediation message. | |
| 52 IPC_MESSAGE_ROUTED1(CredentialManagerHostMsg_RequireUserMediation, | |
| 53 int /* request_id */) | |
| 54 | |
| 55 // Requests a credential from the browser process in response to a page calling | |
| 56 // 'navigator.credentials.get()'. The browser process will respond with a | |
| 57 // CredentialManagerMsg_SendCredential message. | |
| 58 IPC_MESSAGE_ROUTED4(CredentialManagerHostMsg_RequestCredential, | |
| 59 int /* request_id */, | |
| 60 bool /* zero_click_only */, | |
| 61 bool /* include_passwords */, | |
| 62 std::vector<GURL> /* federations */) | |
| 63 | |
| 64 // ---------------------------------------------------------------------------- | |
| 65 // Messages sent from the browser to the renderer | |
| 66 | |
| 67 // Notify the renderer that the browser process has finished processing a | |
| 68 // CredentialManagerHostMsg_Store message. | |
| 69 IPC_MESSAGE_ROUTED1(CredentialManagerMsg_AcknowledgeStore, int /* request_id */) | |
| 70 | |
| 71 // Notify the renderer that the browser process has finished processing a | |
| 72 // CredentialManagerHostMsg_RequireUserMediation message. | |
| 73 IPC_MESSAGE_ROUTED1(CredentialManagerMsg_AcknowledgeRequireUserMediation, | |
| 74 int /* request_id */) | |
| 75 | |
| 76 // Send a credential to the renderer in response to a | |
| 77 // CredentialManagerHostMsg_RequestCredential message. | |
| 78 IPC_MESSAGE_ROUTED2(CredentialManagerMsg_SendCredential, | |
| 79 int /* request_id */, | |
| 80 password_manager::CredentialInfo /* credential */) | |
| 81 | |
| 82 // Reject the credential request in response to a | |
| 83 // CredentialManagerHostMsg_RequestCredential message. | |
| 84 IPC_MESSAGE_ROUTED2(CredentialManagerMsg_RejectCredentialRequest, | |
| 85 int /* request_id */, | |
| 86 blink::WebCredentialManagerError /* rejection_reason */) | |
| OLD | NEW |