Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(188)

Side by Side Diff: components/password_manager/content/renderer/credential_manager_client.h

Issue 613993002: Credential Manager: Reject credential request if an outstanding request is pending. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@yay
Patch Set: Rebase. Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_PASSWORD_MANAGER_CONTENT_RENDERER_CREDENTIAL_MANAGER_CLIENT_H _ 5 #ifndef COMPONENTS_PASSWORD_MANAGER_CONTENT_RENDERER_CREDENTIAL_MANAGER_CLIENT_H _
6 #define COMPONENTS_PASSWORD_MANAGER_CONTENT_RENDERER_CREDENTIAL_MANAGER_CLIENT_H _ 6 #define COMPONENTS_PASSWORD_MANAGER_CONTENT_RENDERER_CREDENTIAL_MANAGER_CLIENT_H _
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/id_map.h" 10 #include "base/id_map.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 52
53 // RenderViewObserver: 53 // RenderViewObserver:
54 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; 54 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
55 55
56 // Message handlers for messages from the browser process: 56 // Message handlers for messages from the browser process:
57 virtual void OnAcknowledgeFailedSignIn(int request_id); 57 virtual void OnAcknowledgeFailedSignIn(int request_id);
58 virtual void OnAcknowledgeSignedIn(int request_id); 58 virtual void OnAcknowledgeSignedIn(int request_id);
59 virtual void OnAcknowledgeSignedOut(int request_id); 59 virtual void OnAcknowledgeSignedOut(int request_id);
60 virtual void OnSendCredential(int request_id, 60 virtual void OnSendCredential(int request_id,
61 const CredentialInfo& credential_info); 61 const CredentialInfo& credential_info);
62 virtual void OnRejectCredentialRequest(int request_id);
62 63
63 // blink::WebCredentialManager: 64 // blink::WebCredentialManager:
64 virtual void dispatchFailedSignIn( 65 virtual void dispatchFailedSignIn(
65 const blink::WebCredential& credential, 66 const blink::WebCredential& credential,
66 WebCredentialManagerClient::NotificationCallbacks* callbacks) OVERRIDE; 67 WebCredentialManagerClient::NotificationCallbacks* callbacks);
67 virtual void dispatchSignedIn( 68 virtual void dispatchSignedIn(
68 const blink::WebCredential& credential, 69 const blink::WebCredential& credential,
69 WebCredentialManagerClient::NotificationCallbacks* callbacks) OVERRIDE; 70 WebCredentialManagerClient::NotificationCallbacks* callbacks);
70 virtual void dispatchSignedOut(NotificationCallbacks* callbacks) OVERRIDE; 71 virtual void dispatchSignedOut(NotificationCallbacks* callbacks);
71 virtual void dispatchRequest( 72 virtual void dispatchRequest(
72 bool zero_click_only, 73 bool zero_click_only,
73 const blink::WebVector<blink::WebURL>& federations, 74 const blink::WebVector<blink::WebURL>& federations,
74 RequestCallbacks* callbacks) OVERRIDE; 75 RequestCallbacks* callbacks);
75 76
76 private: 77 private:
77 typedef IDMap<blink::WebCredentialManagerClient::RequestCallbacks, 78 typedef IDMap<blink::WebCredentialManagerClient::RequestCallbacks,
78 IDMapOwnPointer> RequestCallbacksMap; 79 IDMapOwnPointer> RequestCallbacksMap;
79 typedef IDMap<blink::WebCredentialManagerClient::NotificationCallbacks, 80 typedef IDMap<blink::WebCredentialManagerClient::NotificationCallbacks,
80 IDMapOwnPointer> NotificationCallbacksMap; 81 IDMapOwnPointer> NotificationCallbacksMap;
81 82
82 void RespondToNotificationCallback(int request_id, 83 void RespondToNotificationCallback(int request_id,
83 NotificationCallbacksMap* map); 84 NotificationCallbacksMap* map);
84 85
85 // Track the various blink::WebCredentialManagerClient::*Callbacks objects 86 // Track the various blink::WebCredentialManagerClient::*Callbacks objects
86 // generated from Blink. This class takes ownership of these objects. 87 // generated from Blink. This class takes ownership of these objects.
87 NotificationCallbacksMap failed_sign_in_callbacks_; 88 NotificationCallbacksMap failed_sign_in_callbacks_;
88 NotificationCallbacksMap signed_in_callbacks_; 89 NotificationCallbacksMap signed_in_callbacks_;
89 NotificationCallbacksMap signed_out_callbacks_; 90 NotificationCallbacksMap signed_out_callbacks_;
90 RequestCallbacksMap request_callbacks_; 91 RequestCallbacksMap request_callbacks_;
91 92
92 DISALLOW_COPY_AND_ASSIGN(CredentialManagerClient); 93 DISALLOW_COPY_AND_ASSIGN(CredentialManagerClient);
93 }; 94 };
94 95
95 } // namespace password_manager 96 } // namespace password_manager
96 97
97 #endif // COMPONENTS_PASSWORD_MANAGER_CONTENT_RENDERER_CREDENTIAL_MANAGER_CLIEN T_H_ 98 #endif // COMPONENTS_PASSWORD_MANAGER_CONTENT_RENDERER_CREDENTIAL_MANAGER_CLIEN T_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698