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

Unified Diff: extensions/renderer/extension_injection_host.h

Issue 934763003: Refactoring: de-couple Extensions from "script injection System" [render side]:3 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@decouple_brower_isolated_world_routingid_user_script_1
Patch Set: Reset InjectionHost in ScriptInjection when extension is unloaded. 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 side-by-side diff with in-line comments
Download patch
Index: extensions/renderer/extension_injection_host.h
diff --git a/extensions/renderer/extension_injection_host.h b/extensions/renderer/extension_injection_host.h
index d940c949f7b473399a1ae015608ec307868e1439..2806bb2e23197fe63edb8139f9f4667869488ae0 100644
--- a/extensions/renderer/extension_injection_host.h
+++ b/extensions/renderer/extension_injection_host.h
@@ -10,17 +10,21 @@
#include "extensions/renderer/injection_host.h"
namespace extensions {
+class ExtensionSet;
// A wrapper class that holds an extension and implements the InjectionHost
// interface.
class ExtensionInjectionHost : public InjectionHost {
public:
- ExtensionInjectionHost(const scoped_refptr<const Extension>& extension);
+ ExtensionInjectionHost(const Extension* extension);
~ExtensionInjectionHost() override;
+ static scoped_ptr<const ExtensionInjectionHost> Create(
Devlin 2015/02/20 22:39:13 document (in particular, that this can return a nu
Xi Han 2015/02/23 16:14:59 Done.
+ const std::string& extension_id, const ExtensionSet* extensions);
+
private:
// InjectionHost:
- const std::string& GetContentSecurityPolicy() const override;
+ std::string GetContentSecurityPolicy() const override;
const GURL& url() const override;
const std::string& name() const override;
PermissionsData::AccessType CanExecuteOnFrame(
@@ -30,7 +34,7 @@ class ExtensionInjectionHost : public InjectionHost {
bool is_declarative) const override;
bool ShouldNotifyBrowserOfInjection() const override;
- scoped_refptr<const Extension> extension_;
+ const Extension* extension_;
Devlin 2015/02/20 22:39:13 I think it's fine for this to keep a refptr, but w
Xi Han 2015/02/23 16:14:59 Acknowledged.
DISALLOW_COPY_AND_ASSIGN(ExtensionInjectionHost);
};

Powered by Google App Engine
This is Rietveld 408576698