hanxi | 9b84166 | 2015-03-04 14:36:41 | [diff] [blame] | 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 EXTENSIONS_RENDERER_WEBUI_INJECTION_HOST_H_ |
| 6 | #define EXTENSIONS_RENDERER_WEBUI_INJECTION_HOST_H_ |
| 7 | |
avi | 2d124c0 | 2015-12-23 06:36:42 | [diff] [blame] | 8 | #include "base/macros.h" |
hanxi | 9b84166 | 2015-03-04 14:36:41 | [diff] [blame] | 9 | #include "extensions/renderer/injection_host.h" |
| 10 | |
| 11 | class WebUIInjectionHost : public InjectionHost { |
| 12 | public: |
| 13 | WebUIInjectionHost(const HostID& host_id); |
| 14 | ~WebUIInjectionHost() override; |
| 15 | |
| 16 | private: |
| 17 | // InjectionHost: |
| 18 | std::string GetContentSecurityPolicy() const override; |
| 19 | const GURL& url() const override; |
| 20 | const std::string& name() const override; |
| 21 | extensions::PermissionsData::AccessType CanExecuteOnFrame( |
| 22 | const GURL& document_url, |
rdevlin.cronin | f994d1e | 2015-06-03 22:28:19 | [diff] [blame] | 23 | content::RenderFrame* render_frame, |
hanxi | 9b84166 | 2015-03-04 14:36:41 | [diff] [blame] | 24 | int tab_id, |
| 25 | bool is_declarative) const override; |
hanxi | 9b84166 | 2015-03-04 14:36:41 | [diff] [blame] | 26 | |
| 27 | private: |
| 28 | GURL url_; |
| 29 | |
| 30 | DISALLOW_COPY_AND_ASSIGN(WebUIInjectionHost); |
| 31 | }; |
| 32 | |
| 33 | #endif // EXTENSIONS_RENDERER_WEBUI_INJECTION_HOST_H_ |