Chromium Code Reviews| Index: components/web_restrictions/web_restrictions_gin_wrapper.h |
| diff --git a/components/web_restrictions/web_restrictions_gin_wrapper.h b/components/web_restrictions/web_restrictions_gin_wrapper.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..66a3430c2ff23707d77ad89fc77cf0602e8620dd |
| --- /dev/null |
| +++ b/components/web_restrictions/web_restrictions_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_restrictions { |
| + |
| +class WebRestrictionsGinWrapper |
| + : public gin::Wrappable<WebRestrictionsGinWrapper> { |
| + public: |
| + static gin::WrapperInfo kWrapperInfo; |
| + |
| + static void Install(content::RenderFrame* render_frame); |
| + |
| + private: |
| + explicit WebRestrictionsGinWrapper(content::RenderFrame* render_frame); |
| + ~WebRestrictionsGinWrapper() 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_; |
|
jochen (gone - plz use gerrit)
2016/02/05 14:55:07
please derive from RenderFrameObserver instead of
aberent
2016/02/19 12:31:18
Done in https://codereview.chromium.org/1684153002
|
| + |
| + DISALLOW_COPY_AND_ASSIGN(WebRestrictionsGinWrapper); |
| +}; |
| + |
| +} // namespace web_restrictions. |
| + |
| +#endif // COMPONENTS_WEB_RESTRICTION_WEB_RESTRICTION_GIN_WRAPPER_H_ |