blob: 996107a5d428996cfbd4ad71c3bbba2127631147 [file] [log] [blame]
// 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 PermissionCallbacks_h
#define PermissionCallbacks_h
#include "platform/PlatformExport.h"
#include "wtf/Functional.h"
#include "wtf/Noncopyable.h"
#include "wtf/PassOwnPtr.h"
namespace blink {
class PLATFORM_EXPORT PermissionCallbacks {
static PassOwnPtr<PermissionCallbacks> create(const Closure& allowed, const Closure& denied);
virtual ~PermissionCallbacks() { }
void onAllowed() { m_allowed(); }
void onDenied() { m_denied(); }
PermissionCallbacks(const Closure& allowed, const Closure& denied);
Closure m_allowed;
Closure m_denied;
} // namespace blink
#endif // PermissionCallbacks_h