Reland the ULONG -> SIZE_T change from 317177
[chromium-blink-merge.git] / extensions / renderer / extension_injection_host.h
blobd940c949f7b473399a1ae015608ec307868e1439
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.
5 #ifndef EXTENSIONS_RENDERER_EXTENSION_INJECTION_HOST_H_
6 #define EXTENSIONS_RENDERER_EXTENSION_INJECTION_HOST_H_
8 #include "base/memory/ref_counted.h"
9 #include "extensions/common/extension.h"
10 #include "extensions/renderer/injection_host.h"
12 namespace extensions {
14 // A wrapper class that holds an extension and implements the InjectionHost
15 // interface.
16 class ExtensionInjectionHost : public InjectionHost {
17 public:
18 ExtensionInjectionHost(const scoped_refptr<const Extension>& extension);
19 ~ExtensionInjectionHost() override;
21 private:
22 // InjectionHost:
23 const std::string& GetContentSecurityPolicy() const override;
24 const GURL& url() const override;
25 const std::string& name() const override;
26 PermissionsData::AccessType CanExecuteOnFrame(
27 const GURL& document_url,
28 const GURL& top_frame_url,
29 int tab_id,
30 bool is_declarative) const override;
31 bool ShouldNotifyBrowserOfInjection() const override;
33 scoped_refptr<const Extension> extension_;
35 DISALLOW_COPY_AND_ASSIGN(ExtensionInjectionHost);
38 } // namespace extesions
40 #endif // EXTENSIONS_RENDERER_EXTENSION_INJECTION_HOST_H_