Home | History | Annotate | Download | only in platform
      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 WebPermissionCallbacks_h
      6 #define WebPermissionCallbacks_h
      7 
      8 #include "WebPrivatePtr.h"
      9 
     10 namespace WTF { template <typename T> class PassOwnPtr; }
     11 
     12 namespace blink {
     13 
     14 class PermissionCallbacks;
     15 class WebPermissionCallbacksPrivate;
     16 
     17 class WebPermissionCallbacks {
     18 public:
     19     ~WebPermissionCallbacks() { reset(); }
     20     WebPermissionCallbacks() { }
     21     WebPermissionCallbacks(const WebPermissionCallbacks& c) { assign(c); }
     22     WebPermissionCallbacks& operator=(const WebPermissionCallbacks& c)
     23     {
     24         assign(c);
     25         return *this;
     26     }
     27 
     28     BLINK_PLATFORM_EXPORT void reset();
     29     BLINK_PLATFORM_EXPORT void assign(const WebPermissionCallbacks&);
     30 
     31 #if INSIDE_BLINK
     32     BLINK_PLATFORM_EXPORT WebPermissionCallbacks(const WTF::PassOwnPtr<PermissionCallbacks>&);
     33 #endif
     34 
     35     BLINK_PLATFORM_EXPORT void doAllow();
     36     BLINK_PLATFORM_EXPORT void doDeny();
     37 
     38 private:
     39     WebPrivatePtr<WebPermissionCallbacksPrivate> m_private;
     40 };
     41 
     42 } // namespace blink
     43 
     44 #endif
     45