Chromium Code Reviews| Index: chrome/browser/extensions/api/content_scripts/content_scripts_api.cc |
| diff --git a/chrome/browser/extensions/api/content_scripts/content_scripts_api.cc b/chrome/browser/extensions/api/content_scripts/content_scripts_api.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..cb7d020813859578aabfa1fd9f36a852afa0c907 |
| --- /dev/null |
| +++ b/chrome/browser/extensions/api/content_scripts/content_scripts_api.cc |
| @@ -0,0 +1,28 @@ |
| +// Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "chrome/browser/extensions/api/content_scripts/content_scripts_api.h" |
|
not at google - send to devlin
2013/03/20 17:13:39
There is a (loose) convention at the moment where
|
| + |
| +#include "base/lazy_instance.h" |
| +#include "chrome/common/extensions/api/content_scripts/content_scripts_handler.h" |
| + |
| +namespace extensions { |
| + |
| +static base::LazyInstance<ProfileKeyedAPIFactory<ContentScriptsAPI> > |
| + g_factory = LAZY_INSTANCE_INITIALIZER; |
| + |
| +// static |
| +ProfileKeyedAPIFactory<ContentScriptsAPI>* |
| +ContentScriptsAPI::GetFactoryInstance() { |
| + return &g_factory.Get(); |
| +} |
| + |
| +ContentScriptsAPI::ContentScriptsAPI(Profile* profile) { |
| + (new ContentScriptsHandler)->Register(); |
| +} |
| + |
| +ContentScriptsAPI::~ContentScriptsAPI() { |
| +} |
| + |
| +} // namespace extensions |