OLD | NEW |
---|---|
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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
44 // Note that each RenderView's WebView holds a pointer to the | 44 // Note that each RenderView's WebView holds a pointer to the |
45 // CredentialManagerClient (set in 'OnRenderViewCreated()'). The client is | 45 // CredentialManagerClient (set in 'OnRenderViewCreated()'). The client is |
46 // guaranteed to outlive the views that point to it. | 46 // guaranteed to outlive the views that point to it. |
47 class CredentialManagerClient : public blink::WebCredentialManagerClient, | 47 class CredentialManagerClient : public blink::WebCredentialManagerClient, |
48 public content::RenderViewObserver { | 48 public content::RenderViewObserver { |
49 public: | 49 public: |
50 explicit CredentialManagerClient(content::RenderView* render_view); | 50 explicit CredentialManagerClient(content::RenderView* render_view); |
51 virtual ~CredentialManagerClient(); | 51 virtual ~CredentialManagerClient(); |
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 | 62 |
63 // blink::WebCredentialManager: | 63 // blink::WebCredentialManager: |
64 virtual void dispatchFailedSignIn( | 64 virtual void dispatchFailedSignIn( |
65 const blink::WebCredential& credential, | 65 const blink::WebCredential& credential, |
66 WebCredentialManagerClient::NotificationCallbacks* callbacks) OVERRIDE; | 66 WebCredentialManagerClient::NotificationCallbacks* callbacks) override; |
vabr (Chromium)
2014/09/30 14:39:14
Actually, methods from Blink should have no overri
Sunil Ratnu
2014/09/30 15:10:51
Oh! I did not know that. Made the changes as per y
| |
67 virtual void dispatchSignedIn( | 67 virtual void dispatchSignedIn( |
68 const blink::WebCredential& credential, | 68 const blink::WebCredential& credential, |
69 WebCredentialManagerClient::NotificationCallbacks* callbacks) OVERRIDE; | 69 WebCredentialManagerClient::NotificationCallbacks* callbacks) override; |
70 virtual void dispatchSignedOut(NotificationCallbacks* callbacks) OVERRIDE; | 70 virtual void dispatchSignedOut(NotificationCallbacks* callbacks) override; |
71 virtual void dispatchRequest( | 71 virtual void dispatchRequest( |
72 bool zero_click_only, | 72 bool zero_click_only, |
73 const blink::WebVector<blink::WebURL>& federations, | 73 const blink::WebVector<blink::WebURL>& federations, |
74 RequestCallbacks* callbacks) OVERRIDE; | 74 RequestCallbacks* callbacks) override; |
75 | 75 |
76 private: | 76 private: |
77 typedef IDMap<blink::WebCredentialManagerClient::RequestCallbacks, | 77 typedef IDMap<blink::WebCredentialManagerClient::RequestCallbacks, |
78 IDMapOwnPointer> RequestCallbacksMap; | 78 IDMapOwnPointer> RequestCallbacksMap; |
79 typedef IDMap<blink::WebCredentialManagerClient::NotificationCallbacks, | 79 typedef IDMap<blink::WebCredentialManagerClient::NotificationCallbacks, |
80 IDMapOwnPointer> NotificationCallbacksMap; | 80 IDMapOwnPointer> NotificationCallbacksMap; |
81 | 81 |
82 void RespondToNotificationCallback(int request_id, | 82 void RespondToNotificationCallback(int request_id, |
83 NotificationCallbacksMap* map); | 83 NotificationCallbacksMap* map); |
84 | 84 |
85 // Track the various blink::WebCredentialManagerClient::*Callbacks objects | 85 // Track the various blink::WebCredentialManagerClient::*Callbacks objects |
86 // generated from Blink. This class takes ownership of these objects. | 86 // generated from Blink. This class takes ownership of these objects. |
87 NotificationCallbacksMap failed_sign_in_callbacks_; | 87 NotificationCallbacksMap failed_sign_in_callbacks_; |
88 NotificationCallbacksMap signed_in_callbacks_; | 88 NotificationCallbacksMap signed_in_callbacks_; |
89 NotificationCallbacksMap signed_out_callbacks_; | 89 NotificationCallbacksMap signed_out_callbacks_; |
90 RequestCallbacksMap request_callbacks_; | 90 RequestCallbacksMap request_callbacks_; |
91 | 91 |
92 DISALLOW_COPY_AND_ASSIGN(CredentialManagerClient); | 92 DISALLOW_COPY_AND_ASSIGN(CredentialManagerClient); |
93 }; | 93 }; |
94 | 94 |
95 } // namespace password_manager | 95 } // namespace password_manager |
96 | 96 |
97 #endif // COMPONENTS_PASSWORD_MANAGER_CONTENT_RENDERER_CREDENTIAL_MANAGER_CLIEN T_H_ | 97 #endif // COMPONENTS_PASSWORD_MANAGER_CONTENT_RENDERER_CREDENTIAL_MANAGER_CLIEN T_H_ |
OLD | NEW |