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(password_manager::CredentialType, |
| 25 password_manager::CREDENTIAL_TYPE_LAST); |
| 26 |
| 27 IPC_STRUCT_TRAITS_BEGIN(password_manager::CredentialInfo) |
| 28 IPC_STRUCT_TRAITS_MEMBER(type) |
| 29 IPC_STRUCT_TRAITS_MEMBER(id) |
| 30 IPC_STRUCT_TRAITS_MEMBER(name) |
| 31 IPC_STRUCT_TRAITS_MEMBER(avatar) |
| 32 IPC_STRUCT_TRAITS_MEMBER(password) |
| 33 IPC_STRUCT_TRAITS_MEMBER(federation) |
| 34 IPC_STRUCT_TRAITS_END() |
| 35 |
| 36 // ---------------------------------------------------------------------------- |
| 37 // Messages sent from the renderer to the browser |
| 38 |
| 39 // Passes the notification from 'navigator.credentials.notifyFailedSignIn()' up |
| 40 // to the browser process in order to suppress the automatic bubble which would |
| 41 // pop up in order to prompt the user to save the credential she used for |
| 42 // signin. The browser process will respond with a |
| 43 // CredentialManagerMsg_AcknowledgeFailedSignedIn message. |
| 44 IPC_MESSAGE_ROUTED2(CredentialManagerHostMsg_NotifyFailedSignIn, |
| 45 int /* request_id */, |
| 46 password_manager::CredentialInfo /* credential */) |
| 47 |
| 48 // Passes the notification from 'navigator.credentials.notifySignedIn()' up to |
| 49 // the browser process in order to (among other things) prompt the user to save |
| 50 // the credential she used for signin. The browser process will respond with a |
| 51 // CredentialManagerMsg_AcknowledgeSignedIn message. |
| 52 IPC_MESSAGE_ROUTED2(CredentialManagerHostMsg_NotifySignedIn, |
| 53 int /* request_id */, |
| 54 password_manager::CredentialInfo /* credential */) |
| 55 |
| 56 // Passes the notification from 'navigator.credentials.notifySignedOut()' up to |
| 57 // the browser process in order to clear the "zeroclick" bit on that origin's |
| 58 // stored credentials. The browser process will respond with a |
| 59 // CredentialManagerMsg_AcknowledgeSignedOut message. |
| 60 IPC_MESSAGE_ROUTED1(CredentialManagerHostMsg_NotifySignedOut, |
| 61 int /* request_id */) |
| 62 |
| 63 // Requests a credential from the browser process in response to a page calling |
| 64 // 'navigator.credentials.request()'. The browser process will respond with a |
| 65 // CredentialManagerMsg_SendCredential message. |
| 66 IPC_MESSAGE_ROUTED3(CredentialManagerHostMsg_RequestCredential, |
| 67 int /* request_id */, |
| 68 bool /* zero_click_only */, |
| 69 std::vector<GURL> /* federations */) |
| 70 |
| 71 // ---------------------------------------------------------------------------- |
| 72 // Messages sent from the browser to the renderer |
| 73 |
| 74 // Notify the renderer that the browser process has finished processing a |
| 75 // CredentialManagerHostMsg_NotifyFailedSignedIn message. |
| 76 IPC_MESSAGE_ROUTED1(CredentialManagerMsg_AcknowledgeFailedSignIn, |
| 77 int /* request_id */); |
| 78 |
| 79 // Notify the renderer that the browser process has finished processing a |
| 80 // CredentialManagerHostMsg_NotifySignedIn message. |
| 81 IPC_MESSAGE_ROUTED1(CredentialManagerMsg_AcknowledgeSignedIn, |
| 82 int /* request_id */); |
| 83 |
| 84 // Notify the renderer that the browser process has finished processing a |
| 85 // CredentialManagerHostMsg_NotifySignedOut message. |
| 86 IPC_MESSAGE_ROUTED1(CredentialManagerMsg_AcknowledgeSignedOut, |
| 87 int /* request_id */); |
| 88 |
| 89 // Send a credential to the renderer in response to a |
| 90 // CredentialManagerHostMsg_RequestCredential message. |
| 91 IPC_MESSAGE_ROUTED2(CredentialManagerMsg_SendCredential, |
| 92 int /* request_id */, |
| 93 password_manager::CredentialInfo /* credential */) |
OLD | NEW |