Chromium Code Reviews| Index: components/web_restriction/web_restriction_gin_wrapper.h |
| diff --git a/components/web_restriction/web_restriction_gin_wrapper.h b/components/web_restriction/web_restriction_gin_wrapper.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..bb7a160bc0b70e4a0c824a78564b5c53626dd4ce |
| --- /dev/null |
| +++ b/components/web_restriction/web_restriction_gin_wrapper.h |
| @@ -0,0 +1,43 @@ |
| +// 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. |
| + |
| +#ifndef COMPONENTS_WEB_RESTRICTION_WEB_RESTRICTION_GIN_WRAPPER_H_ |
| +#define COMPONENTS_WEB_RESTRICTION_WEB_RESTRICTION_GIN_WRAPPER_H_ |
| + |
| +#include "base/macros.h" |
| +#include "gin/wrappable.h" |
| + |
| +namespace content { |
| +class RenderFrame; |
| +} |
| + |
| +namespace web_restriction { |
| + |
| +class WebRestrictionGinWrapper |
| + : public gin::Wrappable<WebRestrictionGinWrapper> { |
| + public: |
| + static gin::WrapperInfo kWrapperInfo; |
|
Bernhard Bauer
2016/01/22 17:32:32
What's this for?
knn
2016/01/25 11:54:24
Distinguishes broadly the different embedders of g
Bernhard Bauer
2016/01/26 09:52:41
Sorry, should have been more specific: This doesn'
knn
2016/01/26 14:42:29
Perhaps this answers your question,
https://code.g
Bernhard Bauer
2016/01/26 15:02:41
Ah, that makes sense. Thanks!
|
| + |
| + static void Install(content::RenderFrame* render_frame); |
| + |
| + private: |
| + explicit WebRestrictionGinWrapper(content::RenderFrame* render_frame); |
| + ~WebRestrictionGinWrapper() override; |
| + |
| + // Request permission to allow visiting the currently blocked site. |
| + bool RequestPermission(); |
| + |
| + // gin::WrappableBase |
| + gin::ObjectTemplateBuilder GetObjectTemplateBuilder( |
| + v8::Isolate* isolate) override; |
| + |
| + // Not owned. |
| + content::RenderFrame* render_frame_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(WebRestrictionGinWrapper); |
| +}; |
| + |
| +} // namespace web_restriction. |
| + |
| +#endif // COMPONENTS_WEB_RESTRICTION_WEB_RESTRICTION_GIN_WRAPPER_H_ |