Chromium Code Reviews| 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_restrictions { | |
| 16 | |
| 17 class WebRestrictionsGinWrapper | |
| 18 : public gin::Wrappable<WebRestrictionsGinWrapper> { | |
| 19 public: | |
| 20 static gin::WrapperInfo kWrapperInfo; | |
| 21 | |
| 22 static void Install(content::RenderFrame* render_frame); | |
| 23 | |
| 24 private: | |
| 25 explicit WebRestrictionsGinWrapper(content::RenderFrame* render_frame); | |
| 26 ~WebRestrictionsGinWrapper() 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_; | |
|
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
| |
| 37 | |
| 38 DISALLOW_COPY_AND_ASSIGN(WebRestrictionsGinWrapper); | |
| 39 }; | |
| 40 | |
| 41 } // namespace web_restrictions. | |
| 42 | |
| 43 #endif // COMPONENTS_WEB_RESTRICTION_WEB_RESTRICTION_GIN_WRAPPER_H_ | |
| OLD | NEW |