OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 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 COMPONENTS_WEB_RESTRICTION_WEB_RESTRICTION_GIN_WRAPPER_H_ |
| 6 #define COMPONENTS_WEB_RESTRICTION_WEB_RESTRICTION_GIN_WRAPPER_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "gin/wrappable.h" |
| 10 |
| 11 namespace content { |
| 12 class RenderFrame; |
| 13 } |
| 14 |
| 15 namespace web_restriction { |
| 16 |
| 17 class WebRestrictionGinWrapper |
| 18 : public gin::Wrappable<WebRestrictionGinWrapper> { |
| 19 public: |
| 20 static gin::WrapperInfo kWrapperInfo; |
| 21 |
| 22 static void Install(content::RenderFrame* render_frame); |
| 23 |
| 24 private: |
| 25 explicit WebRestrictionGinWrapper(content::RenderFrame* render_frame); |
| 26 ~WebRestrictionGinWrapper() override; |
| 27 |
| 28 // Request permission to allow visiting the currently blocked site. |
| 29 bool RequestPermission(); |
| 30 |
| 31 // gin::WrappableBase |
| 32 gin::ObjectTemplateBuilder GetObjectTemplateBuilder( |
| 33 v8::Isolate* isolate) override; |
| 34 |
| 35 // Not owned. |
| 36 content::RenderFrame* render_frame_; |
| 37 |
| 38 DISALLOW_COPY_AND_ASSIGN(WebRestrictionGinWrapper); |
| 39 }; |
| 40 |
| 41 } // namespace web_restriction. |
| 42 |
| 43 #endif // COMPONENTS_WEB_RESTRICTION_WEB_RESTRICTION_GIN_WRAPPER_H_ |
OLD | NEW |