OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2015 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 IOS_CHROME_BROWSER_PASSWORDS_JS_CREDENTIAL_MANAGER_H_ | |
6 #define IOS_CHROME_BROWSER_PASSWORDS_JS_CREDENTIAL_MANAGER_H_ | |
7 | |
8 #include "ios/web/public/web_state/credential.h" | |
9 #import "ios/web/public/web_state/js/crw_js_injection_manager.h" | |
10 | |
11 namespace base { | |
12 class DictionaryValue; | |
13 } // namespace base | |
14 | |
15 namespace ios { | |
droger
2015/11/18 16:24:17
Remove the ios:: namespace
vabr (Chromium)
2015/11/18 16:52:28
Done.
| |
16 namespace passwords { | |
vabr (Chromium)
2015/11/18 16:55:13
Hm, I see you only advised against the 'ios' here,
droger
2015/11/18 17:07:40
Some people argue that we should not use any names
droger
2015/11/18 17:11:27
This discussion is also related:
https://groups.go
vabr (Chromium)
2015/11/18 17:14:06
As an alternative I can just prefix all the names
| |
17 // Constants for rejecting requests. | |
18 extern const char kPendingRequestErrorType[]; | |
19 extern const char kPendingRequestErrorMessage[]; | |
20 extern const char kSecurityErrorType[]; | |
21 extern const char kPasswordStoreUnavailableErrorType[]; | |
22 extern const char kPasswordStoreUnavailableErrorMessage[]; | |
23 extern const char kSecurityErrorMessageUntrustedOrigin[]; | |
24 } // namespace passwords | |
25 } // namespace ios | |
26 | |
27 // Injects the JavaScript that implements the request credentials API and | |
28 // provides an app-side interface for interacting with it. | |
29 @interface JSCredentialManager : CRWJSInjectionManager | |
30 | |
31 // Resolves the JavaScript Promise associated with |requestID| with the | |
32 // specified |credential|. |completionHandler| will be invoked after the | |
33 // operation has completed with YES if successful. | |
34 - (void)resolvePromiseWithRequestID:(NSInteger)requestID | |
35 credential:(const web::Credential&)credential | |
36 completionHandler:(void (^)(BOOL))completionHandler; | |
37 | |
38 // Resolves the JavaScript Promise associated with |requestID|. | |
39 // |completionHandler| will be invoked after the operation has completed with | |
40 // YES if successful. | |
41 - (void)resolvePromiseWithRequestID:(NSInteger)requestID | |
42 completionHandler:(void (^)(BOOL))completionHandler; | |
43 | |
44 // Rejects the JavaScript Promise associated with |requestID| with an Error of | |
45 // the specified |errorType| and |message|. |completionHandler| will be invoked | |
46 // after the operation has completed with YES if successful. | |
47 - (void)rejectPromiseWithRequestID:(NSInteger)requestID | |
48 errorType:(NSString*)errorType | |
49 message:(NSString*)message | |
50 completionHandler:(void (^)(BOOL))completionHandler; | |
51 | |
52 @end | |
53 | |
54 #endif // IOS_CHROME_BROWSER_PASSWORDS_JS_CREDENTIAL_MANAGER_H_ | |
OLD | NEW |