Chromium Code Reviews| OLD | NEW |
|---|---|
| (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_ | |
| OLD | NEW |