diff options
author | ncj674@motorola.com <ncj674@motorola.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-14 08:42:52 +0000 |
---|---|---|
committer | ncj674@motorola.com <ncj674@motorola.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-14 08:42:52 +0000 |
commit | 0a30189026906b06e125830542bdd05b182ad8c2 (patch) | |
tree | b74777caa79c798b243577eacae1bed0a9fb0d49 /chrome/browser/extensions/api/module | |
parent | e2d8c0c7add36fd44665b367c0f00419a8ead9bb (diff) | |
download | chromium_src-0a30189026906b06e125830542bdd05b182ad8c2.zip chromium_src-0a30189026906b06e125830542bdd05b182ad8c2.tar.gz chromium_src-0a30189026906b06e125830542bdd05b182ad8c2.tar.bz2 |
Move API functions registrations out of ExtensionFunctionRegistry.
JSON schema compiler automatically registers api functions in generated_api.cc files for the JSON files specified as schema_files in api.gyp. JSON schema compiler generates code in specific namespace, function names and file paths as per json files.
BUG=159265
TBR=mirandac@chromium.org
TBR=ben@chromium.org
TBR=kalman@chromium.org
Review URL: https://chromiumcodereview.appspot.com/12089062
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@182423 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/api/module')
-rw-r--r-- | chrome/browser/extensions/api/module/module.cc | 8 | ||||
-rw-r--r-- | chrome/browser/extensions/api/module/module.h | 13 |
2 files changed, 11 insertions, 10 deletions
diff --git a/chrome/browser/extensions/api/module/module.cc b/chrome/browser/extensions/api/module/module.cc index 1f3a5d3..9086610 100644 --- a/chrome/browser/extensions/api/module/module.cc +++ b/chrome/browser/extensions/api/module/module.cc @@ -12,11 +12,11 @@ namespace extensions { -ExtensionPrefs* SetUpdateUrlDataFunction::extension_prefs() { +ExtensionPrefs* ExtensionSetUpdateUrlDataFunction::extension_prefs() { return profile()->GetExtensionService()->extension_prefs(); } -bool SetUpdateUrlDataFunction::RunImpl() { +bool ExtensionSetUpdateUrlDataFunction::RunImpl() { std::string data; EXTENSION_FUNCTION_VALIDATE(args_->GetString(0, &data)); @@ -24,7 +24,7 @@ bool SetUpdateUrlDataFunction::RunImpl() { return true; } -bool IsAllowedIncognitoAccessFunction::RunImpl() { +bool ExtensionIsAllowedIncognitoAccessFunction::RunImpl() { ExtensionService* ext_service = profile()->GetExtensionService(); const Extension* extension = GetExtension(); @@ -33,7 +33,7 @@ bool IsAllowedIncognitoAccessFunction::RunImpl() { return true; } -bool IsAllowedFileSchemeAccessFunction::RunImpl() { +bool ExtensionIsAllowedFileSchemeAccessFunction::RunImpl() { ExtensionService* ext_service = profile()->GetExtensionService(); const Extension* extension = GetExtension(); diff --git a/chrome/browser/extensions/api/module/module.h b/chrome/browser/extensions/api/module/module.h index c8d387f..0436a1c 100644 --- a/chrome/browser/extensions/api/module/module.h +++ b/chrome/browser/extensions/api/module/module.h @@ -11,13 +11,13 @@ namespace extensions { class ExtensionPrefs; -class SetUpdateUrlDataFunction : public SyncExtensionFunction { +class ExtensionSetUpdateUrlDataFunction : public SyncExtensionFunction { public: DECLARE_EXTENSION_FUNCTION("extension.setUpdateUrlData", EXTENSION_SETUPDATEURLDATA) protected: - virtual ~SetUpdateUrlDataFunction() {} + virtual ~ExtensionSetUpdateUrlDataFunction() {} // ExtensionFunction: virtual bool RunImpl() OVERRIDE; @@ -26,25 +26,26 @@ class SetUpdateUrlDataFunction : public SyncExtensionFunction { ExtensionPrefs* extension_prefs(); }; -class IsAllowedIncognitoAccessFunction : public SyncExtensionFunction { +class ExtensionIsAllowedIncognitoAccessFunction : public SyncExtensionFunction { public: DECLARE_EXTENSION_FUNCTION("extension.isAllowedIncognitoAccess", EXTENSION_ISALLOWEDINCOGNITOACCESS) protected: - virtual ~IsAllowedIncognitoAccessFunction() {} + virtual ~ExtensionIsAllowedIncognitoAccessFunction() {} // ExtensionFunction: virtual bool RunImpl() OVERRIDE; }; -class IsAllowedFileSchemeAccessFunction : public SyncExtensionFunction { +class ExtensionIsAllowedFileSchemeAccessFunction + : public SyncExtensionFunction { public: DECLARE_EXTENSION_FUNCTION("extension.isAllowedFileSchemeAccess", EXTENSION_ISALLOWEDFILESCHEMEACCESS) protected: - virtual ~IsAllowedFileSchemeAccessFunction() {} + virtual ~ExtensionIsAllowedFileSchemeAccessFunction() {} // ExtensionFunction: virtual bool RunImpl() OVERRIDE; |