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

Unified Diff: Source/modules/crypto/WorkerCrypto.h

Issue 16820007: Expose crypto.getRandomValues() to workers. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: Source/modules/crypto/WorkerCrypto.h
diff --git a/Source/modules/webmidi/MIDIErrorCallback.h b/Source/modules/crypto/WorkerCrypto.h
similarity index 81%
copy from Source/modules/webmidi/MIDIErrorCallback.h
copy to Source/modules/crypto/WorkerCrypto.h
index 2684f7bd58b9d03d854c4da09a60386f00039cd7..5bbb3f5d39eba918f40aab6f91439d3993547e81 100644
--- a/Source/modules/webmidi/MIDIErrorCallback.h
+++ b/Source/modules/crypto/WorkerCrypto.h
@@ -28,21 +28,26 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef MIDIErrorCallback_h
-#define MIDIErrorCallback_h
+#ifndef WorkerCrypto_h
+#define WorkerCrypto_h
+#include "bindings/v8/ScriptWrappable.h"
+#include "wtf/Forward.h"
+#include "wtf/PassRefPtr.h"
#include "wtf/RefCounted.h"
namespace WebCore {
-class DOMError;
+typedef int ExceptionCode;
-class MIDIErrorCallback : public RefCounted<MIDIErrorCallback> {
+class WorkerCrypto : public ScriptWrappable, public RefCounted<WorkerCrypto> {
public:
- virtual ~MIDIErrorCallback() { }
- virtual bool handleEvent(DOMError*) = 0;
+ static PassRefPtr<WorkerCrypto> create() { return adoptRef(new WorkerCrypto()); }
+
+private:
+ WorkerCrypto();
};
-} // namespace WebCore
+}
-#endif // MIDIErrorCallback_h
+#endif

Powered by Google App Engine
This is Rietveld 408576698