Index: public/platform/WebDOMException.h |
diff --git a/public/platform/WebDOMException.h b/public/platform/WebDOMException.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..3b8443a04b5d6e7519e82ac2b83a4aa67f52ffd5 |
--- /dev/null |
+++ b/public/platform/WebDOMException.h |
@@ -0,0 +1,56 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef WebDOMException_h |
+#define WebDOMException_h |
+ |
+#include "public/platform/WebCommon.h" |
+#include "public/platform/WebPrivatePtr.h" |
+#include "public/platform/WebString.h" |
+ |
+namespace v8 { |
+class Value; |
+template <class T> class Handle; |
+} |
+ |
+namespace WebCore { class DOMException; } |
+ |
+namespace blink { |
+ |
+class WebDOMException { |
+public: |
+ ~WebDOMException() { reset(); } |
+ |
+ WebDOMException() { } |
+ WebDOMException(const WebDOMException& b) { assign(b); } |
+ WebDOMException& operator=(const WebDOMException& b) |
+ { |
+ assign(b); |
+ return *this; |
+ } |
+ |
+ BLINK_EXPORT static WebDOMException create(unsigned short code, const WebString& name, const WebString& message); |
+ |
+ BLINK_EXPORT void reset(); |
+ BLINK_EXPORT void assign(const WebDOMException&); |
+ |
+ BLINK_EXPORT unsigned short code() const; |
+ BLINK_EXPORT WebString name() const; |
+ BLINK_EXPORT WebString message() const; |
+ |
+ BLINK_EXPORT v8::Handle<v8::Value> toV8Value(); |
+ |
+#if BLINK_IMPLEMENTATION |
+ explicit WebDOMException(const PassRefPtrWillBeRawPtr<WebCore::DOMException>&); |
+ WebDOMException& operator=(const PassRefPtrWillBeRawPtr<WebCore::DOMException>&); |
+#endif |
+ |
+protected: |
+ WebPrivatePtr<WebCore::DOMException> m_private; |
+}; |
+ |
+} // namespace blink |
+ |
+#endif // WebDOMException_h |
+ |