Index: components/password_manager/content/common/credential_manager_messages.h |
diff --git a/components/password_manager/content/common/credential_manager_messages.h b/components/password_manager/content/common/credential_manager_messages.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..f18d76493e9decb6b49d40f907e7ce6dffb3eccb |
--- /dev/null |
+++ b/components/password_manager/content/common/credential_manager_messages.h |
@@ -0,0 +1,66 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+// Message definition file, included multiple times, hence no include guard. |
+ |
+#include <string> |
+#include <vector> |
+ |
+#include "base/strings/string16.h" |
+#include "components/password_manager/content/common/credential_manager_types.h" |
+#include "content/public/common/common_param_traits.h" |
+#include "content/public/common/common_param_traits_macros.h" |
+#include "ipc/ipc_message_macros.h" |
+#include "ipc/ipc_message_utils.h" |
+#include "third_party/WebKit/public/platform/WebCredentialManagerError.h" |
+#include "url/gurl.h" |
+ |
+#define IPC_MESSAGE_START CredentialManagerMsgStart |
+ |
+IPC_ENUM_TRAITS_MAX_VALUE(blink::WebCredentialManagerError::ErrorType, |
+ blink::WebCredentialManagerError::ErrorTypeLast); |
+ |
+IPC_ENUM_TRAITS_MAX_VALUE( |
+ password_manager::CredentialManagerCredentialType, |
+ password_manager::CREDENTIAL_MANAGER_CREDENTIAL_TYPE_LAST); |
+ |
+IPC_STRUCT_TRAITS_BEGIN(password_manager::CredentialManagerCredentialInfo) |
+ IPC_STRUCT_TRAITS_MEMBER(type) |
+ IPC_STRUCT_TRAITS_MEMBER(id) |
+ IPC_STRUCT_TRAITS_MEMBER(name) |
+ IPC_STRUCT_TRAITS_MEMBER(avatarURL) |
+ IPC_STRUCT_TRAITS_MEMBER(data) |
+IPC_STRUCT_TRAITS_END() |
+ |
+// ---------------------------------------------------------------------------- |
+// Messages sent from the renderer to the browser |
+ |
+IPC_MESSAGE_ROUTED2(CredentialManagerHostMsg_NotifySignedIn, |
Ilya Sherman
2014/08/15 20:42:37
You'll want to document each of the messages.
Mike West
2014/08/19 08:37:15
Indeed!
|
+ int /* request_id */, |
Ilya Sherman
2014/08/15 20:42:37
nit: alignment (applies throughout)
Mike West
2014/08/19 08:37:15
Done.
|
+ password_manager::CredentialManagerCredentialInfo) |
Ilya Sherman
2014/08/15 20:42:37
nit: Please include a variable name for this one t
Mike West
2014/08/19 08:37:15
Done.
|
+ |
+IPC_MESSAGE_ROUTED2(CredentialManagerHostMsg_NotifyFailedSignIn, |
+ int /* request_id */, |
+ password_manager::CredentialManagerCredentialInfo) |
+ |
+IPC_MESSAGE_ROUTED1(CredentialManagerHostMsg_NotifySignedOut, |
+ int /* request_id */) |
+ |
+IPC_MESSAGE_ROUTED3(CredentialManagerHostMsg_Request, |
Ilya Sherman
2014/08/15 20:42:37
nit: "Request" is a little too generic -- perhaps
Mike West
2014/08/19 08:37:15
Done.
|
+ int /* request_id */, |
+ bool /* zeroClickOnly */, |
Ilya Sherman
2014/08/15 20:42:37
nit: hacker_case
Mike West
2014/08/19 08:37:15
:(
Or ':_(', I guess.
|
+ std::vector<GURL> /* federations */) |
+ |
+// ---------------------------------------------------------------------------- |
+// Messages sent from the browser to the renderer |
+ |
+IPC_MESSAGE_ROUTED1(CredentialManagerMsg_AcknowledgeFailedSignIn, |
+ int /* request_id */); |
+IPC_MESSAGE_ROUTED1(CredentialManagerMsg_AcknowledgeSignedIn, |
+ int /* request_id */); |
+IPC_MESSAGE_ROUTED1(CredentialManagerMsg_AcknowledgeSignedOut, |
+ int /* request_id */); |
+IPC_MESSAGE_ROUTED2(CredentialManagerMsg_RequestResponse, |
Ilya Sherman
2014/08/15 20:42:37
nit: This sounds like it is requesting a response,
Mike West
2014/08/19 08:37:15
Done.
|
+ int /* request_id */, |
+ password_manager::CredentialManagerCredentialInfo); |