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

Side by Side Diff: extensions/common/extension_consumer.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: Plumb script_injection_instance_id from WebViewGuest to script injection. 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_COMMON_EXTENSION_CONSUMER_H_
6 #define EXTENSIONS_COMMON_EXTENSION_CONSUMER_H_
7
8 #include "base/memory/ref_counted.h"
9 #include "extensions/common/extension.h"
10 #include "extensions/common/host_id.h"
11
12 namespace extensions {
13
14 // A wrapper class which holds an extension and implements the Host interface.
15 class ExtensionConsumer : public Host {
Devlin 2015/02/04 17:01:14 Does this class (and Host itself) have to be in co
Xi Han 2015/02/05 16:06:20 At least now I think both of them should be in com
Devlin 2015/02/06 00:28:40 Where are they used by UserScriptLoader, etc? I o
Devlin 2015/02/06 18:48:36 Didn't get an answer to this one.
Xi Han 2015/02/06 19:45:33 Sorry for missing this comment. Yes, it seems this
16 public:
17 ExtensionConsumer(Extension* extension, const HostID& host_id);
Devlin 2015/02/04 17:01:14 If this is going to store it as a scoped_refptr, i
Xi Han 2015/02/05 16:06:20 Done.
18 ~ExtensionConsumer() override;
19
20 const Extension* extension() const { return extension_.get(); }
21
22 private:
23 scoped_refptr<Extension> extension_;
Devlin 2015/02/04 17:01:14 Extensions should be const.
Xi Han 2015/02/05 16:06:20 Done.
24
25 DISALLOW_COPY_AND_ASSIGN(ExtensionConsumer);
26 };
27
28 } // namespace extesions
29
30 #endif // EXTENSIONS_COMMON_EXTENSION_CONSUMER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698