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 WebDOMException_h |
| 6 #define WebDOMException_h |
| 7 |
| 8 #include "public/platform/WebCommon.h" |
| 9 #include "public/platform/WebPrivatePtr.h" |
| 10 #include "public/platform/WebString.h" |
| 11 |
| 12 namespace v8 { |
| 13 class Value; |
| 14 template <class T> class Handle; |
| 15 } |
| 16 |
| 17 namespace WebCore { class DOMException; } |
| 18 |
| 19 namespace blink { |
| 20 |
| 21 class WebDOMException { |
| 22 public: |
| 23 ~WebDOMException() { reset(); } |
| 24 |
| 25 WebDOMException() { } |
| 26 WebDOMException(const WebDOMException& b) { assign(b); } |
| 27 WebDOMException& operator=(const WebDOMException& b) |
| 28 { |
| 29 assign(b); |
| 30 return *this; |
| 31 } |
| 32 |
| 33 BLINK_EXPORT static WebDOMException create(unsigned short code, const WebStr
ing& name, const WebString& message); |
| 34 |
| 35 BLINK_EXPORT void reset(); |
| 36 BLINK_EXPORT void assign(const WebDOMException&); |
| 37 |
| 38 BLINK_EXPORT unsigned short code() const; |
| 39 BLINK_EXPORT WebString name() const; |
| 40 BLINK_EXPORT WebString message() const; |
| 41 |
| 42 BLINK_EXPORT v8::Handle<v8::Value> toV8Value(); |
| 43 |
| 44 #if BLINK_IMPLEMENTATION |
| 45 explicit WebDOMException(const PassRefPtrWillBeRawPtr<WebCore::DOMException>
&); |
| 46 WebDOMException& operator=(const PassRefPtrWillBeRawPtr<WebCore::DOMExceptio
n>&); |
| 47 #endif |
| 48 |
| 49 protected: |
| 50 WebPrivatePtr<WebCore::DOMException> m_private; |
| 51 }; |
| 52 |
| 53 } // namespace blink |
| 54 |
| 55 #endif // WebDOMException_h |
| 56 |
OLD | NEW |