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

Unified Diff: chrome/browser/extensions/extension_system.h

Issue 10777003: Refactor APIResourceController to ProfileKeyedService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge/antony/fix build. Created 8 years, 5 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
« no previous file with comments | « chrome/browser/extensions/extension_service.cc ('k') | chrome/browser/extensions/extension_system.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_system.h
diff --git a/chrome/browser/extensions/extension_system.h b/chrome/browser/extensions/extension_system.h
index acb5ed325ee76b75be66344afbaf5e16349847c5..4441739f5ea320d378e76909e286a15fc380cb67 100644
--- a/chrome/browser/extensions/extension_system.h
+++ b/chrome/browser/extensions/extension_system.h
@@ -9,6 +9,10 @@
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
+#include "chrome/browser/extensions/api/api_resource_manager.h"
+#include "chrome/browser/extensions/api/serial/serial_connection.h"
+#include "chrome/browser/extensions/api/socket/socket.h"
+#include "chrome/browser/extensions/api/usb/usb_device_resource.h"
#include "chrome/browser/profiles/profile_keyed_service.h"
#include "chrome/common/extensions/extension_constants.h"
@@ -22,6 +26,8 @@ class ExtensionService;
class Profile;
namespace extensions {
+// Unfortunately, for the ApiResourceManager<> template classes, we don't seem
+// to be able to forward-declare because of compilation errors on Windows.
class AlarmManager;
class Extension;
class ExtensionPrefs;
@@ -92,6 +98,18 @@ class ExtensionSystem : public ProfileKeyedService {
// The RulesRegistryService is created at startup.
virtual RulesRegistryService* rules_registry_service() = 0;
+ // The SerialConnection ResourceManager is created at startup.
+ virtual ApiResourceManager<SerialConnection>*
+ serial_connection_manager() = 0;
+
+ // The Socket ResourceManager is created at startup.
+ virtual ApiResourceManager<Socket>*
+ socket_manager() = 0;
+
+ // The UsbDeviceResource ResourceManager is created at startup.
+ virtual ApiResourceManager<UsbDeviceResource>*
+ usb_device_resource_manager() = 0;
+
// Called by the ExtensionService that lives in this system. Gives the
// info map a chance to react to the load event before the EXTENSION_LOADED
// notification has fired. The purpose for handling this event first is to
@@ -135,9 +153,13 @@ class ExtensionSystemImpl : public ExtensionSystem {
virtual ExtensionInfoMap* info_map() OVERRIDE; // shared
virtual ExtensionMessageService* message_service() OVERRIDE; // shared
virtual ExtensionEventRouter* event_router() OVERRIDE; // shared
- // The RulesRegistryService is created at startup.
virtual RulesRegistryService* rules_registry_service()
OVERRIDE; // shared
+ virtual ApiResourceManager<SerialConnection>* serial_connection_manager()
+ OVERRIDE;
+ virtual ApiResourceManager<Socket>* socket_manager() OVERRIDE;
+ virtual ApiResourceManager<UsbDeviceResource>* usb_device_resource_manager()
+ OVERRIDE;
virtual void RegisterExtensionWithRequestContexts(
const Extension* extension) OVERRIDE;
@@ -206,6 +228,10 @@ class ExtensionSystemImpl : public ExtensionSystem {
// access to the ResourceContext owned by |io_data_|.
scoped_ptr<ExtensionProcessManager> extension_process_manager_;
scoped_ptr<AlarmManager> alarm_manager_;
+ scoped_ptr<ApiResourceManager<SerialConnection> > serial_connection_manager_;
+ scoped_ptr<ApiResourceManager<Socket> > socket_manager_;
+ scoped_ptr<ApiResourceManager<
+ UsbDeviceResource> > usb_device_resource_manager_;
DISALLOW_COPY_AND_ASSIGN(ExtensionSystemImpl);
};
« no previous file with comments | « chrome/browser/extensions/extension_service.cc ('k') | chrome/browser/extensions/extension_system.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698