Chromium Code Reviews| 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 #ifndef COMPONENTS_PASSWORD_MANAGER_CONTENT_RENDERER_CREDENTIAL_MANAGER_DISPATCH ER_H_ | |
| 6 #define COMPONENTS_PASSWORD_MANAGER_CONTENT_RENDERER_CREDENTIAL_MANAGER_DISPATCH ER_H_ | |
| 7 | |
| 8 #include "base/basictypes.h" | |
| 9 #include "base/compiler_specific.h" | |
| 10 #include "base/id_map.h" | |
| 11 #include "ipc/ipc_listener.h" | |
| 12 #include "third_party/WebKit/public/platform/WebCredential.h" | |
| 13 #include "third_party/WebKit/public/platform/WebCredentialManager.h" | |
| 14 #include "third_party/WebKit/public/platform/WebString.h" | |
| 15 #include "third_party/WebKit/public/platform/WebURL.h" | |
| 16 #include "third_party/WebKit/public/platform/WebVector.h" | |
| 17 | |
| 18 namespace password_manager { | |
| 19 | |
| 20 struct CredentialManagerCredentialInfo; | |
| 21 | |
| 22 class CredentialManagerDispatcher : public blink::WebCredentialManager, | |
| 23 public IPC::Listener { | |
| 24 public: | |
| 25 CredentialManagerDispatcher(); | |
| 26 virtual ~CredentialManagerDispatcher(); | |
| 27 | |
| 28 // IPC::Listener: | |
| 29 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | |
| 30 | |
| 31 // Message handlers for messages from the browser process: | |
| 32 void OnFailedSignInResponse(int request_id); | |
| 33 void OnSignedInResponse(int request_id); | |
| 34 void OnSignedOutResponse(int request_id); | |
| 35 void OnRequestResponse(int request_id, const CredentialManagerCredentialInfo&) ; | |
| 36 | |
| 37 // blink::WebCredentialManager: | |
| 38 virtual void dispatchFailedSignIn(const blink::WebCredential&, NotificationCal lbacks*) OVERRIDE; | |
|
Ilya Sherman
2014/08/15 20:42:38
Hmm, what's a NotificationCallbacks?
Mike West
2014/08/19 08:37:15
Changed this to blink::WebCredentialManager::Notif
| |
| 39 virtual void dispatchSignedIn(const blink::WebCredential&, NotificationCallbac ks*) OVERRIDE; | |
| 40 virtual void dispatchSignedOut(NotificationCallbacks*) OVERRIDE; | |
| 41 virtual void dispatchRequest(bool zeroClickOnly, const blink::WebVector<blink: :WebURL>& federations, RequestCallbacks*) OVERRIDE; | |
| 42 | |
| 43 private: | |
| 44 typedef IDMap<RequestCallbacks, IDMapOwnPointer> RequestCallbacksMap; | |
| 45 typedef IDMap<NotificationCallbacks, IDMapOwnPointer> NotificationCallbacksMap ; | |
| 46 | |
| 47 NotificationCallbacksMap failed_sign_in_callbacks_; | |
| 48 NotificationCallbacksMap signed_in_callbacks_; | |
| 49 NotificationCallbacksMap signed_out_callbacks_; | |
| 50 RequestCallbacksMap request_callbacks_; | |
| 51 | |
| 52 int routing_id_; | |
| 53 | |
| 54 DISALLOW_COPY_AND_ASSIGN(CredentialManagerDispatcher); | |
| 55 }; | |
| 56 | |
| 57 } // namespace password_manager | |
| 58 | |
| 59 #endif // COMPONENTS_PASSWORD_MANAGER_CONTENT_RENDERER_CREDENTIAL_MANAGER_DISPA TCHER_H_ | |
| 60 | |
| OLD | NEW |