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

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

Issue 1899083003: Convert //extensions/renderer from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 8 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
« no previous file with comments | « extensions/renderer/event_bindings.cc ('k') | extensions/renderer/extension_injection_host.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef EXTENSIONS_RENDERER_EXTENSION_INJECTION_HOST_H_ 5 #ifndef EXTENSIONS_RENDERER_EXTENSION_INJECTION_HOST_H_
6 #define EXTENSIONS_RENDERER_EXTENSION_INJECTION_HOST_H_ 6 #define EXTENSIONS_RENDERER_EXTENSION_INJECTION_HOST_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "extensions/common/extension.h" 10 #include "extensions/common/extension.h"
11 #include "extensions/renderer/injection_host.h" 11 #include "extensions/renderer/injection_host.h"
12 12
13 namespace extensions { 13 namespace extensions {
14 14
15 // A wrapper class that holds an extension and implements the InjectionHost 15 // A wrapper class that holds an extension and implements the InjectionHost
16 // interface. 16 // interface.
17 class ExtensionInjectionHost : public InjectionHost { 17 class ExtensionInjectionHost : public InjectionHost {
18 public: 18 public:
19 ExtensionInjectionHost(const Extension* extension); 19 ExtensionInjectionHost(const Extension* extension);
20 ~ExtensionInjectionHost() override; 20 ~ExtensionInjectionHost() override;
21 21
22 // Create an ExtensionInjectionHost object. If the extension is gone, returns 22 // Create an ExtensionInjectionHost object. If the extension is gone, returns
23 // a null scoped ptr. 23 // a null scoped ptr.
24 static scoped_ptr<const InjectionHost> Create( 24 static std::unique_ptr<const InjectionHost> Create(
25 const std::string& extension_id); 25 const std::string& extension_id);
26 26
27 private: 27 private:
28 // InjectionHost: 28 // InjectionHost:
29 std::string GetContentSecurityPolicy() const override; 29 std::string GetContentSecurityPolicy() const override;
30 const GURL& url() const override; 30 const GURL& url() const override;
31 const std::string& name() const override; 31 const std::string& name() const override;
32 PermissionsData::AccessType CanExecuteOnFrame( 32 PermissionsData::AccessType CanExecuteOnFrame(
33 const GURL& document_url, 33 const GURL& document_url,
34 content::RenderFrame* render_frame, 34 content::RenderFrame* render_frame,
35 int tab_id, 35 int tab_id,
36 bool is_declarative) const override; 36 bool is_declarative) const override;
37 37
38 const Extension* extension_; 38 const Extension* extension_;
39 39
40 DISALLOW_COPY_AND_ASSIGN(ExtensionInjectionHost); 40 DISALLOW_COPY_AND_ASSIGN(ExtensionInjectionHost);
41 }; 41 };
42 42
43 } // namespace extesions 43 } // namespace extesions
44 44
45 #endif // EXTENSIONS_RENDERER_EXTENSION_INJECTION_HOST_H_ 45 #endif // EXTENSIONS_RENDERER_EXTENSION_INJECTION_HOST_H_
OLDNEW
« no previous file with comments | « extensions/renderer/event_bindings.cc ('k') | extensions/renderer/extension_injection_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698