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

Unified Diff: Source/modules/presentation/PresentationError.cpp

Issue 940503002: [PresentationAPI] Added plumbing for start/joinSession from JS to platform (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Full change Created 5 years, 10 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
« no previous file with comments | « Source/modules/presentation/PresentationError.h ('k') | Source/modules/presentation/PresentationSession.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/presentation/PresentationError.cpp
diff --git a/Source/modules/presentation/PresentationError.cpp b/Source/modules/presentation/PresentationError.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..f513f21bc1988e43e241d80531b76c734bc6867f
--- /dev/null
+++ b/Source/modules/presentation/PresentationError.cpp
@@ -0,0 +1,32 @@
+// Copyright 2015 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.
+
+#include "config.h"
+#include "modules/presentation/PresentationError.h"
+
+#include "core/dom/DOMException.h"
+#include "core/dom/ExceptionCode.h"
+#include "public/platform/modules/presentation/WebPresentationError.h"
+#include "wtf/OwnPtr.h"
+
+namespace blink {
+
+// static
+PassRefPtrWillBeRawPtr<DOMException> PresentationError::take(WebPresentationError* errorRaw)
+{
+ ASSERT(errorRaw);
+ OwnPtr<WebPresentationError> error = adoptPtr(errorRaw);
+
+ // TODO(avayvod): figure out the mapping between WebPresentationError and
+ // DOMException error codes.
+ return DOMException::create(InvalidAccessError, error->message);
+}
+
+// static
+void PresentationError::dispose(WebPresentationError* error)
+{
+ delete error;
+}
+
+} // namespace blink
« no previous file with comments | « Source/modules/presentation/PresentationError.h ('k') | Source/modules/presentation/PresentationSession.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698