Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(88)

Side by Side Diff: extensions/renderer/extension_injection_host.h

Issue 885493007: Refactoring: de-couple Extensions from "script injection System" [render side] : 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits. Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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 EXTENSIONS_RENDERER_EXTENSION_INJECTION_HOST_H_
6 #define EXTENSIONS_RENDERER_EXTENSION_INJECTION_HOST_H_
7
8 #include "base/memory/ref_counted.h"
9 #include "extensions/common/extension.h"
10 #include "extensions/renderer/injection_host.h"
11
12 namespace extensions {
13
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;
20
21 // InjectionHost:
Devlin 2015/02/13 19:29:59 nit: Let's make these private.
22 const std::string& GetContentSecurityPolicy() const override;
23 const GURL& url() const override;
24 const std::string& name() const override;
25 PermissionsData::AccessType CanExecuteOnFrame(
26 const GURL& document_url,
27 const GURL& top_frame_url,
28 int tab_id,
29 bool is_declarative) const override;
30 const Extension* extension() const { return extension_.get(); }
Devlin 2015/02/13 19:29:59 nit: needed?
31
32 private:
33 scoped_refptr<const Extension> extension_;
34
35 DISALLOW_COPY_AND_ASSIGN(ExtensionInjectionHost);
36 };
37
38 } // namespace extesions
39
40 #endif // EXTENSIONS_RENDERER_EXTENSION_INJECTION_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698