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

Unified Diff: third_party/WebKit/Source/modules/permissions/PermissionCallback.cpp

Issue 2108003002: Merge //content/child/permissions into Blink's permissions module. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 4 years, 5 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: third_party/WebKit/Source/modules/permissions/PermissionCallback.cpp
diff --git a/third_party/WebKit/Source/modules/permissions/PermissionCallback.cpp b/third_party/WebKit/Source/modules/permissions/PermissionCallback.cpp
deleted file mode 100644
index 0ea00dd1a4c9eaf3f9f40c03ef79f2222c8644c8..0000000000000000000000000000000000000000
--- a/third_party/WebKit/Source/modules/permissions/PermissionCallback.cpp
+++ /dev/null
@@ -1,39 +0,0 @@
-// 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 "modules/permissions/PermissionCallback.h"
-
-#include "bindings/core/v8/ScriptPromiseResolver.h"
-#include "modules/permissions/PermissionStatus.h"
-
-namespace blink {
-
-PermissionCallback::PermissionCallback(ScriptPromiseResolver* resolver, WebPermissionType permissionType)
- : m_resolver(resolver)
- , m_permissionType(permissionType)
-{
- ASSERT(m_resolver);
-}
-
-PermissionCallback::~PermissionCallback()
-{
-}
-
-void PermissionCallback::onSuccess(WebPermissionStatus permissionStatus)
-{
- if (!m_resolver->getExecutionContext() || m_resolver->getExecutionContext()->activeDOMObjectsAreStopped()) {
- return;
- }
- m_resolver->resolve(PermissionStatus::take(m_resolver.get(), permissionStatus, m_permissionType));
-}
-
-void PermissionCallback::onError()
-{
- if (!m_resolver->getExecutionContext() || m_resolver->getExecutionContext()->activeDOMObjectsAreStopped()) {
- return;
- }
- m_resolver->reject();
-}
-
-} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698