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

Unified Diff: public/platform/WebDOMException.h

Issue 283423005: Use Promises for screen.lockOrientation(). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 7 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: 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
+
« Source/modules/screen_orientation/LockOrientationCallback.h ('K') | « public/platform/Platform.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698