OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 namespace WebCore { | 43 namespace WebCore { |
44 | 44 |
45 // Wrapper around a Promise to notify completion of the crypto operation. | 45 // Wrapper around a Promise to notify completion of the crypto operation. |
46 // Platform cannot know about Promises which are declared in bindings. | 46 // Platform cannot know about Promises which are declared in bindings. |
47 class CryptoResultImpl FINAL : public CryptoResult, public ContextLifecycleObser
ver { | 47 class CryptoResultImpl FINAL : public CryptoResult, public ContextLifecycleObser
ver { |
48 public: | 48 public: |
49 ~CryptoResultImpl(); | 49 ~CryptoResultImpl(); |
50 | 50 |
51 static PassRefPtr<CryptoResultImpl> create(); | 51 static PassRefPtr<CryptoResultImpl> create(); |
52 | 52 |
53 virtual void completeWithError() OVERRIDE; | 53 virtual void completeWithError(blink::WebCryptoErrorType, const blink::WebSt
ring&) OVERRIDE; |
54 virtual void completeWithError(const blink::WebString&) OVERRIDE; | |
55 virtual void completeWithBuffer(const blink::WebArrayBuffer&) OVERRIDE; | 54 virtual void completeWithBuffer(const blink::WebArrayBuffer&) OVERRIDE; |
56 virtual void completeWithBoolean(bool) OVERRIDE; | 55 virtual void completeWithBoolean(bool) OVERRIDE; |
57 virtual void completeWithKey(const blink::WebCryptoKey&) OVERRIDE; | 56 virtual void completeWithKey(const blink::WebCryptoKey&) OVERRIDE; |
58 virtual void completeWithKeyPair(const blink::WebCryptoKey& publicKey, const
blink::WebCryptoKey& privateKey) OVERRIDE; | 57 virtual void completeWithKeyPair(const blink::WebCryptoKey& publicKey, const
blink::WebCryptoKey& privateKey) OVERRIDE; |
59 | 58 |
60 ScriptPromise promise() { return m_promiseResolver->promise(); } | 59 ScriptPromise promise() { return m_promiseResolver->promise(); } |
61 | 60 |
62 private: | 61 private: |
63 CryptoResultImpl(ExecutionContext*); | 62 CryptoResultImpl(ExecutionContext*); |
64 void finish(); | 63 void finish(); |
(...skipping 11 matching lines...) Expand all Loading... |
76 | 75 |
77 #if !ASSERT_DISABLED | 76 #if !ASSERT_DISABLED |
78 ThreadIdentifier m_owningThread; | 77 ThreadIdentifier m_owningThread; |
79 bool m_finished; | 78 bool m_finished; |
80 #endif | 79 #endif |
81 }; | 80 }; |
82 | 81 |
83 } // namespace WebCore | 82 } // namespace WebCore |
84 | 83 |
85 #endif | 84 #endif |
OLD | NEW |