Chromium Code Reviews| Index: chrome/browser/extensions/extension_declarative_user_script_master.h |
| diff --git a/chrome/browser/extensions/api/spellcheck/spellcheck_api.h b/chrome/browser/extensions/extension_declarative_user_script_master.h |
| similarity index 36% |
| copy from chrome/browser/extensions/api/spellcheck/spellcheck_api.h |
| copy to chrome/browser/extensions/extension_declarative_user_script_master.h |
| index 9c976af00f239f1a6008656bd2403e33f5c703ea..792b2f6f8637c7d5a81ae12b2e80a046cf6a68e3 100644 |
| --- a/chrome/browser/extensions/api/spellcheck/spellcheck_api.h |
| +++ b/chrome/browser/extensions/extension_declarative_user_script_master.h |
| @@ -1,51 +1,43 @@ |
| -// Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| +// Copyright 2015 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. |
| -#ifndef CHROME_BROWSER_EXTENSIONS_API_SPELLCHECK_SPELLCHECK_API_H_ |
| -#define CHROME_BROWSER_EXTENSIONS_API_SPELLCHECK_SPELLCHECK_API_H_ |
| +#ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_DECLARATIVE_USER_SCRIPT_MASTER_H_ |
| +#define CHROME_BROWSER_EXTENSIONS_EXTENSION_DECLARATIVE_USER_SCRIPT_MASTER_H_ |
| #include "base/scoped_observer.h" |
| -#include "extensions/browser/browser_context_keyed_api_factory.h" |
| +#include "chrome/browser/extensions/declarative_user_script_master.h" |
| +#include "chrome/browser/extensions/extension_user_script_loader.h" |
| #include "extensions/browser/extension_registry_observer.h" |
| +#include "extensions/common/consumer.h" |
|
Devlin
2015/01/14 16:45:08
Check your includes.
Xi Han
2015/01/14 23:46:03
Done.
|
| +#include "extensions/common/extension.h" |
| + |
| +class Profile; |
| namespace extensions { |
| + |
| class ExtensionRegistry; |
| +class UserScript; |
| -class SpellcheckAPI : public BrowserContextKeyedAPI, |
| - public ExtensionRegistryObserver { |
| +// Extension implmentation of DeclarativeUserScriptMaster. |
| +class ExtensionDeclarativeUserScriptMaster : public DeclarativeUserScriptMaster, |
| + public ExtensionRegistryObserver { |
| public: |
| - explicit SpellcheckAPI(content::BrowserContext* context); |
| - ~SpellcheckAPI() override; |
| - |
| - // BrowserContextKeyedAPI implementation. |
| - static BrowserContextKeyedAPIFactory<SpellcheckAPI>* GetFactoryInstance(); |
| + ExtensionDeclarativeUserScriptMaster(Profile* profile, const ConsumerID& id); |
| + ~ExtensionDeclarativeUserScriptMaster() override; |
| private: |
| - friend class BrowserContextKeyedAPIFactory<SpellcheckAPI>; |
| - |
| // ExtensionRegistryObserver implementation. |
|
Devlin
2015/01/14 16:45:09
nit: prefer
// ExtensionRegistryObserver:
Xi Han
2015/01/14 23:46:03
Really? I thought we always use "XXX implementatio
Devlin
2015/01/16 17:05:03
We're woefully inconsistent. I used to use "Foo i
Xi Han
2015/01/19 22:40:05
Acknowledged.
|
| - void OnExtensionLoaded(content::BrowserContext* browser_context, |
| - const Extension* extension) override; |
| void OnExtensionUnloaded(content::BrowserContext* browser_context, |
| const Extension* extension, |
| UnloadedExtensionInfo::Reason reason) override; |
| - // BrowserContextKeyedAPI implementation. |
| - static const char* service_name() { |
| - return "SpellcheckAPI"; |
| - } |
| - |
| - // Listen to extension load, unloaded notifications. |
| ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver> |
| extension_registry_observer_; |
| - DISALLOW_COPY_AND_ASSIGN(SpellcheckAPI); |
| + DISALLOW_COPY_AND_ASSIGN(ExtensionDeclarativeUserScriptMaster); |
| }; |
| -template <> |
| -void BrowserContextKeyedAPIFactory<SpellcheckAPI>::DeclareFactoryDependencies(); |
| - |
| } // namespace extensions |
| -#endif // CHROME_BROWSER_EXTENSIONS_API_SPELLCHECK_SPELLCHECK_API_H_ |
| +#endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_DECLARATIVE_USER_SCRIPT_MASTER_H_ |