summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/accessibility/accessibility_extension_api.h15
-rw-r--r--chrome/browser/chromeos/extensions/echo_private_api.h3
-rw-r--r--chrome/browser/chromeos/extensions/file_browser_handler_api.h3
-rw-r--r--chrome/browser/chromeos/extensions/file_browser_private_api.h109
-rw-r--r--chrome/browser/chromeos/extensions/info_private_api.h2
-rw-r--r--chrome/browser/chromeos/extensions/input_method_api.h2
-rw-r--r--chrome/browser/chromeos/extensions/media_player_api.h11
-rw-r--r--chrome/browser/chromeos/extensions/power/power_api.h6
-rw-r--r--chrome/browser/chromeos/extensions/wallpaper_private_api.h27
-rw-r--r--chrome/browser/extensions/api/alarms/alarms_api.h10
-rw-r--r--chrome/browser/extensions/api/app/app_api.h5
-rw-r--r--chrome/browser/extensions/api/app_current_window_internal/app_current_window_internal_api.h30
-rw-r--r--chrome/browser/extensions/api/app_runtime/app_runtime_api.h3
-rw-r--r--chrome/browser/extensions/api/app_window/app_window_api.h2
-rw-r--r--chrome/browser/extensions/api/autotest_private/autotest_private_api.h10
-rw-r--r--chrome/browser/extensions/api/bluetooth/bluetooth_api.h26
-rw-r--r--chrome/browser/extensions/api/bookmark_manager_private/bookmark_manager_private_api.h36
-rw-r--r--chrome/browser/extensions/api/bookmarks/bookmarks_api.h26
-rw-r--r--chrome/browser/extensions/api/browsing_data/browsing_data_api.h38
-rw-r--r--chrome/browser/extensions/api/cloud_print_private/cloud_print_private_api.h9
-rw-r--r--chrome/browser/extensions/api/commands/commands.h2
-rw-r--r--chrome/browser/extensions/api/content_settings/content_settings_api.h9
-rw-r--r--chrome/browser/extensions/api/context_menus/context_menus_api.h8
-rw-r--r--chrome/browser/extensions/api/cookies/cookies_api.h11
-rw-r--r--chrome/browser/extensions/api/debugger/debugger_api.h6
-rw-r--r--chrome/browser/extensions/api/declarative/declarative_api.h6
-rw-r--r--chrome/browser/extensions/api/developer_private/developer_private_api.h24
-rw-r--r--chrome/browser/extensions/api/dial/dial_api.h2
-rw-r--r--chrome/browser/extensions/api/discovery/discovery_api.h9
-rw-r--r--chrome/browser/extensions/api/dns/dns_api.h3
-rw-r--r--chrome/browser/extensions/api/downloads/downloads_api.h25
-rw-r--r--chrome/browser/extensions/api/extension_action/extension_browser_actions_api.h26
-rw-r--r--chrome/browser/extensions/api/extension_action/extension_page_actions_api.h20
-rw-r--r--chrome/browser/extensions/api/extension_action/script_badge_api.h7
-rw-r--r--chrome/browser/extensions/api/file_system/file_system_api.h11
-rw-r--r--chrome/browser/extensions/api/font_settings/font_settings_api.h36
-rw-r--r--chrome/browser/extensions/api/history/history_api.h15
-rw-r--r--chrome/browser/extensions/api/i18n/i18n_api.h2
-rw-r--r--chrome/browser/extensions/api/identity/identity_api.h6
-rw-r--r--chrome/browser/extensions/api/idle/idle_api.h5
-rw-r--r--chrome/browser/extensions/api/idltest/idltest_api.h9
-rw-r--r--chrome/browser/extensions/api/input/input.h5
-rw-r--r--chrome/browser/extensions/api/input_ime/input_ime_api.h24
-rw-r--r--chrome/browser/extensions/api/managed_mode/managed_mode_api.h11
-rw-r--r--chrome/browser/extensions/api/management/management_api.h18
-rw-r--r--chrome/browser/extensions/api/media_galleries/media_galleries_api.h8
-rw-r--r--chrome/browser/extensions/api/media_galleries_private/media_galleries_private_api.h6
-rw-r--r--chrome/browser/extensions/api/metrics/metrics.h27
-rw-r--r--chrome/browser/extensions/api/module/module.h9
-rw-r--r--chrome/browser/extensions/api/notification/notification_api.h3
-rw-r--r--chrome/browser/extensions/api/omnibox/omnibox_api.h5
-rw-r--r--chrome/browser/extensions/api/page_capture/page_capture_api.h2
-rw-r--r--chrome/browser/extensions/api/permissions/permissions_api.h8
-rw-r--r--chrome/browser/extensions/api/preference/preference_api.h7
-rw-r--r--chrome/browser/extensions/api/processes/processes_api.h9
-rw-r--r--chrome/browser/extensions/api/push_messaging/push_messaging_api.h3
-rw-r--r--chrome/browser/extensions/api/record/record_api.h6
-rw-r--r--chrome/browser/extensions/api/runtime/runtime_api.h8
-rw-r--r--chrome/browser/extensions/api/serial/serial_api.h18
-rw-r--r--chrome/browser/extensions/api/socket/socket_api.h30
-rw-r--r--chrome/browser/extensions/api/storage/storage_api.h10
-rw-r--r--chrome/browser/extensions/api/sync_file_system/sync_file_system_api.h12
-rw-r--r--chrome/browser/extensions/api/system_indicator/system_indicator_api.h6
-rw-r--r--chrome/browser/extensions/api/system_info_cpu/system_info_cpu_api.h3
-rw-r--r--chrome/browser/extensions/api/system_info_display/system_info_display_api.h3
-rw-r--r--chrome/browser/extensions/api/system_info_memory/system_info_memory_api.h3
-rw-r--r--chrome/browser/extensions/api/system_info_storage/system_info_storage_api.h3
-rw-r--r--chrome/browser/extensions/api/tab_capture/tab_capture_api.h5
-rw-r--r--chrome/browser/extensions/api/tabs/tabs_api.h46
-rw-r--r--chrome/browser/extensions/api/terminal/terminal_private_api.h12
-rw-r--r--chrome/browser/extensions/api/test/test_api.h14
-rw-r--r--chrome/browser/extensions/api/top_sites/top_sites_api.h2
-rw-r--r--chrome/browser/extensions/api/usb/usb_api.h19
-rw-r--r--chrome/browser/extensions/api/web_navigation/web_navigation_api.h5
-rw-r--r--chrome/browser/extensions/api/web_request/web_request_api.h9
-rw-r--r--chrome/browser/extensions/api/web_socket_proxy_private/web_socket_proxy_private_api.h6
-rw-r--r--chrome/browser/extensions/api/webstore_private/webstore_private_api.h21
-rw-r--r--chrome/browser/extensions/extension_function.cc7
-rw-r--r--chrome/browser/extensions/extension_function.h21
-rw-r--r--chrome/browser/extensions/extension_function_histogram_value.h418
-rw-r--r--chrome/browser/extensions/extension_function_registry.cc15
-rw-r--r--chrome/browser/extensions/extension_function_registry.h19
-rw-r--r--chrome/browser/extensions/extension_service.h3
-rw-r--r--chrome/browser/extensions/system/system_api.h6
-rw-r--r--chrome/browser/infobars/infobar_extension_api.h3
-rw-r--r--chrome/browser/rlz/rlz_extension_api.h12
-rw-r--r--chrome/browser/speech/extension_api/tts_engine_extension_api.h2
-rw-r--r--chrome/browser/speech/extension_api/tts_extension_api.h8
-rw-r--r--chrome/browser/speech/speech_input_extension_api.h9
89 files changed, 1104 insertions, 420 deletions
diff --git a/chrome/browser/accessibility/accessibility_extension_api.h b/chrome/browser/accessibility/accessibility_extension_api.h
index 74615b7..20b19d8 100644
--- a/chrome/browser/accessibility/accessibility_extension_api.h
+++ b/chrome/browser/accessibility/accessibility_extension_api.h
@@ -74,24 +74,27 @@ class ExtensionAccessibilityEventRouter : public content::NotificationObserver {
class SetAccessibilityEnabledFunction : public SyncExtensionFunction {
virtual ~SetAccessibilityEnabledFunction() {}
virtual bool RunImpl() OVERRIDE;
- DECLARE_EXTENSION_FUNCTION_NAME(
- "experimental.accessibility.setAccessibilityEnabled")
+ DECLARE_EXTENSION_FUNCTION(
+ "experimental.accessibility.setAccessibilityEnabled",
+ EXPERIMENTAL_ACCESSIBILITY_SETACCESSIBILITYENABLED)
};
// API function that returns the most recent focused control.
class GetFocusedControlFunction : public SyncExtensionFunction {
virtual ~GetFocusedControlFunction() {}
virtual bool RunImpl() OVERRIDE;
- DECLARE_EXTENSION_FUNCTION_NAME(
- "experimental.accessibility.getFocusedControl")
+ DECLARE_EXTENSION_FUNCTION(
+ "experimental.accessibility.getFocusedControl",
+ EXPERIMENTAL_ACCESSIBILITY_GETFOCUSEDCONTROL)
};
// API function that returns alerts being shown on the give tab.
class GetAlertsForTabFunction : public SyncExtensionFunction {
virtual ~GetAlertsForTabFunction() {}
virtual bool RunImpl() OVERRIDE;
- DECLARE_EXTENSION_FUNCTION_NAME(
- "experimental.accessibility.getAlertsForTab")
+ DECLARE_EXTENSION_FUNCTION(
+ "experimental.accessibility.getAlertsForTab",
+ EXPERIMENTAL_ACCESSIBILITY_GETALERTSFORTAB)
};
#endif // CHROME_BROWSER_ACCESSIBILITY_ACCESSIBILITY_EXTENSION_API_H_
diff --git a/chrome/browser/chromeos/extensions/echo_private_api.h b/chrome/browser/chromeos/extensions/echo_private_api.h
index e947eb3..c365dba 100644
--- a/chrome/browser/chromeos/extensions/echo_private_api.h
+++ b/chrome/browser/chromeos/extensions/echo_private_api.h
@@ -17,6 +17,7 @@ class GetRegistrationCodeFunction : public SyncExtensionFunction {
virtual bool RunImpl() OVERRIDE;
private:
- DECLARE_EXTENSION_FUNCTION_NAME("echoPrivate.getRegistrationCode");
+ DECLARE_EXTENSION_FUNCTION("echoPrivate.getRegistrationCode",
+ ECHOPRIVATE_GETREGISTRATIONCODE)
};
#endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_ECHO_PRIVATE_API_H_
diff --git a/chrome/browser/chromeos/extensions/file_browser_handler_api.h b/chrome/browser/chromeos/extensions/file_browser_handler_api.h
index b3fb706..bcc10f2 100644
--- a/chrome/browser/chromeos/extensions/file_browser_handler_api.h
+++ b/chrome/browser/chromeos/extensions/file_browser_handler_api.h
@@ -153,7 +153,8 @@ class FileBrowserHandlerInternalSelectFileFunction
// files.
std::vector<std::pair<FilePath, int> > permissions_to_grant_;
- DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserHandlerInternal.selectFile");
+ DECLARE_EXTENSION_FUNCTION("fileBrowserHandlerInternal.selectFile",
+ FILEBROWSERHANDLERINTERNAL_SELECTFILE)
};
#endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_BROWSER_HANDLER_API_H_
diff --git a/chrome/browser/chromeos/extensions/file_browser_private_api.h b/chrome/browser/chromeos/extensions/file_browser_private_api.h
index eadc92c..d6bfcbd 100644
--- a/chrome/browser/chromeos/extensions/file_browser_private_api.h
+++ b/chrome/browser/chromeos/extensions/file_browser_private_api.h
@@ -65,7 +65,8 @@ class FileBrowserPrivateAPI : public ProfileKeyedService {
// Implements the chrome.fileBrowserPrivate.requestLocalFileSystem method.
class RequestLocalFileSystemFunction : public AsyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.requestLocalFileSystem");
+ DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.requestLocalFileSystem",
+ FILEBROWSERPRIVATE_REQUESTLOCALFILESYSTEM)
protected:
virtual ~RequestLocalFileSystemFunction() {}
@@ -109,7 +110,8 @@ class FileWatchBrowserFunctionBase : public AsyncExtensionFunction {
// Implements the chrome.fileBrowserPrivate.addFileWatch method.
class AddFileWatchBrowserFunction : public FileWatchBrowserFunctionBase {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.addFileWatch");
+ DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.addFileWatch",
+ FILEBROWSERPRIVATE_ADDFILEWATCH)
protected:
virtual ~AddFileWatchBrowserFunction() {}
@@ -124,7 +126,8 @@ class AddFileWatchBrowserFunction : public FileWatchBrowserFunctionBase {
// Implements the chrome.fileBrowserPrivate.removeFileWatch method.
class RemoveFileWatchBrowserFunction : public FileWatchBrowserFunctionBase {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.removeFileWatch");
+ DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.removeFileWatch",
+ FILEBROWSERPRIVATE_REMOVEFILEWATCH)
protected:
virtual ~RemoveFileWatchBrowserFunction() {}
@@ -138,7 +141,8 @@ class RemoveFileWatchBrowserFunction : public FileWatchBrowserFunctionBase {
// Implements the chrome.fileBrowserPrivate.getFileTasks method.
class GetFileTasksFileBrowserFunction : public AsyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.getFileTasks");
+ DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.getFileTasks",
+ FILEBROWSERPRIVATE_GETFILETASKS)
protected:
virtual ~GetFileTasksFileBrowserFunction() {}
@@ -207,7 +211,8 @@ class GetFileTasksFileBrowserFunction : public AsyncExtensionFunction {
// Implements the chrome.fileBrowserPrivate.executeTask method.
class ExecuteTasksFileBrowserFunction : public AsyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.executeTask");
+ DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.executeTask",
+ FILEBROWSERPRIVATE_EXECUTETASK)
ExecuteTasksFileBrowserFunction();
@@ -223,7 +228,8 @@ class ExecuteTasksFileBrowserFunction : public AsyncExtensionFunction {
// Implements the chrome.fileBrowserPrivate.setDefaultTask method.
class SetDefaultTaskFileBrowserFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.setDefaultTask");
+ DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.setDefaultTask",
+ FILEBROWSERPRIVATE_SETDEFAULTTASK)
SetDefaultTaskFileBrowserFunction();
@@ -270,7 +276,8 @@ class FileBrowserFunction
// Select a single file. Closes the dialog window.
class SelectFileFunction : public FileBrowserFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.selectFile");
+ DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.selectFile",
+ FILEBROWSERPRIVATE_SELECTFILE)
SelectFileFunction() {}
@@ -289,7 +296,8 @@ class SelectFileFunction : public FileBrowserFunction {
// View multiple selected files. Window stays open.
class ViewFilesFunction : public FileBrowserFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.viewFiles");
+ DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.viewFiles",
+ FILEBROWSERPRIVATE_VIEWFILES)
ViewFilesFunction();
@@ -303,7 +311,8 @@ class ViewFilesFunction : public FileBrowserFunction {
// Select multiple files. Closes the dialog window.
class SelectFilesFunction : public FileBrowserFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.selectFiles");
+ DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.selectFiles",
+ FILEBROWSERPRIVATE_SELECTFILES)
SelectFilesFunction();
@@ -322,7 +331,8 @@ class SelectFilesFunction : public FileBrowserFunction {
// Cancel file selection Dialog. Closes the dialog window.
class CancelFileDialogFunction : public FileBrowserFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.cancelDialog");
+ DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.cancelDialog",
+ FILEBROWSERPRIVATE_CANCELDIALOG)
CancelFileDialogFunction() {}
@@ -336,7 +346,8 @@ class CancelFileDialogFunction : public FileBrowserFunction {
// Mount a device or a file.
class AddMountFunction : public FileBrowserFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.addMount");
+ DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.addMount",
+ FILEBROWSERPRIVATE_ADDMOUNT)
AddMountFunction();
@@ -361,7 +372,8 @@ class AddMountFunction : public FileBrowserFunction {
// Unmounts selected device. Expects mount point path as an argument.
class RemoveMountFunction : public FileBrowserFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.removeMount");
+ DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.removeMount",
+ FILEBROWSERPRIVATE_REMOVEMOUNT)
RemoveMountFunction();
@@ -379,7 +391,8 @@ class RemoveMountFunction : public FileBrowserFunction {
class GetMountPointsFunction : public AsyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.getMountPoints");
+ DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.getMountPoints",
+ FILEBROWSERPRIVATE_GETMOUNTPOINTS)
GetMountPointsFunction();
@@ -393,7 +406,8 @@ class GetMountPointsFunction : public AsyncExtensionFunction {
// Formats Device given its mount path.
class FormatDeviceFunction : public FileBrowserFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.formatDevice");
+ DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.formatDevice",
+ FILEBROWSERPRIVATE_FORMATDEVICE)
FormatDeviceFunction();
@@ -407,7 +421,8 @@ class FormatDeviceFunction : public FileBrowserFunction {
// Sets last modified date in seconds of local file
class SetLastModifiedFunction : public FileBrowserFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.setLastModified");
+ DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.setLastModified",
+ FILEBROWSERPRIVATE_SETLASTMODIFIED)
SetLastModifiedFunction();
@@ -422,7 +437,8 @@ class SetLastModifiedFunction : public FileBrowserFunction {
class GetSizeStatsFunction : public FileBrowserFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.getSizeStats");
+ DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.getSizeStats",
+ FILEBROWSERPRIVATE_GETSIZESTATS)
GetSizeStatsFunction();
@@ -445,7 +461,8 @@ class GetSizeStatsFunction : public FileBrowserFunction {
// Retrieves devices meta-data. Expects volume's device path as an argument.
class GetVolumeMetadataFunction : public FileBrowserFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.getVolumeMetadata");
+ DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.getVolumeMetadata",
+ FILEBROWSERPRIVATE_GETVOLUMEMETADATA)
GetVolumeMetadataFunction();
@@ -459,7 +476,8 @@ class GetVolumeMetadataFunction : public FileBrowserFunction {
// Toggles fullscreen mode for the browser.
class ToggleFullscreenFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.toggleFullscreen");
+ DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.toggleFullscreen",
+ FILEBROWSERPRIVATE_TOGGLEFULLSCREEN)
protected:
virtual ~ToggleFullscreenFunction() {}
@@ -471,7 +489,8 @@ class ToggleFullscreenFunction : public SyncExtensionFunction {
// Checks if the browser is in fullscreen mode.
class IsFullscreenFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.isFullscreen");
+ DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.isFullscreen",
+ FILEBROWSERPRIVATE_ISFULLSCREEN)
protected:
virtual ~IsFullscreenFunction() {}
@@ -483,7 +502,8 @@ class IsFullscreenFunction : public SyncExtensionFunction {
// File Dialog Strings.
class FileDialogStringsFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.getStrings");
+ DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.getStrings",
+ FILEBROWSERPRIVATE_GETSTRINGS)
FileDialogStringsFunction() {}
@@ -500,7 +520,8 @@ class FileDialogStringsFunction : public SyncExtensionFunction {
// (drive::DriveFileError) for that entry in the returned list.
class GetDriveFilePropertiesFunction : public FileBrowserFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.getDriveFileProperties");
+ DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.getDriveFileProperties",
+ FILEBROWSERPRIVATE_GETDRIVEFILEPROPERTIES)
GetDriveFilePropertiesFunction();
@@ -550,7 +571,8 @@ class GetDriveFilePropertiesFunction : public FileBrowserFunction {
// returned list.
class PinDriveFileFunction : public GetDriveFilePropertiesFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.pinDriveFile");
+ DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.pinDriveFile",
+ FILEBROWSERPRIVATE_PINDRIVEFILE)
PinDriveFileFunction();
@@ -582,7 +604,8 @@ class PinDriveFileFunction : public GetDriveFilePropertiesFunction {
// file is on gdata, and 'local' means the file is on the local drive.
class GetFileLocationsFunction : public FileBrowserFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.getFileLocations");
+ DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.getFileLocations",
+ FILEBROWSERPRIVATE_GETFILELOCATIONS)
GetFileLocationsFunction();
@@ -603,7 +626,8 @@ class GetFileLocationsFunction : public FileBrowserFunction {
// TODO(satorux): Should we propagate error types to the JavasScript layer?
class GetDriveFilesFunction : public FileBrowserFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.getDriveFiles");
+ DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.getDriveFiles",
+ FILEBROWSERPRIVATE_GETDRIVEFILES)
GetDriveFilesFunction();
@@ -636,7 +660,8 @@ class GetDriveFilesFunction : public FileBrowserFunction {
// Implements the chrome.fileBrowserPrivate.executeTask method.
class GetFileTransfersFunction : public AsyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.getFileTransfers");
+ DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.getFileTransfers",
+ FILEBROWSERPRIVATE_GETFILETRANSFERS)
GetFileTransfersFunction();
@@ -653,7 +678,8 @@ class GetFileTransfersFunction : public AsyncExtensionFunction {
// Implements the chrome.fileBrowserPrivate.cancelFileTransfers method.
class CancelFileTransfersFunction : public FileBrowserFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.cancelFileTransfers");
+ DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.cancelFileTransfers",
+ FILEBROWSERPRIVATE_CANCELFILETRANSFERS)
CancelFileTransfersFunction();
@@ -667,7 +693,8 @@ class CancelFileTransfersFunction : public FileBrowserFunction {
// Implements the chrome.fileBrowserPrivate.transferFile method.
class TransferFileFunction : public FileBrowserFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.transferFile");
+ DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.transferFile",
+ FILEBROWSERPRIVATE_TRANSFERFILE)
TransferFileFunction();
@@ -685,7 +712,8 @@ class TransferFileFunction : public FileBrowserFunction {
// Read setting value.
class GetPreferencesFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.getPreferences");
+ DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.getPreferences",
+ FILEBROWSERPRIVATE_GETPREFERENCES)
protected:
virtual ~GetPreferencesFunction() {}
@@ -696,7 +724,8 @@ class GetPreferencesFunction : public SyncExtensionFunction {
// Write setting value.
class SetPreferencesFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.setPreferences");
+ DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.setPreferences",
+ FILEBROWSERPRIVATE_SETPREFERENCES)
protected:
virtual ~SetPreferencesFunction() {}
@@ -706,7 +735,8 @@ class SetPreferencesFunction : public SyncExtensionFunction {
class SearchDriveFunction : public AsyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.searchDrive");
+ DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.searchDrive",
+ FILEBROWSERPRIVATE_SEARCHDRIVE)
SearchDriveFunction();
@@ -737,7 +767,8 @@ class SearchDriveFunction : public AsyncExtensionFunction {
class ClearDriveCacheFunction : public AsyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.clearDriveCache");
+ DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.clearDriveCache",
+ FILEBROWSERPRIVATE_CLEARDRIVECACHE)
protected:
virtual ~ClearDriveCacheFunction() {}
@@ -749,7 +780,8 @@ class ClearDriveCacheFunction : public AsyncExtensionFunction {
// which is used to reload the file system metadata from the server.
class ReloadDriveFunction: public AsyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.reloadDrive");
+ DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.reloadDrive",
+ FILEBROWSERPRIVATE_RELOADDRIVE)
protected:
virtual ~ReloadDriveFunction() {}
@@ -760,8 +792,9 @@ class ReloadDriveFunction: public AsyncExtensionFunction {
// Implements the chrome.fileBrowserPrivate.getNetworkConnectionState method.
class GetNetworkConnectionStateFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME(
- "fileBrowserPrivate.getNetworkConnectionState");
+ DECLARE_EXTENSION_FUNCTION(
+ "fileBrowserPrivate.getNetworkConnectionState",
+ FILEBROWSERPRIVATE_GETNETWORKCONNECTIONSTATE);
protected:
virtual ~GetNetworkConnectionStateFunction() {}
@@ -772,8 +805,9 @@ class GetNetworkConnectionStateFunction : public SyncExtensionFunction {
// Implements the chrome.fileBrowserPrivate.requestDirectoryRefresh method.
class RequestDirectoryRefreshFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME(
- "fileBrowserPrivate.requestDirectoryRefresh");
+ DECLARE_EXTENSION_FUNCTION(
+ "fileBrowserPrivate.requestDirectoryRefresh",
+ FILEBROWSERPRIVATE_REQUESTDIRECTORYREFRESH);
protected:
virtual ~RequestDirectoryRefreshFunction() {}
@@ -785,7 +819,8 @@ class RequestDirectoryRefreshFunction : public SyncExtensionFunction {
class ZipSelectionFunction : public FileBrowserFunction,
public extensions::ZipFileCreator::Observer {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.zipSelection");
+ DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.zipSelection",
+ FILEBROWSERPRIVATE_ZIPSELECTION)
ZipSelectionFunction();
diff --git a/chrome/browser/chromeos/extensions/info_private_api.h b/chrome/browser/chromeos/extensions/info_private_api.h
index 0e60a3f..e8183ab 100644
--- a/chrome/browser/chromeos/extensions/info_private_api.h
+++ b/chrome/browser/chromeos/extensions/info_private_api.h
@@ -29,7 +29,7 @@ class GetChromeosInfoFunction : public AsyncExtensionFunction {
// Returns a newly allocate value, or null.
base::Value* GetValue(const std::string& property_name);
- DECLARE_EXTENSION_FUNCTION_NAME("chromeosInfoPrivate.get");
+ DECLARE_EXTENSION_FUNCTION("chromeosInfoPrivate.get", CHROMEOSINFOPRIVATE_GET)
};
} // namespace extensions
diff --git a/chrome/browser/chromeos/extensions/input_method_api.h b/chrome/browser/chromeos/extensions/input_method_api.h
index 719c302..98c3126 100644
--- a/chrome/browser/chromeos/extensions/input_method_api.h
+++ b/chrome/browser/chromeos/extensions/input_method_api.h
@@ -28,7 +28,7 @@ class GetInputMethodFunction : public SyncExtensionFunction {
virtual bool RunImpl() OVERRIDE;
private:
- DECLARE_EXTENSION_FUNCTION_NAME("inputMethodPrivate.get");
+ DECLARE_EXTENSION_FUNCTION("inputMethodPrivate.get", INPUTMETHODPRIVATE_GET)
};
class InputMethodAPI : public ProfileKeyedService,
diff --git a/chrome/browser/chromeos/extensions/media_player_api.h b/chrome/browser/chromeos/extensions/media_player_api.h
index 17b012c..bec3315 100644
--- a/chrome/browser/chromeos/extensions/media_player_api.h
+++ b/chrome/browser/chromeos/extensions/media_player_api.h
@@ -21,7 +21,7 @@ class MediaPlayerEventRouter;
// Implements the chrome.mediaPlayerPrivate.play method.
class PlayMediaplayerFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("mediaPlayerPrivate.play");
+ DECLARE_EXTENSION_FUNCTION("mediaPlayerPrivate.play", MEDIAPLAYERPRIVATE_PLAY)
protected:
virtual ~PlayMediaplayerFunction() {}
@@ -33,7 +33,8 @@ class PlayMediaplayerFunction : public SyncExtensionFunction {
// Implements the chrome.mediaPlayerPrivate.getPlaylist method.
class GetPlaylistMediaplayerFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("mediaPlayerPrivate.getPlaylist");
+ DECLARE_EXTENSION_FUNCTION("mediaPlayerPrivate.getPlaylist",
+ MEDIAPLAYERPRIVATE_GETPLAYLIST)
protected:
virtual ~GetPlaylistMediaplayerFunction() {}
@@ -45,7 +46,8 @@ class GetPlaylistMediaplayerFunction : public SyncExtensionFunction {
// Implements the chrome.mediaPlayerPrivate.setWindowHeight method.
class SetWindowHeightMediaplayerFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("mediaPlayerPrivate.setWindowHeight");
+ DECLARE_EXTENSION_FUNCTION("mediaPlayerPrivate.setWindowHeight",
+ MEDIAPLAYERPRIVATE_SETWINDOWHEIGHT)
protected:
virtual ~SetWindowHeightMediaplayerFunction() {}
@@ -57,7 +59,8 @@ class SetWindowHeightMediaplayerFunction : public SyncExtensionFunction {
// Implements the chrome.mediaPlayerPrivate.closeWindow method.
class CloseWindowMediaplayerFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("mediaPlayerPrivate.closeWindow");
+ DECLARE_EXTENSION_FUNCTION("mediaPlayerPrivate.closeWindow",
+ MEDIAPLAYERPRIVATE_CLOSEWINDOW)
protected:
virtual ~CloseWindowMediaplayerFunction() {}
diff --git a/chrome/browser/chromeos/extensions/power/power_api.h b/chrome/browser/chromeos/extensions/power/power_api.h
index 31bc80e..16a5da2 100644
--- a/chrome/browser/chromeos/extensions/power/power_api.h
+++ b/chrome/browser/chromeos/extensions/power/power_api.h
@@ -13,7 +13,8 @@ namespace power {
// Implementation of the chrome.experimental.power.requestKeepAwake API.
class RequestKeepAwakeFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("experimental.power.requestKeepAwake")
+ DECLARE_EXTENSION_FUNCTION("experimental.power.requestKeepAwake",
+ EXPERIMENTAL_POWER_REQUESTKEEPAWAKE)
protected:
virtual ~RequestKeepAwakeFunction() {}
@@ -25,7 +26,8 @@ class RequestKeepAwakeFunction : public SyncExtensionFunction {
// Implementation of the chrome.experimental.power.releaseKeepAwake API.
class ReleaseKeepAwakeFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("experimental.power.releaseKeepAwake")
+ DECLARE_EXTENSION_FUNCTION("experimental.power.releaseKeepAwake",
+ EXPERIMENTAL_POWER_RELEASEKEEPAWAKE)
protected:
virtual ~ReleaseKeepAwakeFunction() {}
diff --git a/chrome/browser/chromeos/extensions/wallpaper_private_api.h b/chrome/browser/chromeos/extensions/wallpaper_private_api.h
index 1ff3e35..8aea69f 100644
--- a/chrome/browser/chromeos/extensions/wallpaper_private_api.h
+++ b/chrome/browser/chromeos/extensions/wallpaper_private_api.h
@@ -14,7 +14,8 @@
// Wallpaper manager strings.
class WallpaperStringsFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("wallpaperPrivate.getStrings");
+ DECLARE_EXTENSION_FUNCTION("wallpaperPrivate.getStrings",
+ WALLPAPERPRIVATE_GETSTRINGS)
protected:
virtual ~WallpaperStringsFunction() {}
@@ -50,7 +51,8 @@ class WallpaperFunctionBase : public AsyncExtensionFunction {
class WallpaperSetWallpaperIfExistFunction : public WallpaperFunctionBase {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("wallpaperPrivate.setWallpaperIfExist");
+ DECLARE_EXTENSION_FUNCTION("wallpaperPrivate.setWallpaperIfExist",
+ WALLPAPERPRIVATE_SETWALLPAPERIFEXIST)
WallpaperSetWallpaperIfExistFunction();
@@ -81,7 +83,8 @@ class WallpaperSetWallpaperIfExistFunction : public WallpaperFunctionBase {
class WallpaperSetWallpaperFunction : public WallpaperFunctionBase {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("wallpaperPrivate.setWallpaper");
+ DECLARE_EXTENSION_FUNCTION("wallpaperPrivate.setWallpaper",
+ WALLPAPERPRIVATE_SETWALLPAPER)
WallpaperSetWallpaperFunction();
@@ -123,7 +126,8 @@ class WallpaperSetWallpaperFunction : public WallpaperFunctionBase {
class WallpaperSetCustomWallpaperFunction : public WallpaperFunctionBase {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("wallpaperPrivate.setCustomWallpaper");
+ DECLARE_EXTENSION_FUNCTION("wallpaperPrivate.setCustomWallpaper",
+ WALLPAPERPRIVATE_SETCUSTOMWALLPAPER)
WallpaperSetCustomWallpaperFunction();
@@ -148,7 +152,8 @@ class WallpaperSetCustomWallpaperFunction : public WallpaperFunctionBase {
class WallpaperMinimizeInactiveWindowsFunction : public AsyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("wallpaperPrivate.minimizeInactiveWindows");
+ DECLARE_EXTENSION_FUNCTION("wallpaperPrivate.minimizeInactiveWindows",
+ WALLPAPERPRIVATE_MINIMIZEINACTIVEWINDOWS)
WallpaperMinimizeInactiveWindowsFunction();
@@ -161,7 +166,8 @@ class WallpaperMinimizeInactiveWindowsFunction : public AsyncExtensionFunction {
class WallpaperRestoreMinimizedWindowsFunction : public AsyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("wallpaperPrivate.restoreMinimizedWindows");
+ DECLARE_EXTENSION_FUNCTION("wallpaperPrivate.restoreMinimizedWindows",
+ WALLPAPERPRIVATE_RESTOREMINIMIZEDWINDOWS)
WallpaperRestoreMinimizedWindowsFunction();
@@ -174,7 +180,8 @@ class WallpaperRestoreMinimizedWindowsFunction : public AsyncExtensionFunction {
class WallpaperGetThumbnailFunction : public AsyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("wallpaperPrivate.getThumbnail");
+ DECLARE_EXTENSION_FUNCTION("wallpaperPrivate.getThumbnail",
+ WALLPAPERPRIVATE_GETTHUMBNAIL)
WallpaperGetThumbnailFunction();
@@ -207,7 +214,8 @@ class WallpaperGetThumbnailFunction : public AsyncExtensionFunction {
class WallpaperSaveThumbnailFunction : public AsyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("wallpaperPrivate.saveThumbnail");
+ DECLARE_EXTENSION_FUNCTION("wallpaperPrivate.saveThumbnail",
+ WALLPAPERPRIVATE_SAVETHUMBNAIL)
WallpaperSaveThumbnailFunction();
@@ -234,7 +242,8 @@ class WallpaperSaveThumbnailFunction : public AsyncExtensionFunction {
class WallpaperGetOfflineWallpaperListFunction : public AsyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("wallpaperPrivate.getOfflineWallpaperList");
+ DECLARE_EXTENSION_FUNCTION("wallpaperPrivate.getOfflineWallpaperList",
+ WALLPAPERPRIVATE_GETOFFLINEWALLPAPERLIST)
WallpaperGetOfflineWallpaperListFunction();
protected:
diff --git a/chrome/browser/extensions/api/alarms/alarms_api.h b/chrome/browser/extensions/api/alarms/alarms_api.h
index a913b52..eb521aa 100644
--- a/chrome/browser/extensions/api/alarms/alarms_api.h
+++ b/chrome/browser/extensions/api/alarms/alarms_api.h
@@ -19,7 +19,7 @@ class AlarmsCreateFunction : public SyncExtensionFunction {
// ExtensionFunction:
virtual bool RunImpl() OVERRIDE;
- DECLARE_EXTENSION_FUNCTION_NAME("alarms.create");
+ DECLARE_EXTENSION_FUNCTION("alarms.create", ALARMS_CREATE)
private:
TimeProvider now_;
};
@@ -30,7 +30,7 @@ class AlarmsGetFunction : public SyncExtensionFunction {
// ExtensionFunction:
virtual bool RunImpl() OVERRIDE;
- DECLARE_EXTENSION_FUNCTION_NAME("alarms.get");
+ DECLARE_EXTENSION_FUNCTION("alarms.get", ALARMS_GET)
};
class AlarmsGetAllFunction : public SyncExtensionFunction {
@@ -39,7 +39,7 @@ class AlarmsGetAllFunction : public SyncExtensionFunction {
// ExtensionFunction:
virtual bool RunImpl() OVERRIDE;
- DECLARE_EXTENSION_FUNCTION_NAME("alarms.getAll");
+ DECLARE_EXTENSION_FUNCTION("alarms.getAll", ALARMS_GETALL)
};
class AlarmsClearFunction : public SyncExtensionFunction {
@@ -48,7 +48,7 @@ class AlarmsClearFunction : public SyncExtensionFunction {
// ExtensionFunction:
virtual bool RunImpl() OVERRIDE;
- DECLARE_EXTENSION_FUNCTION_NAME("alarms.clear");
+ DECLARE_EXTENSION_FUNCTION("alarms.clear", ALARMS_CLEAR)
};
class AlarmsClearAllFunction : public SyncExtensionFunction {
@@ -57,7 +57,7 @@ class AlarmsClearAllFunction : public SyncExtensionFunction {
// ExtensionFunction:
virtual bool RunImpl() OVERRIDE;
- DECLARE_EXTENSION_FUNCTION_NAME("alarms.clearAll");
+ DECLARE_EXTENSION_FUNCTION("alarms.clearAll", ALARMS_CLEARALL)
};
} // namespace extensions
diff --git a/chrome/browser/extensions/api/app/app_api.h b/chrome/browser/extensions/api/app/app_api.h
index 9d0b561..7141472 100644
--- a/chrome/browser/extensions/api/app/app_api.h
+++ b/chrome/browser/extensions/api/app/app_api.h
@@ -11,7 +11,7 @@ namespace extensions {
class AppNotifyFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("experimental.app.notify");
+ DECLARE_EXTENSION_FUNCTION("experimental.app.notify", EXPERIMENTAL_APP_NOTIFY)
protected:
virtual ~AppNotifyFunction() {}
@@ -20,7 +20,8 @@ class AppNotifyFunction : public SyncExtensionFunction {
class AppClearAllNotificationsFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("experimental.app.clearAllNotifications");
+ DECLARE_EXTENSION_FUNCTION("experimental.app.clearAllNotifications",
+ EXPERIMENTAL_APP_CLEARALLNOTIFICATIONS)
protected:
virtual ~AppClearAllNotificationsFunction() {}
diff --git a/chrome/browser/extensions/api/app_current_window_internal/app_current_window_internal_api.h b/chrome/browser/extensions/api/app_current_window_internal/app_current_window_internal_api.h
index b32bb22..83cff7f 100644
--- a/chrome/browser/extensions/api/app_current_window_internal/app_current_window_internal_api.h
+++ b/chrome/browser/extensions/api/app_current_window_internal/app_current_window_internal_api.h
@@ -25,7 +25,8 @@ class AppCurrentWindowInternalExtensionFunction : public SyncExtensionFunction {
class AppCurrentWindowInternalFocusFunction
: public AppCurrentWindowInternalExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("app.currentWindowInternal.focus");
+ DECLARE_EXTENSION_FUNCTION("app.currentWindowInternal.focus",
+ APP_CURRENTWINDOWINTERNAL_FOCUS)
protected:
virtual ~AppCurrentWindowInternalFocusFunction() {}
@@ -35,7 +36,8 @@ class AppCurrentWindowInternalFocusFunction
class AppCurrentWindowInternalMaximizeFunction
: public AppCurrentWindowInternalExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("app.currentWindowInternal.maximize");
+ DECLARE_EXTENSION_FUNCTION("app.currentWindowInternal.maximize",
+ APP_CURRENTWINDOWINTERNAL_MAXIMIZE)
protected:
virtual ~AppCurrentWindowInternalMaximizeFunction() {}
@@ -45,7 +47,8 @@ class AppCurrentWindowInternalMaximizeFunction
class AppCurrentWindowInternalMinimizeFunction
: public AppCurrentWindowInternalExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("app.currentWindowInternal.minimize");
+ DECLARE_EXTENSION_FUNCTION("app.currentWindowInternal.minimize",
+ APP_CURRENTWINDOWINTERNAL_MINIMIZE)
protected:
virtual ~AppCurrentWindowInternalMinimizeFunction() {}
@@ -55,7 +58,8 @@ class AppCurrentWindowInternalMinimizeFunction
class AppCurrentWindowInternalRestoreFunction
: public AppCurrentWindowInternalExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("app.currentWindowInternal.restore");
+ DECLARE_EXTENSION_FUNCTION("app.currentWindowInternal.restore",
+ APP_CURRENTWINDOWINTERNAL_RESTORE)
protected:
virtual ~AppCurrentWindowInternalRestoreFunction() {}
@@ -65,7 +69,8 @@ class AppCurrentWindowInternalRestoreFunction
class AppCurrentWindowInternalDrawAttentionFunction
: public AppCurrentWindowInternalExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("app.currentWindowInternal.drawAttention");
+ DECLARE_EXTENSION_FUNCTION("app.currentWindowInternal.drawAttention",
+ APP_CURRENTWINDOWINTERNAL_DRAWATTENTION)
protected:
virtual ~AppCurrentWindowInternalDrawAttentionFunction() {}
@@ -75,7 +80,8 @@ class AppCurrentWindowInternalDrawAttentionFunction
class AppCurrentWindowInternalClearAttentionFunction
: public AppCurrentWindowInternalExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("app.currentWindowInternal.clearAttention");
+ DECLARE_EXTENSION_FUNCTION("app.currentWindowInternal.clearAttention",
+ APP_CURRENTWINDOWINTERNAL_CLEARATTENTION)
protected:
virtual ~AppCurrentWindowInternalClearAttentionFunction() {}
@@ -85,7 +91,8 @@ class AppCurrentWindowInternalClearAttentionFunction
class AppCurrentWindowInternalShowFunction
: public AppCurrentWindowInternalExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("app.currentWindowInternal.show");
+ DECLARE_EXTENSION_FUNCTION("app.currentWindowInternal.show",
+ APP_CURRENTWINDOWINTERNAL_SHOW)
protected:
virtual ~AppCurrentWindowInternalShowFunction() {}
@@ -95,7 +102,8 @@ class AppCurrentWindowInternalShowFunction
class AppCurrentWindowInternalHideFunction
: public AppCurrentWindowInternalExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("app.currentWindowInternal.hide");
+ DECLARE_EXTENSION_FUNCTION("app.currentWindowInternal.hide",
+ APP_CURRENTWINDOWINTERNAL_HIDE)
protected:
virtual ~AppCurrentWindowInternalHideFunction() {}
@@ -105,7 +113,8 @@ class AppCurrentWindowInternalHideFunction
class AppCurrentWindowInternalSetBoundsFunction
: public AppCurrentWindowInternalExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("app.currentWindowInternal.setBounds");
+ DECLARE_EXTENSION_FUNCTION("app.currentWindowInternal.setBounds",
+ APP_CURRENTWINDOWINTERNAL_SETBOUNDS)
protected:
virtual ~AppCurrentWindowInternalSetBoundsFunction() {}
virtual bool RunWithWindow(ShellWindow* window) OVERRIDE;
@@ -114,7 +123,8 @@ class AppCurrentWindowInternalSetBoundsFunction
class AppCurrentWindowInternalSetIconFunction
: public AppCurrentWindowInternalExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("app.currentWindowInternal.setIcon");
+ DECLARE_EXTENSION_FUNCTION("app.currentWindowInternal.setIcon",
+ APP_CURRENTWINDOWINTERNAL_SETICON)
protected:
virtual ~AppCurrentWindowInternalSetIconFunction() {}
diff --git a/chrome/browser/extensions/api/app_runtime/app_runtime_api.h b/chrome/browser/extensions/api/app_runtime/app_runtime_api.h
index 3231c7c..0611c49 100644
--- a/chrome/browser/extensions/api/app_runtime/app_runtime_api.h
+++ b/chrome/browser/extensions/api/app_runtime/app_runtime_api.h
@@ -64,7 +64,8 @@ class AppEventRouter {
class AppRuntimePostIntentResponseFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("app.runtime.postIntentResponse");
+ DECLARE_EXTENSION_FUNCTION("app.runtime.postIntentResponse",
+ APP_RUNTIME_POSTINTENTRESPONSE)
protected:
virtual ~AppRuntimePostIntentResponseFunction() {}
diff --git a/chrome/browser/extensions/api/app_window/app_window_api.h b/chrome/browser/extensions/api/app_window/app_window_api.h
index f8b547e..72524d6 100644
--- a/chrome/browser/extensions/api/app_window/app_window_api.h
+++ b/chrome/browser/extensions/api/app_window/app_window_api.h
@@ -11,7 +11,7 @@ namespace extensions {
class AppWindowCreateFunction : public AsyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("app.window.create");
+ DECLARE_EXTENSION_FUNCTION("app.window.create", APP_WINDOW_CREATE)
void SendDelayedResponse();
diff --git a/chrome/browser/extensions/api/autotest_private/autotest_private_api.h b/chrome/browser/extensions/api/autotest_private/autotest_private_api.h
index b4a7a33..8b9858c 100644
--- a/chrome/browser/extensions/api/autotest_private/autotest_private_api.h
+++ b/chrome/browser/extensions/api/autotest_private/autotest_private_api.h
@@ -15,7 +15,7 @@ namespace extensions {
class AutotestPrivateLogoutFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("autotestPrivate.logout");
+ DECLARE_EXTENSION_FUNCTION("autotestPrivate.logout", AUTOTESTPRIVATE_LOGOUT)
private:
virtual ~AutotestPrivateLogoutFunction() {}
@@ -24,7 +24,7 @@ class AutotestPrivateLogoutFunction : public SyncExtensionFunction {
class AutotestPrivateRestartFunction: public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("autotestPrivate.restart");
+ DECLARE_EXTENSION_FUNCTION("autotestPrivate.restart", AUTOTESTPRIVATE_RESTART)
private:
virtual ~AutotestPrivateRestartFunction() {}
@@ -33,7 +33,8 @@ class AutotestPrivateRestartFunction: public SyncExtensionFunction {
class AutotestPrivateShutdownFunction: public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("autotestPrivate.shutdown");
+ DECLARE_EXTENSION_FUNCTION("autotestPrivate.shutdown",
+ AUTOTESTPRIVATE_SHUTDOWN)
private:
virtual ~AutotestPrivateShutdownFunction() {}
@@ -42,7 +43,8 @@ class AutotestPrivateShutdownFunction: public SyncExtensionFunction {
class AutotestPrivateLoginStatusFunction: public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("autotestPrivate.loginStatus");
+ DECLARE_EXTENSION_FUNCTION("autotestPrivate.loginStatus",
+ AUTOTESTPRIVATE_LOGINSTATUS)
private:
virtual ~AutotestPrivateLoginStatusFunction() {}
diff --git a/chrome/browser/extensions/api/bluetooth/bluetooth_api.h b/chrome/browser/extensions/api/bluetooth/bluetooth_api.h
index edb7d22..b377498 100644
--- a/chrome/browser/extensions/api/bluetooth/bluetooth_api.h
+++ b/chrome/browser/extensions/api/bluetooth/bluetooth_api.h
@@ -58,7 +58,8 @@ namespace api {
class BluetoothGetAdapterStateFunction : public BluetoothExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("bluetooth.getAdapterState")
+ DECLARE_EXTENSION_FUNCTION("bluetooth.getAdapterState",
+ BLUETOOTH_GETADAPTERSTATE)
protected:
virtual ~BluetoothGetAdapterStateFunction() {}
@@ -69,7 +70,7 @@ class BluetoothGetAdapterStateFunction : public BluetoothExtensionFunction {
class BluetoothGetDevicesFunction : public BluetoothExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("bluetooth.getDevices")
+ DECLARE_EXTENSION_FUNCTION("bluetooth.getDevices", BLUETOOTH_GETDEVICES)
BluetoothGetDevicesFunction();
@@ -91,7 +92,7 @@ class BluetoothGetDevicesFunction : public BluetoothExtensionFunction {
class BluetoothGetServicesFunction : public BluetoothExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("bluetooth.getServices")
+ DECLARE_EXTENSION_FUNCTION("bluetooth.getServices", BLUETOOTH_GETSERVICES)
protected:
virtual ~BluetoothGetServicesFunction() {}
@@ -108,7 +109,7 @@ class BluetoothGetServicesFunction : public BluetoothExtensionFunction {
class BluetoothConnectFunction : public BluetoothExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("bluetooth.connect")
+ DECLARE_EXTENSION_FUNCTION("bluetooth.connect", BLUETOOTH_CONNECT)
protected:
virtual ~BluetoothConnectFunction() {}
@@ -125,7 +126,7 @@ class BluetoothConnectFunction : public BluetoothExtensionFunction {
class BluetoothDisconnectFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("bluetooth.disconnect")
+ DECLARE_EXTENSION_FUNCTION("bluetooth.disconnect", BLUETOOTH_DISCONNECT)
protected:
virtual ~BluetoothDisconnectFunction() {}
@@ -136,7 +137,7 @@ class BluetoothDisconnectFunction : public SyncExtensionFunction {
class BluetoothReadFunction : public AsyncApiFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("bluetooth.read")
+ DECLARE_EXTENSION_FUNCTION("bluetooth.read", BLUETOOTH_READ)
BluetoothReadFunction();
protected:
@@ -154,7 +155,7 @@ class BluetoothReadFunction : public AsyncApiFunction {
class BluetoothWriteFunction : public AsyncApiFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("bluetooth.write")
+ DECLARE_EXTENSION_FUNCTION("bluetooth.write", BLUETOOTH_WRITE)
BluetoothWriteFunction();
protected:
@@ -174,7 +175,8 @@ class BluetoothWriteFunction : public AsyncApiFunction {
class BluetoothSetOutOfBandPairingDataFunction
: public BluetoothExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("bluetooth.setOutOfBandPairingData")
+ DECLARE_EXTENSION_FUNCTION("bluetooth.setOutOfBandPairingData",
+ BLUETOOTH_SETOUTOFBANDPAIRINGDATA)
protected:
virtual ~BluetoothSetOutOfBandPairingDataFunction() {}
@@ -189,7 +191,8 @@ class BluetoothSetOutOfBandPairingDataFunction
class BluetoothGetLocalOutOfBandPairingDataFunction
: public BluetoothExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("bluetooth.getLocalOutOfBandPairingData")
+ DECLARE_EXTENSION_FUNCTION("bluetooth.getLocalOutOfBandPairingData",
+ BLUETOOTH_GETLOCALOUTOFBANDPAIRINGDATA)
protected:
virtual ~BluetoothGetLocalOutOfBandPairingDataFunction() {}
@@ -204,7 +207,8 @@ class BluetoothGetLocalOutOfBandPairingDataFunction
class BluetoothStartDiscoveryFunction : public BluetoothExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("bluetooth.startDiscovery")
+ DECLARE_EXTENSION_FUNCTION("bluetooth.startDiscovery",
+ BLUETOOTH_STARTDISCOVERY)
protected:
virtual ~BluetoothStartDiscoveryFunction() {}
@@ -219,7 +223,7 @@ class BluetoothStartDiscoveryFunction : public BluetoothExtensionFunction {
class BluetoothStopDiscoveryFunction : public BluetoothExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("bluetooth.stopDiscovery")
+ DECLARE_EXTENSION_FUNCTION("bluetooth.stopDiscovery", BLUETOOTH_STOPDISCOVERY)
protected:
virtual ~BluetoothStopDiscoveryFunction() {}
diff --git a/chrome/browser/extensions/api/bookmark_manager_private/bookmark_manager_private_api.h b/chrome/browser/extensions/api/bookmark_manager_private/bookmark_manager_private_api.h
index 77b5850..94040fe 100644
--- a/chrome/browser/extensions/api/bookmark_manager_private/bookmark_manager_private_api.h
+++ b/chrome/browser/extensions/api/bookmark_manager_private/bookmark_manager_private_api.h
@@ -64,7 +64,8 @@ class ClipboardBookmarkManagerFunction : public extensions::BookmarksFunction {
class CopyBookmarkManagerFunction : public ClipboardBookmarkManagerFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("bookmarkManagerPrivate.copy");
+ DECLARE_EXTENSION_FUNCTION("bookmarkManagerPrivate.copy",
+ BOOKMARKMANAGERPRIVATE_COPY)
protected:
virtual ~CopyBookmarkManagerFunction() {}
@@ -75,7 +76,8 @@ class CopyBookmarkManagerFunction : public ClipboardBookmarkManagerFunction {
class CutBookmarkManagerFunction : public ClipboardBookmarkManagerFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("bookmarkManagerPrivate.cut");
+ DECLARE_EXTENSION_FUNCTION("bookmarkManagerPrivate.cut",
+ BOOKMARKMANAGERPRIVATE_CUT)
protected:
virtual ~CutBookmarkManagerFunction() {}
@@ -86,7 +88,8 @@ class CutBookmarkManagerFunction : public ClipboardBookmarkManagerFunction {
class PasteBookmarkManagerFunction : public extensions::BookmarksFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("bookmarkManagerPrivate.paste");
+ DECLARE_EXTENSION_FUNCTION("bookmarkManagerPrivate.paste",
+ BOOKMARKMANAGERPRIVATE_PASTE)
protected:
virtual ~PasteBookmarkManagerFunction() {}
@@ -97,7 +100,8 @@ class PasteBookmarkManagerFunction : public extensions::BookmarksFunction {
class CanPasteBookmarkManagerFunction : public extensions::BookmarksFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("bookmarkManagerPrivate.canPaste");
+ DECLARE_EXTENSION_FUNCTION("bookmarkManagerPrivate.canPaste",
+ BOOKMARKMANAGERPRIVATE_CANPASTE)
protected:
virtual ~CanPasteBookmarkManagerFunction() {}
@@ -109,7 +113,8 @@ class CanPasteBookmarkManagerFunction : public extensions::BookmarksFunction {
class SortChildrenBookmarkManagerFunction
: public extensions::BookmarksFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("bookmarkManagerPrivate.sortChildren");
+ DECLARE_EXTENSION_FUNCTION("bookmarkManagerPrivate.sortChildren",
+ BOOKMARKMANAGERPRIVATE_SORTCHILDREN)
protected:
virtual ~SortChildrenBookmarkManagerFunction() {}
@@ -120,7 +125,8 @@ class SortChildrenBookmarkManagerFunction
class BookmarkManagerGetStringsFunction : public AsyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("bookmarkManagerPrivate.getStrings");
+ DECLARE_EXTENSION_FUNCTION("bookmarkManagerPrivate.getStrings",
+ BOOKMARKMANAGERPRIVATE_GETSTRINGS)
protected:
virtual ~BookmarkManagerGetStringsFunction() {}
@@ -131,7 +137,8 @@ class BookmarkManagerGetStringsFunction : public AsyncExtensionFunction {
class StartDragBookmarkManagerFunction : public extensions::BookmarksFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("bookmarkManagerPrivate.startDrag");
+ DECLARE_EXTENSION_FUNCTION("bookmarkManagerPrivate.startDrag",
+ BOOKMARKMANAGERPRIVATE_STARTDRAG)
protected:
virtual ~StartDragBookmarkManagerFunction() {}
@@ -142,7 +149,8 @@ class StartDragBookmarkManagerFunction : public extensions::BookmarksFunction {
class DropBookmarkManagerFunction : public extensions::BookmarksFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("bookmarkManagerPrivate.drop");
+ DECLARE_EXTENSION_FUNCTION("bookmarkManagerPrivate.drop",
+ BOOKMARKMANAGERPRIVATE_DROP)
protected:
virtual ~DropBookmarkManagerFunction() {}
@@ -153,7 +161,8 @@ class DropBookmarkManagerFunction : public extensions::BookmarksFunction {
class GetSubtreeBookmarkManagerFunction : public extensions::BookmarksFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("bookmarkManagerPrivate.getSubtree");
+ DECLARE_EXTENSION_FUNCTION("bookmarkManagerPrivate.getSubtree",
+ BOOKMARKMANAGERPRIVATE_GETSUBTREE)
protected:
virtual ~GetSubtreeBookmarkManagerFunction() {}
@@ -164,7 +173,8 @@ class GetSubtreeBookmarkManagerFunction : public extensions::BookmarksFunction {
class CanEditBookmarkManagerFunction : public extensions::BookmarksFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("bookmarkManagerPrivate.canEdit");
+ DECLARE_EXTENSION_FUNCTION("bookmarkManagerPrivate.canEdit",
+ BOOKMARKMANAGERPRIVATE_CANEDIT)
protected:
virtual ~CanEditBookmarkManagerFunction() {}
@@ -175,7 +185,8 @@ class CanEditBookmarkManagerFunction : public extensions::BookmarksFunction {
class RecordLaunchBookmarkFunction : public extensions::BookmarksFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("bookmarkManagerPrivate.recordLaunch")
+ DECLARE_EXTENSION_FUNCTION("bookmarkManagerPrivate.recordLaunch",
+ BOOKMARKMANAGERPRIVATE_RECORDLAUNCH)
protected:
virtual ~RecordLaunchBookmarkFunction() {}
@@ -186,7 +197,8 @@ class RecordLaunchBookmarkFunction : public extensions::BookmarksFunction {
class CanOpenNewWindowsBookmarkFunction : public extensions::BookmarksFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("bookmarkManagerPrivate.canOpenNewWindows");
+ DECLARE_EXTENSION_FUNCTION("bookmarkManagerPrivate.canOpenNewWindows",
+ BOOKMARKMANAGERPRIVATE_CANOPENNEWWINDOWS)
protected:
virtual ~CanOpenNewWindowsBookmarkFunction() {}
diff --git a/chrome/browser/extensions/api/bookmarks/bookmarks_api.h b/chrome/browser/extensions/api/bookmarks/bookmarks_api.h
index 612b099..82f847c 100644
--- a/chrome/browser/extensions/api/bookmarks/bookmarks_api.h
+++ b/chrome/browser/extensions/api/bookmarks/bookmarks_api.h
@@ -129,7 +129,7 @@ class BookmarksFunction : public AsyncExtensionFunction,
class BookmarksGetTreeFunction : public BookmarksFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("bookmarks.get")
+ DECLARE_EXTENSION_FUNCTION("bookmarks.get", BOOKMARKS_GET)
protected:
virtual ~BookmarksGetTreeFunction() {}
@@ -140,7 +140,7 @@ class BookmarksGetTreeFunction : public BookmarksFunction {
class BookmarksGetChildrenFunction : public BookmarksFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("bookmarks.getChildren")
+ DECLARE_EXTENSION_FUNCTION("bookmarks.getChildren", BOOKMARKS_GETCHILDREN)
protected:
virtual ~BookmarksGetChildrenFunction() {}
@@ -151,7 +151,7 @@ class BookmarksGetChildrenFunction : public BookmarksFunction {
class BookmarksGetFunction : public BookmarksFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("bookmarks.getRecent")
+ DECLARE_EXTENSION_FUNCTION("bookmarks.getRecent", BOOKMARKS_GETRECENT)
protected:
virtual ~BookmarksGetFunction() {}
@@ -162,7 +162,7 @@ class BookmarksGetFunction : public BookmarksFunction {
class BookmarksGetSubTreeFunction : public BookmarksFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("bookmarks.getTree")
+ DECLARE_EXTENSION_FUNCTION("bookmarks.getTree", BOOKMARKS_GETTREE)
protected:
virtual ~BookmarksGetSubTreeFunction() {}
@@ -173,7 +173,7 @@ class BookmarksGetSubTreeFunction : public BookmarksFunction {
class BookmarksGetRecentFunction : public BookmarksFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("bookmarks.getSubTree")
+ DECLARE_EXTENSION_FUNCTION("bookmarks.getSubTree", BOOKMARKS_GETSUBTREE)
protected:
virtual ~BookmarksGetRecentFunction() {}
@@ -184,7 +184,7 @@ class BookmarksGetRecentFunction : public BookmarksFunction {
class BookmarksSearchFunction : public BookmarksFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("bookmarks.search")
+ DECLARE_EXTENSION_FUNCTION("bookmarks.search", BOOKMARKS_SEARCH)
protected:
virtual ~BookmarksSearchFunction() {}
@@ -195,7 +195,7 @@ class BookmarksSearchFunction : public BookmarksFunction {
class BookmarksRemoveFunction : public BookmarksFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("bookmarks.remove")
+ DECLARE_EXTENSION_FUNCTION("bookmarks.remove", BOOKMARKS_REMOVE)
// Returns true on successful parse and sets invalid_id to true if conversion
// from id string to int64 failed.
@@ -214,7 +214,7 @@ class BookmarksRemoveFunction : public BookmarksFunction {
class BookmarksRemoveTreeFunction : public BookmarksRemoveFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("bookmarks.removeTree")
+ DECLARE_EXTENSION_FUNCTION("bookmarks.removeTree", BOOKMARKS_REMOVETREE)
protected:
virtual ~BookmarksRemoveTreeFunction() {}
@@ -222,7 +222,7 @@ class BookmarksRemoveTreeFunction : public BookmarksRemoveFunction {
class BookmarksCreateFunction : public BookmarksFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("bookmarks.create")
+ DECLARE_EXTENSION_FUNCTION("bookmarks.create", BOOKMARKS_CREATE)
// ExtensionFunction:
virtual void GetQuotaLimitHeuristics(
@@ -237,7 +237,7 @@ class BookmarksCreateFunction : public BookmarksFunction {
class BookmarksMoveFunction : public BookmarksFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("bookmarks.move")
+ DECLARE_EXTENSION_FUNCTION("bookmarks.move", BOOKMARKS_MOVE)
static bool ExtractIds(const base::ListValue* args, std::list<int64>* ids,
bool* invalid_id);
@@ -255,7 +255,7 @@ class BookmarksMoveFunction : public BookmarksFunction {
class BookmarksUpdateFunction : public BookmarksFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("bookmarks.update")
+ DECLARE_EXTENSION_FUNCTION("bookmarks.update", BOOKMARKS_UPDATE)
static bool ExtractIds(const base::ListValue* args, std::list<int64>* ids,
bool* invalid_id);
@@ -299,7 +299,7 @@ class BookmarksIOFunction : public BookmarksFunction,
class BookmarksImportFunction : public BookmarksIOFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("bookmarks.import");
+ DECLARE_EXTENSION_FUNCTION("bookmarks.import", BOOKMARKS_IMPORT)
// BookmarkManagerIOFunction:
virtual void FileSelected(const FilePath& path, int index, void* params)
@@ -314,7 +314,7 @@ class BookmarksImportFunction : public BookmarksIOFunction {
class BookmarksExportFunction : public BookmarksIOFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("bookmarks.export");
+ DECLARE_EXTENSION_FUNCTION("bookmarks.export", BOOKMARKS_EXPORT)
// BookmarkManagerIOFunction:
virtual void FileSelected(const FilePath& path, int index, void* params)
diff --git a/chrome/browser/extensions/api/browsing_data/browsing_data_api.h b/chrome/browser/extensions/api/browsing_data/browsing_data_api.h
index 458ae98..cbabee5 100644
--- a/chrome/browser/extensions/api/browsing_data/browsing_data_api.h
+++ b/chrome/browser/extensions/api/browsing_data/browsing_data_api.h
@@ -87,7 +87,8 @@ class BrowsingDataExtensionFunction : public AsyncExtensionFunction,
class RemoveAppCacheFunction : public BrowsingDataExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("browsingData.removeAppcache")
+ DECLARE_EXTENSION_FUNCTION("browsingData.removeAppcache",
+ BROWSINGDATA_REMOVEAPPCACHE)
protected:
virtual ~RemoveAppCacheFunction() {}
@@ -98,7 +99,7 @@ class RemoveAppCacheFunction : public BrowsingDataExtensionFunction {
class RemoveBrowsingDataFunction : public BrowsingDataExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("browsingData.remove")
+ DECLARE_EXTENSION_FUNCTION("browsingData.remove", BROWSINGDATA_REMOVE)
protected:
virtual ~RemoveBrowsingDataFunction() {}
@@ -109,7 +110,8 @@ class RemoveBrowsingDataFunction : public BrowsingDataExtensionFunction {
class RemoveCacheFunction : public BrowsingDataExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("browsingData.removeCache")
+ DECLARE_EXTENSION_FUNCTION("browsingData.removeCache",
+ BROWSINGDATA_REMOVECACHE)
protected:
virtual ~RemoveCacheFunction() {}
@@ -120,7 +122,8 @@ class RemoveCacheFunction : public BrowsingDataExtensionFunction {
class RemoveCookiesFunction : public BrowsingDataExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("browsingData.removeCookies")
+ DECLARE_EXTENSION_FUNCTION("browsingData.removeCookies",
+ BROWSINGDATA_REMOVECOOKIES)
protected:
virtual ~RemoveCookiesFunction() {}
@@ -131,7 +134,8 @@ class RemoveCookiesFunction : public BrowsingDataExtensionFunction {
class RemoveDownloadsFunction : public BrowsingDataExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("browsingData.removeDownloads")
+ DECLARE_EXTENSION_FUNCTION("browsingData.removeDownloads",
+ BROWSINGDATA_REMOVEDOWNLOADS)
protected:
virtual ~RemoveDownloadsFunction() {}
@@ -142,7 +146,8 @@ class RemoveDownloadsFunction : public BrowsingDataExtensionFunction {
class RemoveFileSystemsFunction : public BrowsingDataExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("browsingData.removeFileSystems")
+ DECLARE_EXTENSION_FUNCTION("browsingData.removeFileSystems",
+ BROWSINGDATA_REMOVEFILESYSTEMS)
protected:
virtual ~RemoveFileSystemsFunction() {}
@@ -153,7 +158,8 @@ class RemoveFileSystemsFunction : public BrowsingDataExtensionFunction {
class RemoveFormDataFunction : public BrowsingDataExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("browsingData.removeFormData")
+ DECLARE_EXTENSION_FUNCTION("browsingData.removeFormData",
+ BROWSINGDATA_REMOVEFORMDATA)
protected:
virtual ~RemoveFormDataFunction() {}
@@ -164,7 +170,8 @@ class RemoveFormDataFunction : public BrowsingDataExtensionFunction {
class RemoveHistoryFunction : public BrowsingDataExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("browsingData.removeHistory")
+ DECLARE_EXTENSION_FUNCTION("browsingData.removeHistory",
+ BROWSINGDATA_REMOVEHISTORY)
protected:
virtual ~RemoveHistoryFunction() {}
@@ -175,7 +182,8 @@ class RemoveHistoryFunction : public BrowsingDataExtensionFunction {
class RemoveIndexedDBFunction : public BrowsingDataExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("browsingData.removeIndexedDB")
+ DECLARE_EXTENSION_FUNCTION("browsingData.removeIndexedDB",
+ BROWSINGDATA_REMOVEINDEXEDDB)
protected:
virtual ~RemoveIndexedDBFunction() {}
@@ -186,7 +194,8 @@ class RemoveIndexedDBFunction : public BrowsingDataExtensionFunction {
class RemoveLocalStorageFunction : public BrowsingDataExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("browsingData.removeLocalStorage")
+ DECLARE_EXTENSION_FUNCTION("browsingData.removeLocalStorage",
+ BROWSINGDATA_REMOVELOCALSTORAGE)
protected:
virtual ~RemoveLocalStorageFunction() {}
@@ -197,7 +206,8 @@ class RemoveLocalStorageFunction : public BrowsingDataExtensionFunction {
class RemovePluginDataFunction : public BrowsingDataExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("browsingData.removePluginData")
+ DECLARE_EXTENSION_FUNCTION("browsingData.removePluginData",
+ BROWSINGDATA_REMOVEPLUGINDATA)
protected:
virtual ~RemovePluginDataFunction() {}
@@ -208,7 +218,8 @@ class RemovePluginDataFunction : public BrowsingDataExtensionFunction {
class RemovePasswordsFunction : public BrowsingDataExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("browsingData.removePasswords")
+ DECLARE_EXTENSION_FUNCTION("browsingData.removePasswords",
+ BROWSINGDATA_REMOVEPASSWORDS)
protected:
virtual ~RemovePasswordsFunction() {}
@@ -219,7 +230,8 @@ class RemovePasswordsFunction : public BrowsingDataExtensionFunction {
class RemoveWebSQLFunction : public BrowsingDataExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("browsingData.removeWebSQL")
+ DECLARE_EXTENSION_FUNCTION("browsingData.removeWebSQL",
+ BROWSINGDATA_REMOVEWEBSQL)
protected:
virtual ~RemoveWebSQLFunction() {}
diff --git a/chrome/browser/extensions/api/cloud_print_private/cloud_print_private_api.h b/chrome/browser/extensions/api/cloud_print_private/cloud_print_private_api.h
index 030bf67..2197c53 100644
--- a/chrome/browser/extensions/api/cloud_print_private/cloud_print_private_api.h
+++ b/chrome/browser/extensions/api/cloud_print_private/cloud_print_private_api.h
@@ -38,7 +38,8 @@ class CloudPrintTestsDelegate {
class CloudPrintPrivateSetupConnectorFunction : public AsyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("cloudPrintPrivate.setupConnector");
+ DECLARE_EXTENSION_FUNCTION("cloudPrintPrivate.setupConnector",
+ CLOUDPRINTPRIVATE_SETUPCONNECTOR)
CloudPrintPrivateSetupConnectorFunction();
@@ -51,7 +52,8 @@ class CloudPrintPrivateSetupConnectorFunction : public AsyncExtensionFunction {
class CloudPrintPrivateGetHostNameFunction : public AsyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("cloudPrintPrivate.getHostName");
+ DECLARE_EXTENSION_FUNCTION("cloudPrintPrivate.getHostName",
+ CLOUDPRINTPRIVATE_GETHOSTNAME)
CloudPrintPrivateGetHostNameFunction();
@@ -64,7 +66,8 @@ class CloudPrintPrivateGetHostNameFunction : public AsyncExtensionFunction {
class CloudPrintPrivateGetPrintersFunction : public AsyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("cloudPrintPrivate.getPrinters");
+ DECLARE_EXTENSION_FUNCTION("cloudPrintPrivate.getPrinters",
+ CLOUDPRINTPRIVATE_GETPRINTERS)
CloudPrintPrivateGetPrintersFunction();
diff --git a/chrome/browser/extensions/api/commands/commands.h b/chrome/browser/extensions/api/commands/commands.h
index d3170b1..9acb762 100644
--- a/chrome/browser/extensions/api/commands/commands.h
+++ b/chrome/browser/extensions/api/commands/commands.h
@@ -10,7 +10,7 @@
class GetAllCommandsFunction : public SyncExtensionFunction {
virtual ~GetAllCommandsFunction() {}
virtual bool RunImpl() OVERRIDE;
- DECLARE_EXTENSION_FUNCTION_NAME("commands.getAll")
+ DECLARE_EXTENSION_FUNCTION("commands.getAll", COMMANDS_GETALL)
};
#endif // CHROME_BROWSER_EXTENSIONS_API_COMMANDS_COMMANDS_H_
diff --git a/chrome/browser/extensions/api/content_settings/content_settings_api.h b/chrome/browser/extensions/api/content_settings/content_settings_api.h
index aac0b81..8eacea3 100644
--- a/chrome/browser/extensions/api/content_settings/content_settings_api.h
+++ b/chrome/browser/extensions/api/content_settings/content_settings_api.h
@@ -17,7 +17,7 @@ namespace extensions {
class ContentSettingsClearFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("contentSettings.clear")
+ DECLARE_EXTENSION_FUNCTION("contentSettings.clear", CONTENTSETTINGS_CLEAR)
protected:
virtual ~ContentSettingsClearFunction() {}
@@ -28,7 +28,7 @@ class ContentSettingsClearFunction : public SyncExtensionFunction {
class ContentSettingsGetFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("contentSettings.get")
+ DECLARE_EXTENSION_FUNCTION("contentSettings.get", CONTENTSETTINGS_GET)
protected:
virtual ~ContentSettingsGetFunction() {}
@@ -39,7 +39,7 @@ class ContentSettingsGetFunction : public SyncExtensionFunction {
class ContentSettingsSetFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("contentSettings.set")
+ DECLARE_EXTENSION_FUNCTION("contentSettings.set", CONTENTSETTINGS_SET)
protected:
virtual ~ContentSettingsSetFunction() {}
@@ -51,7 +51,8 @@ class ContentSettingsSetFunction : public SyncExtensionFunction {
class ContentSettingsGetResourceIdentifiersFunction
: public AsyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("contentSettings.getResourceIdentifiers")
+ DECLARE_EXTENSION_FUNCTION("contentSettings.getResourceIdentifiers",
+ CONTENTSETTINGS_GETRESOURCEIDENTIFIERS)
protected:
virtual ~ContentSettingsGetResourceIdentifiersFunction() {}
diff --git a/chrome/browser/extensions/api/context_menus/context_menus_api.h b/chrome/browser/extensions/api/context_menus/context_menus_api.h
index d6b1217..91d0728 100644
--- a/chrome/browser/extensions/api/context_menus/context_menus_api.h
+++ b/chrome/browser/extensions/api/context_menus/context_menus_api.h
@@ -11,7 +11,7 @@ namespace extensions {
class ContextMenusCreateFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("contextMenus.create")
+ DECLARE_EXTENSION_FUNCTION("contextMenus.create", CONTEXTMENUS_CREATE)
protected:
virtual ~ContextMenusCreateFunction() {}
@@ -22,7 +22,7 @@ class ContextMenusCreateFunction : public SyncExtensionFunction {
class ContextMenusUpdateFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("contextMenus.update")
+ DECLARE_EXTENSION_FUNCTION("contextMenus.update", CONTEXTMENUS_UPDATE)
protected:
virtual ~ContextMenusUpdateFunction() {}
@@ -33,7 +33,7 @@ class ContextMenusUpdateFunction : public SyncExtensionFunction {
class ContextMenusRemoveFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("contextMenus.remove")
+ DECLARE_EXTENSION_FUNCTION("contextMenus.remove", CONTEXTMENUS_REMOVE)
protected:
virtual ~ContextMenusRemoveFunction() {}
@@ -44,7 +44,7 @@ class ContextMenusRemoveFunction : public SyncExtensionFunction {
class ContextMenusRemoveAllFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("contextMenus.removeAll")
+ DECLARE_EXTENSION_FUNCTION("contextMenus.removeAll", CONTEXTMENUS_REMOVEALL)
protected:
virtual ~ContextMenusRemoveAllFunction() {}
diff --git a/chrome/browser/extensions/api/cookies/cookies_api.h b/chrome/browser/extensions/api/cookies/cookies_api.h
index 7c1b377..4fd944c 100644
--- a/chrome/browser/extensions/api/cookies/cookies_api.h
+++ b/chrome/browser/extensions/api/cookies/cookies_api.h
@@ -89,7 +89,7 @@ class CookiesFunction : public AsyncExtensionFunction {
// Implements the cookies.get() extension function.
class CookiesGetFunction : public CookiesFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("cookies.get")
+ DECLARE_EXTENSION_FUNCTION("cookies.get", COOKIES_GET)
CookiesGetFunction();
@@ -112,7 +112,7 @@ class CookiesGetFunction : public CookiesFunction {
// Implements the cookies.getAll() extension function.
class CookiesGetAllFunction : public CookiesFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("cookies.getAll")
+ DECLARE_EXTENSION_FUNCTION("cookies.getAll", COOKIES_GETALL)
CookiesGetAllFunction();
@@ -135,7 +135,7 @@ class CookiesGetAllFunction : public CookiesFunction {
// Implements the cookies.set() extension function.
class CookiesSetFunction : public CookiesFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("cookies.set")
+ DECLARE_EXTENSION_FUNCTION("cookies.set", COOKIES_SET)
CookiesSetFunction();
@@ -158,7 +158,7 @@ class CookiesSetFunction : public CookiesFunction {
// Implements the cookies.remove() extension function.
class CookiesRemoveFunction : public CookiesFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("cookies.remove")
+ DECLARE_EXTENSION_FUNCTION("cookies.remove", COOKIES_REMOVE)
CookiesRemoveFunction();
@@ -181,7 +181,8 @@ class CookiesRemoveFunction : public CookiesFunction {
// Implements the cookies.getAllCookieStores() extension function.
class CookiesGetAllCookieStoresFunction : public CookiesFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("cookies.getAllCookieStores")
+ DECLARE_EXTENSION_FUNCTION("cookies.getAllCookieStores",
+ COOKIES_GETALLCOOKIESTORES)
protected:
virtual ~CookiesGetAllCookieStoresFunction() {}
diff --git a/chrome/browser/extensions/api/debugger/debugger_api.h b/chrome/browser/extensions/api/debugger/debugger_api.h
index 44243d9..89c8f2d 100644
--- a/chrome/browser/extensions/api/debugger/debugger_api.h
+++ b/chrome/browser/extensions/api/debugger/debugger_api.h
@@ -41,7 +41,7 @@ class DebuggerFunction : public AsyncExtensionFunction {
// Implements the debugger.attach() extension function.
class DebuggerAttachFunction : public DebuggerFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("debugger.attach")
+ DECLARE_EXTENSION_FUNCTION("debugger.attach", DEBUGGER_ATTACH)
DebuggerAttachFunction();
@@ -55,7 +55,7 @@ class DebuggerAttachFunction : public DebuggerFunction {
// Implements the debugger.detach() extension function.
class DebuggerDetachFunction : public DebuggerFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("debugger.detach")
+ DECLARE_EXTENSION_FUNCTION("debugger.detach", DEBUGGER_DETACH)
DebuggerDetachFunction();
@@ -69,7 +69,7 @@ class DebuggerDetachFunction : public DebuggerFunction {
// Implements the debugger.sendCommand() extension function.
class DebuggerSendCommandFunction : public DebuggerFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("debugger.sendCommand")
+ DECLARE_EXTENSION_FUNCTION("debugger.sendCommand", DEBUGGER_SENDCOMMAND)
DebuggerSendCommandFunction();
void SendResponseBody(base::DictionaryValue* result);
diff --git a/chrome/browser/extensions/api/declarative/declarative_api.h b/chrome/browser/extensions/api/declarative/declarative_api.h
index 5caf4ac..df3c1c3 100644
--- a/chrome/browser/extensions/api/declarative/declarative_api.h
+++ b/chrome/browser/extensions/api/declarative/declarative_api.h
@@ -33,7 +33,7 @@ class RulesFunction : public AsyncExtensionFunction {
class EventsAddRulesFunction : public RulesFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("events.addRules");
+ DECLARE_EXTENSION_FUNCTION("events.addRules", EVENTS_ADDRULES)
protected:
virtual ~EventsAddRulesFunction() {}
@@ -44,7 +44,7 @@ class EventsAddRulesFunction : public RulesFunction {
class EventsRemoveRulesFunction : public RulesFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("events.removeRules");
+ DECLARE_EXTENSION_FUNCTION("events.removeRules", EVENTS_REMOVERULES)
protected:
virtual ~EventsRemoveRulesFunction() {}
@@ -55,7 +55,7 @@ class EventsRemoveRulesFunction : public RulesFunction {
class EventsGetRulesFunction : public RulesFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("events.getRules");
+ DECLARE_EXTENSION_FUNCTION("events.getRules", EVENTS_GETRULES)
protected:
virtual ~EventsGetRulesFunction() {}
diff --git a/chrome/browser/extensions/api/developer_private/developer_private_api.h b/chrome/browser/extensions/api/developer_private/developer_private_api.h
index b3e189a..15f9a5c 100644
--- a/chrome/browser/extensions/api/developer_private/developer_private_api.h
+++ b/chrome/browser/extensions/api/developer_private/developer_private_api.h
@@ -85,7 +85,8 @@ namespace api {
class DeveloperPrivateAutoUpdateFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("developerPrivate.autoUpdate");
+ DECLARE_EXTENSION_FUNCTION("developerPrivate.autoUpdate",
+ DEVELOPERPRIVATE_AUTOUPDATE)
protected:
virtual ~DeveloperPrivateAutoUpdateFunction();
@@ -96,7 +97,8 @@ class DeveloperPrivateAutoUpdateFunction : public SyncExtensionFunction {
class DeveloperPrivateGetItemsInfoFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("developerPrivate.getItemsInfo");
+ DECLARE_EXTENSION_FUNCTION("developerPrivate.getItemsInfo",
+ DEVELOPERPRIVATE_GETITEMSINFO)
protected:
virtual ~DeveloperPrivateGetItemsInfoFunction();
@@ -137,7 +139,8 @@ class DeveloperPrivateGetItemsInfoFunction : public SyncExtensionFunction {
class DeveloperPrivateInspectFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("developerPrivate.inspect");
+ DECLARE_EXTENSION_FUNCTION("developerPrivate.inspect",
+ DEVELOPERPRIVATE_INSPECT)
protected:
virtual ~DeveloperPrivateInspectFunction();
@@ -148,7 +151,8 @@ class DeveloperPrivateInspectFunction : public SyncExtensionFunction {
class DeveloperPrivateAllowFileAccessFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("developerPrivate.allowFileAccess");
+ DECLARE_EXTENSION_FUNCTION("developerPrivate.allowFileAccess",
+ DEVELOPERPRIVATE_ALLOWFILEACCESS);
protected:
virtual ~DeveloperPrivateAllowFileAccessFunction();
@@ -159,7 +163,8 @@ class DeveloperPrivateAllowFileAccessFunction : public SyncExtensionFunction {
class DeveloperPrivateReloadFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("developerPrivate.reload");
+ DECLARE_EXTENSION_FUNCTION("developerPrivate.reload",
+ DEVELOPERPRIVATE_RELOAD);
protected:
virtual ~DeveloperPrivateReloadFunction();
@@ -172,7 +177,8 @@ class DeveloperPrivateEnableFunction
: public SyncExtensionFunction,
public base::SupportsWeakPtr<DeveloperPrivateEnableFunction> {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("developerPrivate.enable");
+ DECLARE_EXTENSION_FUNCTION("developerPrivate.enable",
+ DEVELOPERPRIVATE_ENABLE);
DeveloperPrivateEnableFunction();
@@ -207,7 +213,8 @@ class DeveloperPrivateChooseEntryFunction : public SyncExtensionFunction,
class DeveloperPrivateLoadUnpackedFunction
: public DeveloperPrivateChooseEntryFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("developerPrivate.loadUnpacked");
+ DECLARE_EXTENSION_FUNCTION("developerPrivate.loadUnpacked",
+ DEVELOPERPRIVATE_LOADUNPACKED);
protected:
virtual ~DeveloperPrivateLoadUnpackedFunction();
@@ -221,7 +228,8 @@ class DeveloperPrivateLoadUnpackedFunction
class DeveloperPrivateGetStringsFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("developerPrivate.getStrings");
+ DECLARE_EXTENSION_FUNCTION("developerPrivate.getStrings",
+ DEVELOPERPRIVATE_GETSTRINGS);
protected:
virtual ~DeveloperPrivateGetStringsFunction();
diff --git a/chrome/browser/extensions/api/dial/dial_api.h b/chrome/browser/extensions/api/dial/dial_api.h
index 53ed3cb..d042333 100644
--- a/chrome/browser/extensions/api/dial/dial_api.h
+++ b/chrome/browser/extensions/api/dial/dial_api.h
@@ -81,7 +81,7 @@ class DialDiscoverNowFunction : public AsyncApiFunction {
virtual bool Respond() OVERRIDE;
private:
- DECLARE_EXTENSION_FUNCTION_NAME("dial.discoverNow")
+ DECLARE_EXTENSION_FUNCTION("dial.discoverNow", DIAL_DISCOVERNOW)
// Pointer to the DIAL API for this profile. We get this on the UI thread.
DialAPI* dial_;
diff --git a/chrome/browser/extensions/api/discovery/discovery_api.h b/chrome/browser/extensions/api/discovery/discovery_api.h
index b4a0817..9336761 100644
--- a/chrome/browser/extensions/api/discovery/discovery_api.h
+++ b/chrome/browser/extensions/api/discovery/discovery_api.h
@@ -11,7 +11,8 @@ namespace extensions {
class DiscoverySuggestFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("experimental.discovery.suggest");
+ DECLARE_EXTENSION_FUNCTION("experimental.discovery.suggest",
+ EXPERIMENTAL_DISCOVERY_SUGGEST)
protected:
virtual ~DiscoverySuggestFunction() {}
@@ -20,7 +21,8 @@ class DiscoverySuggestFunction : public SyncExtensionFunction {
class DiscoveryRemoveSuggestionFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("experimental.discovery.removeSuggestion");
+ DECLARE_EXTENSION_FUNCTION("experimental.discovery.removeSuggestion",
+ EXPERIMENTAL_DISCOVERY_REMOVESUGGESTION)
protected:
virtual ~DiscoveryRemoveSuggestionFunction() {}
@@ -29,7 +31,8 @@ class DiscoveryRemoveSuggestionFunction : public SyncExtensionFunction {
class DiscoveryClearAllSuggestionsFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("experimental.discovery.clearAllSuggestions");
+ DECLARE_EXTENSION_FUNCTION("experimental.discovery.clearAllSuggestions",
+ EXPERIMENTAL_DISCOVERY_CLEARALLSUGGESTIONS)
protected:
virtual ~DiscoveryClearAllSuggestionsFunction() {}
diff --git a/chrome/browser/extensions/api/dns/dns_api.h b/chrome/browser/extensions/api/dns/dns_api.h
index 10c9ca3..1c646f6 100644
--- a/chrome/browser/extensions/api/dns/dns_api.h
+++ b/chrome/browser/extensions/api/dns/dns_api.h
@@ -19,7 +19,8 @@ namespace extensions {
class DnsResolveFunction : public AsyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("experimental.dns.resolve")
+ DECLARE_EXTENSION_FUNCTION("experimental.dns.resolve",
+ EXPERIMENTAL_DNS_RESOLVE)
DnsResolveFunction();
diff --git a/chrome/browser/extensions/api/downloads/downloads_api.h b/chrome/browser/extensions/api/downloads/downloads_api.h
index 834a0e0..725d114 100644
--- a/chrome/browser/extensions/api/downloads/downloads_api.h
+++ b/chrome/browser/extensions/api/downloads/downloads_api.h
@@ -48,7 +48,7 @@ extern const char kNotImplementedError[];
class DownloadsDownloadFunction : public AsyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("downloads.download");
+ DECLARE_EXTENSION_FUNCTION("downloads.download", DOWNLOADS_DOWNLOAD)
DownloadsDownloadFunction();
virtual bool RunImpl() OVERRIDE;
@@ -63,7 +63,7 @@ class DownloadsDownloadFunction : public AsyncExtensionFunction {
class DownloadsSearchFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("downloads.search");
+ DECLARE_EXTENSION_FUNCTION("downloads.search", DOWNLOADS_SEARCH)
DownloadsSearchFunction();
virtual bool RunImpl() OVERRIDE;
@@ -76,7 +76,7 @@ class DownloadsSearchFunction : public SyncExtensionFunction {
class DownloadsPauseFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("downloads.pause");
+ DECLARE_EXTENSION_FUNCTION("downloads.pause", DOWNLOADS_PAUSE)
DownloadsPauseFunction();
virtual bool RunImpl() OVERRIDE;
@@ -89,7 +89,7 @@ class DownloadsPauseFunction : public SyncExtensionFunction {
class DownloadsResumeFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("downloads.resume");
+ DECLARE_EXTENSION_FUNCTION("downloads.resume", DOWNLOADS_RESUME)
DownloadsResumeFunction();
virtual bool RunImpl() OVERRIDE;
@@ -102,7 +102,7 @@ class DownloadsResumeFunction : public SyncExtensionFunction {
class DownloadsCancelFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("downloads.cancel");
+ DECLARE_EXTENSION_FUNCTION("downloads.cancel", DOWNLOADS_CANCEL)
DownloadsCancelFunction();
virtual bool RunImpl() OVERRIDE;
@@ -115,7 +115,7 @@ class DownloadsCancelFunction : public SyncExtensionFunction {
class DownloadsEraseFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("downloads.erase");
+ DECLARE_EXTENSION_FUNCTION("downloads.erase", DOWNLOADS_ERASE)
DownloadsEraseFunction();
virtual bool RunImpl() OVERRIDE;
@@ -128,7 +128,8 @@ class DownloadsEraseFunction : public SyncExtensionFunction {
class DownloadsSetDestinationFunction : public AsyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("downloads.setDestination");
+ DECLARE_EXTENSION_FUNCTION("downloads.setDestination",
+ DOWNLOADS_SETDESTINATION)
DownloadsSetDestinationFunction();
virtual bool RunImpl() OVERRIDE;
@@ -141,7 +142,7 @@ class DownloadsSetDestinationFunction : public AsyncExtensionFunction {
class DownloadsAcceptDangerFunction : public AsyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("downloads.acceptDanger");
+ DECLARE_EXTENSION_FUNCTION("downloads.acceptDanger", DOWNLOADS_ACCEPTDANGER)
DownloadsAcceptDangerFunction();
virtual bool RunImpl() OVERRIDE;
@@ -155,7 +156,7 @@ class DownloadsAcceptDangerFunction : public AsyncExtensionFunction {
class DownloadsShowFunction : public AsyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("downloads.show");
+ DECLARE_EXTENSION_FUNCTION("downloads.show", DOWNLOADS_SHOW)
DownloadsShowFunction();
virtual bool RunImpl() OVERRIDE;
@@ -168,7 +169,7 @@ class DownloadsShowFunction : public AsyncExtensionFunction {
class DownloadsOpenFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("downloads.open");
+ DECLARE_EXTENSION_FUNCTION("downloads.open", DOWNLOADS_OPEN)
DownloadsOpenFunction();
virtual bool RunImpl() OVERRIDE;
@@ -181,7 +182,7 @@ class DownloadsOpenFunction : public SyncExtensionFunction {
class DownloadsDragFunction : public AsyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("downloads.drag");
+ DECLARE_EXTENSION_FUNCTION("downloads.drag", DOWNLOADS_DRAG)
DownloadsDragFunction();
virtual bool RunImpl() OVERRIDE;
@@ -194,7 +195,7 @@ class DownloadsDragFunction : public AsyncExtensionFunction {
class DownloadsGetFileIconFunction : public AsyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("downloads.getFileIcon");
+ DECLARE_EXTENSION_FUNCTION("downloads.getFileIcon", DOWNLOADS_GETFILEICON)
DownloadsGetFileIconFunction();
virtual bool RunImpl() OVERRIDE;
void SetIconExtractorForTesting(DownloadFileIconExtractor* extractor);
diff --git a/chrome/browser/extensions/api/extension_action/extension_browser_actions_api.h b/chrome/browser/extensions/api/extension_action/extension_browser_actions_api.h
index 07f2819..cc3fa1e 100644
--- a/chrome/browser/extensions/api/extension_action/extension_browser_actions_api.h
+++ b/chrome/browser/extensions/api/extension_action/extension_browser_actions_api.h
@@ -15,7 +15,7 @@
class BrowserActionSetIconFunction : public ExtensionActionSetIconFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("browserAction.setIcon")
+ DECLARE_EXTENSION_FUNCTION("browserAction.setIcon", BROWSERACTION_SETICON)
protected:
virtual ~BrowserActionSetIconFunction() {}
@@ -23,7 +23,7 @@ class BrowserActionSetIconFunction : public ExtensionActionSetIconFunction {
class BrowserActionSetTitleFunction : public ExtensionActionSetTitleFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("browserAction.setTitle")
+ DECLARE_EXTENSION_FUNCTION("browserAction.setTitle", BROWSERACTION_SETTITLE)
protected:
virtual ~BrowserActionSetTitleFunction() {}
@@ -31,7 +31,7 @@ class BrowserActionSetTitleFunction : public ExtensionActionSetTitleFunction {
class BrowserActionSetPopupFunction : public ExtensionActionSetPopupFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("browserAction.setPopup")
+ DECLARE_EXTENSION_FUNCTION("browserAction.setPopup", BROWSERACTION_SETPOPUP)
protected:
virtual ~BrowserActionSetPopupFunction() {}
@@ -39,7 +39,7 @@ class BrowserActionSetPopupFunction : public ExtensionActionSetPopupFunction {
class BrowserActionGetTitleFunction : public ExtensionActionGetTitleFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("browserAction.getTitle")
+ DECLARE_EXTENSION_FUNCTION("browserAction.getTitle", BROWSERACTION_GETTITLE)
protected:
virtual ~BrowserActionGetTitleFunction() {}
@@ -47,7 +47,7 @@ class BrowserActionGetTitleFunction : public ExtensionActionGetTitleFunction {
class BrowserActionGetPopupFunction : public ExtensionActionGetPopupFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("browserAction.getPopup")
+ DECLARE_EXTENSION_FUNCTION("browserAction.getPopup", BROWSERACTION_GETPOPUP)
protected:
virtual ~BrowserActionGetPopupFunction() {}
@@ -56,7 +56,8 @@ class BrowserActionGetPopupFunction : public ExtensionActionGetPopupFunction {
class BrowserActionSetBadgeTextFunction
: public ExtensionActionSetBadgeTextFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("browserAction.setBadgeText")
+ DECLARE_EXTENSION_FUNCTION("browserAction.setBadgeText",
+ BROWSERACTION_SETBADGETEXT)
protected:
virtual ~BrowserActionSetBadgeTextFunction() {}
@@ -65,7 +66,8 @@ class BrowserActionSetBadgeTextFunction
class BrowserActionSetBadgeBackgroundColorFunction
: public ExtensionActionSetBadgeBackgroundColorFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("browserAction.setBadgeBackgroundColor")
+ DECLARE_EXTENSION_FUNCTION("browserAction.setBadgeBackgroundColor",
+ BROWSERACTION_SETBADGEBACKGROUNDCOLOR)
protected:
virtual ~BrowserActionSetBadgeBackgroundColorFunction() {}
@@ -74,7 +76,8 @@ class BrowserActionSetBadgeBackgroundColorFunction
class BrowserActionGetBadgeTextFunction
: public ExtensionActionGetBadgeTextFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("browserAction.getBadgeText")
+ DECLARE_EXTENSION_FUNCTION("browserAction.getBadgeText",
+ BROWSERACTION_GETBADGETEXT)
protected:
virtual ~BrowserActionGetBadgeTextFunction() {}
@@ -83,7 +86,8 @@ class BrowserActionGetBadgeTextFunction
class BrowserActionGetBadgeBackgroundColorFunction
: public ExtensionActionGetBadgeBackgroundColorFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("browserAction.getBadgeBackgroundColor")
+ DECLARE_EXTENSION_FUNCTION("browserAction.getBadgeBackgroundColor",
+ BROWSERACTION_GETBADGEBACKGROUNDCOLOR)
protected:
virtual ~BrowserActionGetBadgeBackgroundColorFunction() {}
@@ -91,7 +95,7 @@ class BrowserActionGetBadgeBackgroundColorFunction
class BrowserActionEnableFunction : public ExtensionActionShowFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("browserAction.enable")
+ DECLARE_EXTENSION_FUNCTION("browserAction.enable", BROWSERACTION_ENABLE)
protected:
virtual ~BrowserActionEnableFunction() {}
@@ -99,7 +103,7 @@ class BrowserActionEnableFunction : public ExtensionActionShowFunction {
class BrowserActionDisableFunction : public ExtensionActionHideFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("browserAction.disable")
+ DECLARE_EXTENSION_FUNCTION("browserAction.disable", BROWSERACTION_DISABLE)
protected:
virtual ~BrowserActionDisableFunction() {}
diff --git a/chrome/browser/extensions/api/extension_action/extension_page_actions_api.h b/chrome/browser/extensions/api/extension_action/extension_page_actions_api.h
index bfef30c..4bb2b10 100644
--- a/chrome/browser/extensions/api/extension_action/extension_page_actions_api.h
+++ b/chrome/browser/extensions/api/extension_action/extension_page_actions_api.h
@@ -19,7 +19,8 @@ class PageActionsFunction : public SyncExtensionFunction {
// Implement chrome.pageActions.enableForTab().
class EnablePageActionsFunction : public PageActionsFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("pageActions.enableForTab")
+ DECLARE_EXTENSION_FUNCTION("pageActions.enableForTab",
+ PAGEACTIONS_ENABLEFORTAB)
protected:
virtual ~EnablePageActionsFunction() {}
@@ -31,7 +32,8 @@ class EnablePageActionsFunction : public PageActionsFunction {
// Implement chrome.pageActions.disableForTab().
class DisablePageActionsFunction : public PageActionsFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("pageActions.disableForTab")
+ DECLARE_EXTENSION_FUNCTION("pageActions.disableForTab",
+ PAGEACTIONS_DISABLEFORTAB)
protected:
virtual ~DisablePageActionsFunction() {}
@@ -46,7 +48,7 @@ class DisablePageActionsFunction : public PageActionsFunction {
class PageActionShowFunction : public ExtensionActionShowFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("pageAction.show")
+ DECLARE_EXTENSION_FUNCTION("pageAction.show", PAGEACTION_SHOW)
protected:
virtual ~PageActionShowFunction() {}
@@ -54,7 +56,7 @@ class PageActionShowFunction : public ExtensionActionShowFunction {
class PageActionHideFunction : public ExtensionActionHideFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("pageAction.hide")
+ DECLARE_EXTENSION_FUNCTION("pageAction.hide", PAGEACTION_HIDE)
protected:
virtual ~PageActionHideFunction() {}
@@ -62,7 +64,7 @@ class PageActionHideFunction : public ExtensionActionHideFunction {
class PageActionSetIconFunction : public ExtensionActionSetIconFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("pageAction.setIcon")
+ DECLARE_EXTENSION_FUNCTION("pageAction.setIcon", PAGEACTION_SETICON)
protected:
virtual ~PageActionSetIconFunction() {}
@@ -70,7 +72,7 @@ class PageActionSetIconFunction : public ExtensionActionSetIconFunction {
class PageActionSetTitleFunction : public ExtensionActionSetTitleFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("pageAction.setTitle")
+ DECLARE_EXTENSION_FUNCTION("pageAction.setTitle", PAGEACTION_SETTITLE)
protected:
virtual ~PageActionSetTitleFunction() {}
@@ -78,7 +80,7 @@ class PageActionSetTitleFunction : public ExtensionActionSetTitleFunction {
class PageActionSetPopupFunction : public ExtensionActionSetPopupFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("pageAction.setPopup")
+ DECLARE_EXTENSION_FUNCTION("pageAction.setPopup", PAGEACTION_SETPOPUP)
protected:
virtual ~PageActionSetPopupFunction() {}
@@ -86,7 +88,7 @@ class PageActionSetPopupFunction : public ExtensionActionSetPopupFunction {
class PageActionGetTitleFunction : public ExtensionActionGetTitleFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("pageAction.getTitle")
+ DECLARE_EXTENSION_FUNCTION("pageAction.getTitle", PAGEACTION_GETTITLE)
protected:
virtual ~PageActionGetTitleFunction() {}
@@ -94,7 +96,7 @@ class PageActionGetTitleFunction : public ExtensionActionGetTitleFunction {
class PageActionGetPopupFunction : public ExtensionActionGetPopupFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("pageAction.getPopup")
+ DECLARE_EXTENSION_FUNCTION("pageAction.getPopup", PAGEACTION_GETPOPUP)
protected:
virtual ~PageActionGetPopupFunction() {}
diff --git a/chrome/browser/extensions/api/extension_action/script_badge_api.h b/chrome/browser/extensions/api/extension_action/script_badge_api.h
index 74dd242..52aa573 100644
--- a/chrome/browser/extensions/api/extension_action/script_badge_api.h
+++ b/chrome/browser/extensions/api/extension_action/script_badge_api.h
@@ -34,7 +34,7 @@ class ScriptBadgeAPI : public ProfileKeyedAPI {
class ScriptBadgeSetPopupFunction : public ExtensionActionSetPopupFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("scriptBadge.setPopup")
+ DECLARE_EXTENSION_FUNCTION("scriptBadge.setPopup", SCRIPTBADGE_SETPOPUP)
protected:
virtual ~ScriptBadgeSetPopupFunction() {}
@@ -42,7 +42,7 @@ class ScriptBadgeSetPopupFunction : public ExtensionActionSetPopupFunction {
class ScriptBadgeGetPopupFunction : public ExtensionActionGetPopupFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("scriptBadge.getPopup")
+ DECLARE_EXTENSION_FUNCTION("scriptBadge.getPopup", SCRIPTBADGE_GETPOPUP)
protected:
virtual ~ScriptBadgeGetPopupFunction() {}
@@ -51,7 +51,8 @@ class ScriptBadgeGetPopupFunction : public ExtensionActionGetPopupFunction {
// scriptBadge.getAttention(tabId)
class ScriptBadgeGetAttentionFunction : public ExtensionActionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("scriptBadge.getAttention")
+ DECLARE_EXTENSION_FUNCTION("scriptBadge.getAttention",
+ SCRIPTBADGE_GETATTENTION)
virtual bool RunExtensionAction() OVERRIDE;
diff --git a/chrome/browser/extensions/api/file_system/file_system_api.h b/chrome/browser/extensions/api/file_system/file_system_api.h
index 220f6c2..6e5e58a 100644
--- a/chrome/browser/extensions/api/file_system/file_system_api.h
+++ b/chrome/browser/extensions/api/file_system/file_system_api.h
@@ -13,7 +13,8 @@ namespace extensions {
class FileSystemGetDisplayPathFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("fileSystem.getDisplayPath");
+ DECLARE_EXTENSION_FUNCTION("fileSystem.getDisplayPath",
+ FILESYSTEM_GETDISPLAYPATH)
protected:
virtual ~FileSystemGetDisplayPathFunction() {}
@@ -48,7 +49,8 @@ class FileSystemEntryFunction : public AsyncExtensionFunction {
class FileSystemGetWritableEntryFunction : public FileSystemEntryFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("fileSystem.getWritableEntry");
+ DECLARE_EXTENSION_FUNCTION("fileSystem.getWritableEntry",
+ FILESYSTEM_GETWRITABLEENTRY)
protected:
virtual ~FileSystemGetWritableEntryFunction() {}
@@ -57,7 +59,8 @@ class FileSystemGetWritableEntryFunction : public FileSystemEntryFunction {
class FileSystemIsWritableEntryFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("fileSystem.isWritableEntry");
+ DECLARE_EXTENSION_FUNCTION("fileSystem.isWritableEntry",
+ FILESYSTEM_ISWRITABLEENTRY)
protected:
virtual ~FileSystemIsWritableEntryFunction() {}
@@ -71,7 +74,7 @@ class FileSystemChooseEntryFunction : public FileSystemEntryFunction {
static void SkipPickerAndAlwaysCancelForTest();
static void StopSkippingPickerForTest();
- DECLARE_EXTENSION_FUNCTION_NAME("fileSystem.chooseEntry");
+ DECLARE_EXTENSION_FUNCTION("fileSystem.chooseEntry", FILESYSTEM_CHOOSEENTRY)
typedef std::vector<linked_ptr<extensions::api::file_system::AcceptOption> >
AcceptOptions;
diff --git a/chrome/browser/extensions/api/font_settings/font_settings_api.h b/chrome/browser/extensions/api/font_settings/font_settings_api.h
index c43db4e..183c4da 100644
--- a/chrome/browser/extensions/api/font_settings/font_settings_api.h
+++ b/chrome/browser/extensions/api/font_settings/font_settings_api.h
@@ -93,7 +93,7 @@ class FontSettingsAPI : public ProfileKeyedAPI {
// fontSettings.clearFont API function.
class FontSettingsClearFontFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("fontSettings.clearFont")
+ DECLARE_EXTENSION_FUNCTION("fontSettings.clearFont", FONTSETTINGS_CLEARFONT)
protected:
// RefCounted types have non-public destructors, as with all extension
@@ -107,7 +107,7 @@ class FontSettingsClearFontFunction : public SyncExtensionFunction {
// fontSettings.getFont API function.
class FontSettingsGetFontFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("fontSettings.getFont")
+ DECLARE_EXTENSION_FUNCTION("fontSettings.getFont", FONTSETTINGS_GETFONT)
protected:
virtual ~FontSettingsGetFontFunction() {}
@@ -119,7 +119,7 @@ class FontSettingsGetFontFunction : public SyncExtensionFunction {
// fontSettings.setFont API function.
class FontSettingsSetFontFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("fontSettings.setFont")
+ DECLARE_EXTENSION_FUNCTION("fontSettings.setFont", FONTSETTINGS_SETFONT)
protected:
virtual ~FontSettingsSetFontFunction() {}
@@ -131,7 +131,8 @@ class FontSettingsSetFontFunction : public SyncExtensionFunction {
// fontSettings.getFontList API function.
class FontSettingsGetFontListFunction : public AsyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("fontSettings.getFontList")
+ DECLARE_EXTENSION_FUNCTION("fontSettings.getFontList",
+ FONTSETTINGS_GETFONTLIST)
protected:
virtual ~FontSettingsGetFontListFunction() {}
@@ -197,7 +198,8 @@ class SetFontPrefExtensionFunction : public SyncExtensionFunction {
class FontSettingsClearDefaultFontSizeFunction
: public ClearFontPrefExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("fontSettings.clearDefaultFontSize")
+ DECLARE_EXTENSION_FUNCTION("fontSettings.clearDefaultFontSize",
+ FONTSETTINGS_CLEARDEFAULTFONTSIZE)
protected:
virtual ~FontSettingsClearDefaultFontSizeFunction() {}
@@ -209,7 +211,8 @@ class FontSettingsClearDefaultFontSizeFunction
class FontSettingsGetDefaultFontSizeFunction
: public GetFontPrefExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("fontSettings.getDefaultFontSize")
+ DECLARE_EXTENSION_FUNCTION("fontSettings.getDefaultFontSize",
+ FONTSETTINGS_GETDEFAULTFONTSIZE)
protected:
virtual ~FontSettingsGetDefaultFontSizeFunction() {}
@@ -222,7 +225,8 @@ class FontSettingsGetDefaultFontSizeFunction
class FontSettingsSetDefaultFontSizeFunction
: public SetFontPrefExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("fontSettings.setDefaultFontSize")
+ DECLARE_EXTENSION_FUNCTION("fontSettings.setDefaultFontSize",
+ FONTSETTINGS_SETDEFAULTFONTSIZE)
protected:
virtual ~FontSettingsSetDefaultFontSizeFunction() {}
@@ -235,7 +239,8 @@ class FontSettingsSetDefaultFontSizeFunction
class FontSettingsClearDefaultFixedFontSizeFunction
: public ClearFontPrefExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("fontSettings.clearDefaultFixedFontSize")
+ DECLARE_EXTENSION_FUNCTION("fontSettings.clearDefaultFixedFontSize",
+ FONTSETTINGS_CLEARDEFAULTFIXEDFONTSIZE)
protected:
virtual ~FontSettingsClearDefaultFixedFontSizeFunction() {}
@@ -247,7 +252,8 @@ class FontSettingsClearDefaultFixedFontSizeFunction
class FontSettingsGetDefaultFixedFontSizeFunction
: public GetFontPrefExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("fontSettings.getDefaultFixedFontSize")
+ DECLARE_EXTENSION_FUNCTION("fontSettings.getDefaultFixedFontSize",
+ FONTSETTINGS_GETDEFAULTFIXEDFONTSIZE)
protected:
virtual ~FontSettingsGetDefaultFixedFontSizeFunction() {}
@@ -260,7 +266,8 @@ class FontSettingsGetDefaultFixedFontSizeFunction
class FontSettingsSetDefaultFixedFontSizeFunction
: public SetFontPrefExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("fontSettings.setDefaultFixedFontSize")
+ DECLARE_EXTENSION_FUNCTION("fontSettings.setDefaultFixedFontSize",
+ FONTSETTINGS_SETDEFAULTFIXEDFONTSIZE)
protected:
virtual ~FontSettingsSetDefaultFixedFontSizeFunction() {}
@@ -273,7 +280,8 @@ class FontSettingsSetDefaultFixedFontSizeFunction
class FontSettingsClearMinimumFontSizeFunction
: public ClearFontPrefExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("fontSettings.clearMinimumFontSize")
+ DECLARE_EXTENSION_FUNCTION("fontSettings.clearMinimumFontSize",
+ FONTSETTINGS_CLEARMINIMUMFONTSIZE)
protected:
virtual ~FontSettingsClearMinimumFontSizeFunction() {}
@@ -285,7 +293,8 @@ class FontSettingsClearMinimumFontSizeFunction
class FontSettingsGetMinimumFontSizeFunction
: public GetFontPrefExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("fontSettings.getMinimumFontSize")
+ DECLARE_EXTENSION_FUNCTION("fontSettings.getMinimumFontSize",
+ FONTSETTINGS_GETMINIMUMFONTSIZE)
protected:
virtual ~FontSettingsGetMinimumFontSizeFunction() {}
@@ -298,7 +307,8 @@ class FontSettingsGetMinimumFontSizeFunction
class FontSettingsSetMinimumFontSizeFunction
: public SetFontPrefExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("fontSettings.setMinimumFontSize")
+ DECLARE_EXTENSION_FUNCTION("fontSettings.setMinimumFontSize",
+ FONTSETTINGS_SETMINIMUMFONTSIZE)
protected:
virtual ~FontSettingsSetMinimumFontSizeFunction() {}
diff --git a/chrome/browser/extensions/api/history/history_api.h b/chrome/browser/extensions/api/history/history_api.h
index 9692dba..f58e9222 100644
--- a/chrome/browser/extensions/api/history/history_api.h
+++ b/chrome/browser/extensions/api/history/history_api.h
@@ -125,7 +125,8 @@ class HistoryFunctionWithCallback : public HistoryFunction {
class HistoryGetMostVisitedFunction : public HistoryFunctionWithCallback {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("experimental.history.getMostVisited");
+ DECLARE_EXTENSION_FUNCTION("experimental.history.getMostVisited",
+ EXPERIMENTAL_HISTORY_GETMOSTVISITED)
protected:
virtual ~HistoryGetMostVisitedFunction() {}
@@ -140,7 +141,7 @@ class HistoryGetMostVisitedFunction : public HistoryFunctionWithCallback {
class HistoryGetVisitsFunction : public HistoryFunctionWithCallback {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("history.getVisits");
+ DECLARE_EXTENSION_FUNCTION("history.getVisits", HISTORY_GETVISITS)
protected:
virtual ~HistoryGetVisitsFunction() {}
@@ -157,7 +158,7 @@ class HistoryGetVisitsFunction : public HistoryFunctionWithCallback {
class HistorySearchFunction : public HistoryFunctionWithCallback {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("history.search");
+ DECLARE_EXTENSION_FUNCTION("history.search", HISTORY_SEARCH)
protected:
virtual ~HistorySearchFunction() {}
@@ -172,7 +173,7 @@ class HistorySearchFunction : public HistoryFunctionWithCallback {
class HistoryAddUrlFunction : public HistoryFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("history.addUrl");
+ DECLARE_EXTENSION_FUNCTION("history.addUrl", HISTORY_ADDURL)
protected:
virtual ~HistoryAddUrlFunction() {}
@@ -183,7 +184,7 @@ class HistoryAddUrlFunction : public HistoryFunction {
class HistoryDeleteAllFunction : public HistoryFunctionWithCallback {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("history.deleteAll");
+ DECLARE_EXTENSION_FUNCTION("history.deleteAll", HISTORY_DELETEALL)
protected:
virtual ~HistoryDeleteAllFunction() {}
@@ -198,7 +199,7 @@ class HistoryDeleteAllFunction : public HistoryFunctionWithCallback {
class HistoryDeleteUrlFunction : public HistoryFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("history.deleteUrl");
+ DECLARE_EXTENSION_FUNCTION("history.deleteUrl", HISTORY_DELETEURL)
protected:
virtual ~HistoryDeleteUrlFunction() {}
@@ -209,7 +210,7 @@ class HistoryDeleteUrlFunction : public HistoryFunction {
class HistoryDeleteRangeFunction : public HistoryFunctionWithCallback {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("history.deleteRange");
+ DECLARE_EXTENSION_FUNCTION("history.deleteRange", HISTORY_DELETERANGE)
protected:
virtual ~HistoryDeleteRangeFunction() {}
diff --git a/chrome/browser/extensions/api/i18n/i18n_api.h b/chrome/browser/extensions/api/i18n/i18n_api.h
index 1975f17..10b4339 100644
--- a/chrome/browser/extensions/api/i18n/i18n_api.h
+++ b/chrome/browser/extensions/api/i18n/i18n_api.h
@@ -10,7 +10,7 @@
class I18nGetAcceptLanguagesFunction : public SyncExtensionFunction {
virtual ~I18nGetAcceptLanguagesFunction() {}
virtual bool RunImpl() OVERRIDE;
- DECLARE_EXTENSION_FUNCTION_NAME("i18n.getAcceptLanguages")
+ DECLARE_EXTENSION_FUNCTION("i18n.getAcceptLanguages", I18N_GETACCEPTLANGUAGES)
};
#endif // CHROME_BROWSER_EXTENSIONS_API_I18N_I18N_API_H_
diff --git a/chrome/browser/extensions/api/identity/identity_api.h b/chrome/browser/extensions/api/identity/identity_api.h
index 43fa148..7d77d30f 100644
--- a/chrome/browser/extensions/api/identity/identity_api.h
+++ b/chrome/browser/extensions/api/identity/identity_api.h
@@ -37,7 +37,8 @@ class IdentityGetAuthTokenFunction : public AsyncExtensionFunction,
public ExtensionInstallPrompt::Delegate,
public LoginUIService::Observer {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("experimental.identity.getAuthToken");
+ DECLARE_EXTENSION_FUNCTION("experimental.identity.getAuthToken",
+ EXPERIMENTAL_IDENTITY_GETAUTHTOKEN)
IdentityGetAuthTokenFunction();
@@ -95,7 +96,8 @@ class IdentityGetAuthTokenFunction : public AsyncExtensionFunction,
class IdentityLaunchWebAuthFlowFunction : public AsyncExtensionFunction,
public WebAuthFlow::Delegate {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("experimental.identity.launchWebAuthFlow");
+ DECLARE_EXTENSION_FUNCTION("experimental.identity.launchWebAuthFlow",
+ EXPERIMENTAL_IDENTITY_LAUNCHWEBAUTHFLOW)
IdentityLaunchWebAuthFlowFunction();
diff --git a/chrome/browser/extensions/api/idle/idle_api.h b/chrome/browser/extensions/api/idle/idle_api.h
index a2310fa..e913835 100644
--- a/chrome/browser/extensions/api/idle/idle_api.h
+++ b/chrome/browser/extensions/api/idle/idle_api.h
@@ -13,7 +13,7 @@ namespace extensions {
// Implementation of the chrome.idle.queryState API.
class IdleQueryStateFunction : public AsyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("idle.queryState")
+ DECLARE_EXTENSION_FUNCTION("idle.queryState", IDLE_QUERYSTATE)
protected:
virtual ~IdleQueryStateFunction() {}
@@ -28,7 +28,8 @@ class IdleQueryStateFunction : public AsyncExtensionFunction {
// Implementation of the chrome.idle.setDetectionInterval API.
class IdleSetDetectionIntervalFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("idle.setDetectionInterval");
+ DECLARE_EXTENSION_FUNCTION("idle.setDetectionInterval",
+ IDLE_SETDETECTIONINTERVAL)
protected:
virtual ~IdleSetDetectionIntervalFunction() {}
diff --git a/chrome/browser/extensions/api/idltest/idltest_api.h b/chrome/browser/extensions/api/idltest/idltest_api.h
index 9ee0921..db31ef5 100644
--- a/chrome/browser/extensions/api/idltest/idltest_api.h
+++ b/chrome/browser/extensions/api/idltest/idltest_api.h
@@ -9,7 +9,8 @@
class IdltestSendArrayBufferFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("experimental.idltest.sendArrayBuffer")
+ DECLARE_EXTENSION_FUNCTION("experimental.idltest.sendArrayBuffer",
+ EXPERIMENTAL_IDLTEST_SENDARRAYBUFFER)
protected:
virtual ~IdltestSendArrayBufferFunction() {}
@@ -18,7 +19,8 @@ class IdltestSendArrayBufferFunction : public SyncExtensionFunction {
class IdltestSendArrayBufferViewFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("experimental.idltest.sendArrayBufferView")
+ DECLARE_EXTENSION_FUNCTION("experimental.idltest.sendArrayBufferView",
+ EXPERIMENTAL_IDLTEST_SENDARRAYBUFFERVIEW)
protected:
virtual ~IdltestSendArrayBufferViewFunction() {}
@@ -27,7 +29,8 @@ class IdltestSendArrayBufferViewFunction : public SyncExtensionFunction {
class IdltestGetArrayBufferFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("experimental.idltest.getArrayBuffer")
+ DECLARE_EXTENSION_FUNCTION("experimental.idltest.getArrayBuffer",
+ EXPERIMENTAL_IDLTEST_GETARRAYBUFFER)
protected:
virtual ~IdltestGetArrayBufferFunction() {}
diff --git a/chrome/browser/extensions/api/input/input.h b/chrome/browser/extensions/api/input/input.h
index a0352f2..fc17c3e 100644
--- a/chrome/browser/extensions/api/input/input.h
+++ b/chrome/browser/extensions/api/input/input.h
@@ -17,8 +17,9 @@ namespace extensions {
// synthetic event distribution code to this Function.
class SendKeyboardEventInputFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME(
- "experimental.input.virtualKeyboard.sendKeyboardEvent");
+ DECLARE_EXTENSION_FUNCTION(
+ "experimental.input.virtualKeyboard.sendKeyboardEvent",
+ EXPERIMENTAL_INPUT_VIRTUALKEYBOARD_SENDKEYBOARDEVENT);
protected:
virtual ~SendKeyboardEventInputFunction() {}
diff --git a/chrome/browser/extensions/api/input_ime/input_ime_api.h b/chrome/browser/extensions/api/input_ime/input_ime_api.h
index 4cf7662..8a358e7 100644
--- a/chrome/browser/extensions/api/input_ime/input_ime_api.h
+++ b/chrome/browser/extensions/api/input_ime/input_ime_api.h
@@ -71,7 +71,8 @@ class InputImeEventRouter {
class SetCompositionFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("input.ime.setComposition");
+ DECLARE_EXTENSION_FUNCTION("input.ime.setComposition",
+ INPUT_IME_SETCOMPOSITION)
protected:
virtual ~SetCompositionFunction() {}
@@ -82,7 +83,8 @@ class SetCompositionFunction : public SyncExtensionFunction {
class ClearCompositionFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("input.ime.clearComposition");
+ DECLARE_EXTENSION_FUNCTION("input.ime.clearComposition",
+ INPUT_IME_CLEARCOMPOSITION)
protected:
virtual ~ClearCompositionFunction() {}
@@ -93,7 +95,7 @@ class ClearCompositionFunction : public SyncExtensionFunction {
class CommitTextFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("input.ime.commitText");
+ DECLARE_EXTENSION_FUNCTION("input.ime.commitText", INPUT_IME_COMMITTEXT)
protected:
virtual ~CommitTextFunction() {}
@@ -104,7 +106,8 @@ class CommitTextFunction : public SyncExtensionFunction {
class SetCandidateWindowPropertiesFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("input.ime.setCandidateWindowProperties");
+ DECLARE_EXTENSION_FUNCTION("input.ime.setCandidateWindowProperties",
+ INPUT_IME_SETCANDIDATEWINDOWPROPERTIES)
protected:
virtual ~SetCandidateWindowPropertiesFunction() {}
@@ -115,7 +118,7 @@ class SetCandidateWindowPropertiesFunction : public SyncExtensionFunction {
class SetCandidatesFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("input.ime.setCandidates");
+ DECLARE_EXTENSION_FUNCTION("input.ime.setCandidates", INPUT_IME_SETCANDIDATES)
protected:
virtual ~SetCandidatesFunction() {}
@@ -131,7 +134,8 @@ class SetCandidatesFunction : public SyncExtensionFunction {
class SetCursorPositionFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("input.ime.setCursorPosition");
+ DECLARE_EXTENSION_FUNCTION("input.ime.setCursorPosition",
+ INPUT_IME_SETCURSORPOSITION)
protected:
virtual ~SetCursorPositionFunction() {}
@@ -142,7 +146,7 @@ class SetCursorPositionFunction : public SyncExtensionFunction {
class SetMenuItemsFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("input.ime.setMenuItems");
+ DECLARE_EXTENSION_FUNCTION("input.ime.setMenuItems", INPUT_IME_SETMENUITEMS)
protected:
virtual ~SetMenuItemsFunction() {}
@@ -153,7 +157,8 @@ class SetMenuItemsFunction : public SyncExtensionFunction {
class UpdateMenuItemsFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("input.ime.updateMenuItems");
+ DECLARE_EXTENSION_FUNCTION("input.ime.updateMenuItems",
+ INPUT_IME_UPDATEMENUITEMS)
protected:
virtual ~UpdateMenuItemsFunction() {}
@@ -164,7 +169,8 @@ class UpdateMenuItemsFunction : public SyncExtensionFunction {
class KeyEventHandled : public AsyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("input.ime.keyEventHandled");
+ DECLARE_EXTENSION_FUNCTION("input.ime.keyEventHandled",
+ INPUT_IME_KEYEVENTHANDLED)
protected:
virtual ~KeyEventHandled() {}
diff --git a/chrome/browser/extensions/api/managed_mode/managed_mode_api.h b/chrome/browser/extensions/api/managed_mode/managed_mode_api.h
index 8085b7a..aad44db 100644
--- a/chrome/browser/extensions/api/managed_mode/managed_mode_api.h
+++ b/chrome/browser/extensions/api/managed_mode/managed_mode_api.h
@@ -34,7 +34,7 @@ class ManagedModeEventRouter {
class GetManagedModeFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("managedModePrivate.get")
+ DECLARE_EXTENSION_FUNCTION("managedModePrivate.get", MANAGEDMODEPRIVATE_GET)
protected:
virtual ~GetManagedModeFunction();
@@ -45,7 +45,8 @@ class GetManagedModeFunction : public SyncExtensionFunction {
class EnterManagedModeFunction : public AsyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("managedModePrivate.enter")
+ DECLARE_EXTENSION_FUNCTION("managedModePrivate.enter",
+ MANAGEDMODEPRIVATE_ENTER)
protected:
virtual ~EnterManagedModeFunction();
@@ -61,7 +62,8 @@ class EnterManagedModeFunction : public AsyncExtensionFunction {
class GetPolicyFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("managedModePrivate.getPolicy")
+ DECLARE_EXTENSION_FUNCTION("managedModePrivate.getPolicy",
+ MANAGEDMODEPRIVATE_GETPOLICY)
protected:
virtual ~GetPolicyFunction();
@@ -72,7 +74,8 @@ class GetPolicyFunction : public SyncExtensionFunction {
class SetPolicyFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("managedModePrivate.setPolicy")
+ DECLARE_EXTENSION_FUNCTION("managedModePrivate.setPolicy",
+ MANAGEDMODEPRIVATE_SETPOLICY)
protected:
virtual ~SetPolicyFunction();
diff --git a/chrome/browser/extensions/api/management/management_api.h b/chrome/browser/extensions/api/management/management_api.h
index 07553c8..8bf049e 100644
--- a/chrome/browser/extensions/api/management/management_api.h
+++ b/chrome/browser/extensions/api/management/management_api.h
@@ -36,7 +36,7 @@ class AsyncManagementFunction : public AsyncExtensionFunction {
class ManagementGetAllFunction : public ManagementFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("management.getAll");
+ DECLARE_EXTENSION_FUNCTION("management.getAll", MANAGEMENT_GETALL)
protected:
virtual ~ManagementGetAllFunction() {}
@@ -47,7 +47,7 @@ class ManagementGetAllFunction : public ManagementFunction {
class ManagementGetFunction : public ManagementFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("management.get");
+ DECLARE_EXTENSION_FUNCTION("management.get", MANAGEMENT_GET)
protected:
virtual ~ManagementGetFunction() {}
@@ -58,7 +58,8 @@ class ManagementGetFunction : public ManagementFunction {
class ManagementGetPermissionWarningsByIdFunction : public ManagementFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("management.getPermissionWarningsById");
+ DECLARE_EXTENSION_FUNCTION("management.getPermissionWarningsById",
+ MANAGEMENT_GETPERMISSIONWARNINGSBYID)
protected:
virtual ~ManagementGetPermissionWarningsByIdFunction() {}
@@ -70,8 +71,9 @@ class ManagementGetPermissionWarningsByIdFunction : public ManagementFunction {
class ManagementGetPermissionWarningsByManifestFunction
: public AsyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME(
- "management.getPermissionWarningsByManifest");
+ DECLARE_EXTENSION_FUNCTION(
+ "management.getPermissionWarningsByManifest",
+ MANAGEMENT_GETPERMISSIONWARNINGSBYMANIFEST);
// Called when utility process finishes.
void OnParseSuccess(base::DictionaryValue* parsed_manifest);
@@ -86,7 +88,7 @@ class ManagementGetPermissionWarningsByManifestFunction
class ManagementLaunchAppFunction : public ManagementFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("management.launchApp");
+ DECLARE_EXTENSION_FUNCTION("management.launchApp", MANAGEMENT_LAUNCHAPP)
protected:
virtual ~ManagementLaunchAppFunction() {}
@@ -98,7 +100,7 @@ class ManagementLaunchAppFunction : public ManagementFunction {
class ManagementSetEnabledFunction : public AsyncManagementFunction,
public ExtensionInstallPrompt::Delegate {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("management.setEnabled");
+ DECLARE_EXTENSION_FUNCTION("management.setEnabled", MANAGEMENT_SETENABLED)
ManagementSetEnabledFunction();
@@ -122,7 +124,7 @@ class ManagementSetEnabledFunction : public AsyncManagementFunction,
class ManagementUninstallFunction : public AsyncManagementFunction,
public ExtensionUninstallDialog::Delegate {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("management.uninstall");
+ DECLARE_EXTENSION_FUNCTION("management.uninstall", MANAGEMENT_UNINSTALL)
ManagementUninstallFunction();
static void SetAutoConfirmForTest(bool should_proceed);
diff --git a/chrome/browser/extensions/api/media_galleries/media_galleries_api.h b/chrome/browser/extensions/api/media_galleries/media_galleries_api.h
index 5ef7761..ef14914 100644
--- a/chrome/browser/extensions/api/media_galleries/media_galleries_api.h
+++ b/chrome/browser/extensions/api/media_galleries/media_galleries_api.h
@@ -18,7 +18,8 @@ namespace extensions {
class MediaGalleriesGetMediaFileSystemsFunction
: public AsyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("mediaGalleries.getMediaFileSystems")
+ DECLARE_EXTENSION_FUNCTION("mediaGalleries.getMediaFileSystems",
+ MEDIAGALLERIES_GETMEDIAFILESYSTEMS)
protected:
virtual ~MediaGalleriesGetMediaFileSystemsFunction();
@@ -43,8 +44,9 @@ class MediaGalleriesGetMediaFileSystemsFunction
class MediaGalleriesAssembleMediaFileFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME(
- "experimental.mediaGalleries.assembleMediaFile")
+ DECLARE_EXTENSION_FUNCTION(
+ "experimental.mediaGalleries.assembleMediaFile",
+ EXPERIMENTAL_MEDIAGALLERIES_ASSEMBLEMEDIAFILE)
protected:
virtual ~MediaGalleriesAssembleMediaFileFunction();
diff --git a/chrome/browser/extensions/api/media_galleries_private/media_galleries_private_api.h b/chrome/browser/extensions/api/media_galleries_private/media_galleries_private_api.h
index 89b652d..e18511e 100644
--- a/chrome/browser/extensions/api/media_galleries_private/media_galleries_private_api.h
+++ b/chrome/browser/extensions/api/media_galleries_private/media_galleries_private_api.h
@@ -71,7 +71,8 @@ class MediaGalleriesPrivateAPI : public ProfileKeyedAPI,
class MediaGalleriesPrivateAddGalleryWatchFunction
: public AsyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("mediaGalleriesPrivate.addGalleryWatch");
+ DECLARE_EXTENSION_FUNCTION("mediaGalleriesPrivate.addGalleryWatch",
+ MEDIAGALLERIESPRIVATE_ADDGALLERYWATCH);
protected:
virtual ~MediaGalleriesPrivateAddGalleryWatchFunction();
@@ -89,7 +90,8 @@ class MediaGalleriesPrivateAddGalleryWatchFunction
class MediaGalleriesPrivateRemoveGalleryWatchFunction
: public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("mediaGalleriesPrivate.removeGalleryWatch");
+ DECLARE_EXTENSION_FUNCTION("mediaGalleriesPrivate.removeGalleryWatch",
+ MEDIAGALLERIESPRIVATE_REMOVEGALLERYWATCH);
protected:
virtual ~MediaGalleriesPrivateRemoveGalleryWatchFunction();
diff --git a/chrome/browser/extensions/api/metrics/metrics.h b/chrome/browser/extensions/api/metrics/metrics.h
index 0318f5b..b01166d 100644
--- a/chrome/browser/extensions/api/metrics/metrics.h
+++ b/chrome/browser/extensions/api/metrics/metrics.h
@@ -14,7 +14,8 @@ namespace extensions {
class MetricsRecordUserActionFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("metricsPrivate.recordUserAction")
+ DECLARE_EXTENSION_FUNCTION("metricsPrivate.recordUserAction",
+ METRICSPRIVATE_RECORDUSERACTION)
protected:
virtual ~MetricsRecordUserActionFunction() {}
@@ -35,7 +36,8 @@ class MetricsHistogramHelperFunction : public SyncExtensionFunction {
class MetricsRecordValueFunction : public MetricsHistogramHelperFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("metricsPrivate.recordValue")
+ DECLARE_EXTENSION_FUNCTION("metricsPrivate.recordValue",
+ METRICSPRIVATE_RECORDVALUE)
protected:
virtual ~MetricsRecordValueFunction() {}
@@ -46,7 +48,8 @@ class MetricsRecordValueFunction : public MetricsHistogramHelperFunction {
class MetricsRecordPercentageFunction : public MetricsHistogramHelperFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("metricsPrivate.recordPercentage")
+ DECLARE_EXTENSION_FUNCTION("metricsPrivate.recordPercentage",
+ METRICSPRIVATE_RECORDPERCENTAGE)
protected:
virtual ~MetricsRecordPercentageFunction() {}
@@ -57,7 +60,8 @@ class MetricsRecordPercentageFunction : public MetricsHistogramHelperFunction {
class MetricsRecordCountFunction : public MetricsHistogramHelperFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("metricsPrivate.recordCount")
+ DECLARE_EXTENSION_FUNCTION("metricsPrivate.recordCount",
+ METRICSPRIVATE_RECORDCOUNT)
protected:
virtual ~MetricsRecordCountFunction() {}
@@ -68,7 +72,8 @@ class MetricsRecordCountFunction : public MetricsHistogramHelperFunction {
class MetricsRecordSmallCountFunction : public MetricsHistogramHelperFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("metricsPrivate.recordSmallCount")
+ DECLARE_EXTENSION_FUNCTION("metricsPrivate.recordSmallCount",
+ METRICSPRIVATE_RECORDSMALLCOUNT)
protected:
virtual ~MetricsRecordSmallCountFunction() {}
@@ -79,7 +84,8 @@ class MetricsRecordSmallCountFunction : public MetricsHistogramHelperFunction {
class MetricsRecordMediumCountFunction : public MetricsHistogramHelperFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("metricsPrivate.recordMediumCount")
+ DECLARE_EXTENSION_FUNCTION("metricsPrivate.recordMediumCount",
+ METRICSPRIVATE_RECORDMEDIUMCOUNT)
protected:
virtual ~MetricsRecordMediumCountFunction() {}
@@ -90,7 +96,8 @@ class MetricsRecordMediumCountFunction : public MetricsHistogramHelperFunction {
class MetricsRecordTimeFunction : public MetricsHistogramHelperFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("metricsPrivate.recordTime")
+ DECLARE_EXTENSION_FUNCTION("metricsPrivate.recordTime",
+ METRICSPRIVATE_RECORDTIME)
protected:
virtual ~MetricsRecordTimeFunction() {}
@@ -101,7 +108,8 @@ class MetricsRecordTimeFunction : public MetricsHistogramHelperFunction {
class MetricsRecordMediumTimeFunction : public MetricsHistogramHelperFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("metricsPrivate.recordMediumTime")
+ DECLARE_EXTENSION_FUNCTION("metricsPrivate.recordMediumTime",
+ METRICSPRIVATE_RECORDMEDIUMTIME)
protected:
virtual ~MetricsRecordMediumTimeFunction() {}
@@ -112,7 +120,8 @@ class MetricsRecordMediumTimeFunction : public MetricsHistogramHelperFunction {
class MetricsRecordLongTimeFunction : public MetricsHistogramHelperFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("metricsPrivate.recordLongTime")
+ DECLARE_EXTENSION_FUNCTION("metricsPrivate.recordLongTime",
+ METRICSPRIVATE_RECORDLONGTIME)
protected:
virtual ~MetricsRecordLongTimeFunction() {}
diff --git a/chrome/browser/extensions/api/module/module.h b/chrome/browser/extensions/api/module/module.h
index 5d3d04a..c8d387f 100644
--- a/chrome/browser/extensions/api/module/module.h
+++ b/chrome/browser/extensions/api/module/module.h
@@ -13,7 +13,8 @@ class ExtensionPrefs;
class SetUpdateUrlDataFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("extension.setUpdateUrlData");
+ DECLARE_EXTENSION_FUNCTION("extension.setUpdateUrlData",
+ EXTENSION_SETUPDATEURLDATA)
protected:
virtual ~SetUpdateUrlDataFunction() {}
@@ -27,7 +28,8 @@ class SetUpdateUrlDataFunction : public SyncExtensionFunction {
class IsAllowedIncognitoAccessFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("extension.isAllowedIncognitoAccess");
+ DECLARE_EXTENSION_FUNCTION("extension.isAllowedIncognitoAccess",
+ EXTENSION_ISALLOWEDINCOGNITOACCESS)
protected:
virtual ~IsAllowedIncognitoAccessFunction() {}
@@ -38,7 +40,8 @@ class IsAllowedIncognitoAccessFunction : public SyncExtensionFunction {
class IsAllowedFileSchemeAccessFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("extension.isAllowedFileSchemeAccess");
+ DECLARE_EXTENSION_FUNCTION("extension.isAllowedFileSchemeAccess",
+ EXTENSION_ISALLOWEDFILESCHEMEACCESS)
protected:
virtual ~IsAllowedFileSchemeAccessFunction() {}
diff --git a/chrome/browser/extensions/api/notification/notification_api.h b/chrome/browser/extensions/api/notification/notification_api.h
index 2f13703..3fa9d97 100644
--- a/chrome/browser/extensions/api/notification/notification_api.h
+++ b/chrome/browser/extensions/api/notification/notification_api.h
@@ -27,7 +27,8 @@ class NotificationShowFunction : public ApiFunction {
private:
scoped_ptr<api::experimental_notification::Show::Params> params_;
- DECLARE_EXTENSION_FUNCTION_NAME("experimental.notification.show")
+ DECLARE_EXTENSION_FUNCTION("experimental.notification.show",
+ EXPERIMENTAL_NOTIFICATION_SHOW)
};
} // namespace extensions
diff --git a/chrome/browser/extensions/api/omnibox/omnibox_api.h b/chrome/browser/extensions/api/omnibox/omnibox_api.h
index 2685790..5c05302 100644
--- a/chrome/browser/extensions/api/omnibox/omnibox_api.h
+++ b/chrome/browser/extensions/api/omnibox/omnibox_api.h
@@ -69,7 +69,7 @@ class ExtensionOmniboxEventRouter {
class OmniboxSendSuggestionsFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("omnibox.sendSuggestions");
+ DECLARE_EXTENSION_FUNCTION("omnibox.sendSuggestions", OMNIBOX_SENDSUGGESTIONS)
protected:
virtual ~OmniboxSendSuggestionsFunction() {}
@@ -132,7 +132,8 @@ class OmniboxAPI : public ProfileKeyedAPI,
class OmniboxSetDefaultSuggestionFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("omnibox.setDefaultSuggestion");
+ DECLARE_EXTENSION_FUNCTION("omnibox.setDefaultSuggestion",
+ OMNIBOX_SETDEFAULTSUGGESTION)
protected:
virtual ~OmniboxSetDefaultSuggestionFunction() {}
diff --git a/chrome/browser/extensions/api/page_capture/page_capture_api.h b/chrome/browser/extensions/api/page_capture/page_capture_api.h
index 989dced..4d7e80f 100644
--- a/chrome/browser/extensions/api/page_capture/page_capture_api.h
+++ b/chrome/browser/extensions/api/page_capture/page_capture_api.h
@@ -61,7 +61,7 @@ class PageCaptureSaveAsMHTMLFunction : public AsyncExtensionFunction {
// The file containing the MHTML.
scoped_refptr<webkit_blob::ShareableFileReference> mhtml_file_;
- DECLARE_EXTENSION_FUNCTION_NAME("pageCapture.saveAsMHTML")
+ DECLARE_EXTENSION_FUNCTION("pageCapture.saveAsMHTML", PAGECAPTURE_SAVEASMHTML)
};
} // namespace extensions
diff --git a/chrome/browser/extensions/api/permissions/permissions_api.h b/chrome/browser/extensions/api/permissions/permissions_api.h
index 21281e2..e15f64c 100644
--- a/chrome/browser/extensions/api/permissions/permissions_api.h
+++ b/chrome/browser/extensions/api/permissions/permissions_api.h
@@ -17,7 +17,7 @@ class ExtensionService;
// chrome.permissions.contains
class PermissionsContainsFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("permissions.contains")
+ DECLARE_EXTENSION_FUNCTION("permissions.contains", PERMISSIONS_CONTAINS)
protected:
virtual ~PermissionsContainsFunction() {}
@@ -29,7 +29,7 @@ class PermissionsContainsFunction : public SyncExtensionFunction {
// chrome.permissions.getAll
class PermissionsGetAllFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("permissions.getAll")
+ DECLARE_EXTENSION_FUNCTION("permissions.getAll", PERMISSIONS_GETALL)
protected:
virtual ~PermissionsGetAllFunction() {}
@@ -41,7 +41,7 @@ class PermissionsGetAllFunction : public SyncExtensionFunction {
// chrome.permissions.remove
class PermissionsRemoveFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("permissions.remove")
+ DECLARE_EXTENSION_FUNCTION("permissions.remove", PERMISSIONS_REMOVE)
protected:
virtual ~PermissionsRemoveFunction() {}
@@ -54,7 +54,7 @@ class PermissionsRemoveFunction : public SyncExtensionFunction {
class PermissionsRequestFunction : public AsyncExtensionFunction,
public ExtensionInstallPrompt::Delegate {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("permissions.request")
+ DECLARE_EXTENSION_FUNCTION("permissions.request", PERMISSIONS_REQUEST)
PermissionsRequestFunction();
diff --git a/chrome/browser/extensions/api/preference/preference_api.h b/chrome/browser/extensions/api/preference/preference_api.h
index d37a78a..6102892 100644
--- a/chrome/browser/extensions/api/preference/preference_api.h
+++ b/chrome/browser/extensions/api/preference/preference_api.h
@@ -111,7 +111,7 @@ class PreferenceFunction : public SyncExtensionFunction {
class GetPreferenceFunction : public PreferenceFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("types.ChromeSetting.get")
+ DECLARE_EXTENSION_FUNCTION("types.ChromeSetting.get", TYPES_CHROMESETTING_GET)
protected:
virtual ~GetPreferenceFunction();
@@ -122,7 +122,7 @@ class GetPreferenceFunction : public PreferenceFunction {
class SetPreferenceFunction : public PreferenceFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("types.ChromeSetting.set")
+ DECLARE_EXTENSION_FUNCTION("types.ChromeSetting.set", TYPES_CHROMESETTING_SET)
protected:
virtual ~SetPreferenceFunction();
@@ -133,7 +133,8 @@ class SetPreferenceFunction : public PreferenceFunction {
class ClearPreferenceFunction : public PreferenceFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("types.ChromeSetting.clear")
+ DECLARE_EXTENSION_FUNCTION("types.ChromeSetting.clear",
+ TYPES_CHROMESETTING_CLEAR)
protected:
virtual ~ClearPreferenceFunction();
diff --git a/chrome/browser/extensions/api/processes/processes_api.h b/chrome/browser/extensions/api/processes/processes_api.h
index 3165651..8e96688 100644
--- a/chrome/browser/extensions/api/processes/processes_api.h
+++ b/chrome/browser/extensions/api/processes/processes_api.h
@@ -152,7 +152,8 @@ class GetProcessIdForTabFunction : public AsyncExtensionFunction,
// Storage for the tab ID parameter.
int tab_id_;
- DECLARE_EXTENSION_FUNCTION_NAME("experimental.processes.getProcessIdForTab")
+ DECLARE_EXTENSION_FUNCTION("experimental.processes.getProcessIdForTab",
+ EXPERIMENTAL_PROCESSES_GETPROCESSIDFORTAB)
};
// Extension function that allows terminating Chrome subprocesses, by supplying
@@ -181,7 +182,8 @@ class TerminateFunction : public AsyncExtensionFunction,
// Storage for the process ID parameter.
int process_id_;
- DECLARE_EXTENSION_FUNCTION_NAME("experimental.processes.terminate")
+ DECLARE_EXTENSION_FUNCTION("experimental.processes.terminate",
+ EXPERIMENTAL_PROCESSES_TERMINATE)
};
// Extension function which returns a set of Process objects, containing the
@@ -210,7 +212,8 @@ class GetProcessInfoFunction : public AsyncExtensionFunction,
bool memory_;
#endif
- DECLARE_EXTENSION_FUNCTION_NAME("experimental.processes.getProcessInfo")
+ DECLARE_EXTENSION_FUNCTION("experimental.processes.getProcessInfo",
+ EXPERIMENTAL_PROCESSES_GETPROCESSINFO)
};
} // namespace extensions
diff --git a/chrome/browser/extensions/api/push_messaging/push_messaging_api.h b/chrome/browser/extensions/api/push_messaging/push_messaging_api.h
index f0fc4fd..4ee9bf4 100644
--- a/chrome/browser/extensions/api/push_messaging/push_messaging_api.h
+++ b/chrome/browser/extensions/api/push_messaging/push_messaging_api.h
@@ -62,7 +62,8 @@ class PushMessagingGetChannelIdFunction
// ExtensionFunction:
virtual bool RunImpl() OVERRIDE;
- DECLARE_EXTENSION_FUNCTION_NAME("pushMessaging.getChannelId");
+ DECLARE_EXTENSION_FUNCTION("pushMessaging.getChannelId",
+ PUSHMESSAGING_GETCHANNELID)
private:
void ReportResult(const std::string& gaia_id,
diff --git a/chrome/browser/extensions/api/record/record_api.h b/chrome/browser/extensions/api/record/record_api.h
index 69974ac..3911b12 100644
--- a/chrome/browser/extensions/api/record/record_api.h
+++ b/chrome/browser/extensions/api/record/record_api.h
@@ -107,7 +107,8 @@ class RunPageCyclerFunction : public AsyncExtensionFunction {
class RecordCaptureURLsFunction : public RunPageCyclerFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("experimental.record.captureURLs");
+ DECLARE_EXTENSION_FUNCTION("experimental.record.captureURLs",
+ EXPERIMENTAL_RECORD_CAPTUREURLS)
RecordCaptureURLsFunction();
explicit RecordCaptureURLsFunction(ProcessStrategy* strategy);
@@ -127,7 +128,8 @@ class RecordCaptureURLsFunction : public RunPageCyclerFunction {
class RecordReplayURLsFunction : public RunPageCyclerFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("experimental.record.replayURLs");
+ DECLARE_EXTENSION_FUNCTION("experimental.record.replayURLs",
+ EXPERIMENTAL_RECORD_REPLAYURLS)
RecordReplayURLsFunction();
explicit RecordReplayURLsFunction(ProcessStrategy* strategy);
diff --git a/chrome/browser/extensions/api/runtime/runtime_api.h b/chrome/browser/extensions/api/runtime/runtime_api.h
index f84c355..23b3b2f 100644
--- a/chrome/browser/extensions/api/runtime/runtime_api.h
+++ b/chrome/browser/extensions/api/runtime/runtime_api.h
@@ -35,7 +35,8 @@ class RuntimeEventRouter {
class RuntimeGetBackgroundPageFunction : public AsyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("runtime.getBackgroundPage");
+ DECLARE_EXTENSION_FUNCTION("runtime.getBackgroundPage",
+ RUNTIME_GETBACKGROUNDPAGE)
protected:
virtual ~RuntimeGetBackgroundPageFunction() {}
@@ -47,7 +48,7 @@ class RuntimeGetBackgroundPageFunction : public AsyncExtensionFunction {
class RuntimeReloadFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("runtime.reload");
+ DECLARE_EXTENSION_FUNCTION("runtime.reload", RUNTIME_RELOAD)
protected:
virtual ~RuntimeReloadFunction() {}
@@ -57,7 +58,8 @@ class RuntimeReloadFunction : public SyncExtensionFunction {
class RuntimeRequestUpdateCheckFunction : public AsyncExtensionFunction,
public content::NotificationObserver {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("runtime.requestUpdateCheck");
+ DECLARE_EXTENSION_FUNCTION("runtime.requestUpdateCheck",
+ RUNTIME_REQUESTUPDATECHECK)
RuntimeRequestUpdateCheckFunction();
protected:
diff --git a/chrome/browser/extensions/api/serial/serial_api.h b/chrome/browser/extensions/api/serial/serial_api.h
index 9a34f7b..cd3a8bb 100644
--- a/chrome/browser/extensions/api/serial/serial_api.h
+++ b/chrome/browser/extensions/api/serial/serial_api.h
@@ -37,7 +37,7 @@ class SerialAsyncApiFunction : public AsyncApiFunction {
class SerialGetPortsFunction : public SerialAsyncApiFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("serial.getPorts")
+ DECLARE_EXTENSION_FUNCTION("serial.getPorts", SERIAL_GETPORTS)
SerialGetPortsFunction();
@@ -52,7 +52,7 @@ class SerialGetPortsFunction : public SerialAsyncApiFunction {
class SerialOpenFunction : public SerialAsyncApiFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("serial.open")
+ DECLARE_EXTENSION_FUNCTION("serial.open", SERIAL_OPEN)
SerialOpenFunction();
@@ -79,7 +79,7 @@ class SerialOpenFunction : public SerialAsyncApiFunction {
class SerialCloseFunction : public SerialAsyncApiFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("serial.close")
+ DECLARE_EXTENSION_FUNCTION("serial.close", SERIAL_CLOSE)
SerialCloseFunction();
@@ -97,7 +97,7 @@ class SerialCloseFunction : public SerialAsyncApiFunction {
class SerialReadFunction : public SerialAsyncApiFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("serial.read")
+ DECLARE_EXTENSION_FUNCTION("serial.read", SERIAL_READ)
SerialReadFunction();
@@ -115,7 +115,7 @@ class SerialReadFunction : public SerialAsyncApiFunction {
class SerialWriteFunction : public SerialAsyncApiFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("serial.write")
+ DECLARE_EXTENSION_FUNCTION("serial.write", SERIAL_WRITE)
SerialWriteFunction();
@@ -135,7 +135,7 @@ class SerialWriteFunction : public SerialAsyncApiFunction {
class SerialFlushFunction : public SerialAsyncApiFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("serial.flush")
+ DECLARE_EXTENSION_FUNCTION("serial.flush", SERIAL_FLUSH)
SerialFlushFunction();
@@ -153,7 +153,8 @@ class SerialFlushFunction : public SerialAsyncApiFunction {
class SerialGetControlSignalsFunction : public SerialAsyncApiFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("serial.getControlSignals")
+ DECLARE_EXTENSION_FUNCTION("serial.getControlSignals",
+ SERIAL_GETCONTROLSIGNALS)
SerialGetControlSignalsFunction();
@@ -172,7 +173,8 @@ class SerialGetControlSignalsFunction : public SerialAsyncApiFunction {
class SerialSetControlSignalsFunction : public SerialAsyncApiFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("serial.setControlSignals")
+ DECLARE_EXTENSION_FUNCTION("serial.setControlSignals",
+ SERIAL_SETCONTROLSIGNALS)
SerialSetControlSignalsFunction();
diff --git a/chrome/browser/extensions/api/socket/socket_api.h b/chrome/browser/extensions/api/socket/socket_api.h
index 83a4ada..b26e748 100644
--- a/chrome/browser/extensions/api/socket/socket_api.h
+++ b/chrome/browser/extensions/api/socket/socket_api.h
@@ -67,7 +67,7 @@ class SocketExtensionWithDnsLookupFunction : public SocketAsyncApiFunction {
class SocketCreateFunction : public SocketAsyncApiFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("socket.create")
+ DECLARE_EXTENSION_FUNCTION("socket.create", SOCKET_CREATE)
SocketCreateFunction();
@@ -91,7 +91,7 @@ class SocketCreateFunction : public SocketAsyncApiFunction {
class SocketDestroyFunction : public SocketAsyncApiFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("socket.destroy")
+ DECLARE_EXTENSION_FUNCTION("socket.destroy", SOCKET_DESTROY)
protected:
virtual ~SocketDestroyFunction() {}
@@ -106,7 +106,7 @@ class SocketDestroyFunction : public SocketAsyncApiFunction {
class SocketConnectFunction : public SocketExtensionWithDnsLookupFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("socket.connect")
+ DECLARE_EXTENSION_FUNCTION("socket.connect", SOCKET_CONNECT)
SocketConnectFunction();
@@ -132,7 +132,7 @@ class SocketConnectFunction : public SocketExtensionWithDnsLookupFunction {
class SocketDisconnectFunction : public SocketAsyncApiFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("socket.disconnect")
+ DECLARE_EXTENSION_FUNCTION("socket.disconnect", SOCKET_DISCONNECT)
protected:
virtual ~SocketDisconnectFunction() {}
@@ -147,7 +147,7 @@ class SocketDisconnectFunction : public SocketAsyncApiFunction {
class SocketBindFunction : public SocketAsyncApiFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("socket.bind")
+ DECLARE_EXTENSION_FUNCTION("socket.bind", SOCKET_BIND)
protected:
virtual ~SocketBindFunction() {}
@@ -164,7 +164,7 @@ class SocketBindFunction : public SocketAsyncApiFunction {
class SocketListenFunction : public SocketAsyncApiFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("socket.listen");
+ DECLARE_EXTENSION_FUNCTION("socket.listen", SOCKET_LISTEN)
SocketListenFunction();
@@ -181,7 +181,7 @@ class SocketListenFunction : public SocketAsyncApiFunction {
class SocketAcceptFunction : public SocketAsyncApiFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("socket.accept");
+ DECLARE_EXTENSION_FUNCTION("socket.accept", SOCKET_ACCEPT)
SocketAcceptFunction();
@@ -199,7 +199,7 @@ class SocketAcceptFunction : public SocketAsyncApiFunction {
class SocketReadFunction : public SocketAsyncApiFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("socket.read")
+ DECLARE_EXTENSION_FUNCTION("socket.read", SOCKET_READ)
SocketReadFunction();
@@ -217,7 +217,7 @@ class SocketReadFunction : public SocketAsyncApiFunction {
class SocketWriteFunction : public SocketAsyncApiFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("socket.write")
+ DECLARE_EXTENSION_FUNCTION("socket.write", SOCKET_WRITE)
SocketWriteFunction();
@@ -237,7 +237,7 @@ class SocketWriteFunction : public SocketAsyncApiFunction {
class SocketRecvFromFunction : public SocketAsyncApiFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("socket.recvFrom")
+ DECLARE_EXTENSION_FUNCTION("socket.recvFrom", SOCKET_RECVFROM)
SocketRecvFromFunction();
@@ -258,7 +258,7 @@ class SocketRecvFromFunction : public SocketAsyncApiFunction {
class SocketSendToFunction : public SocketExtensionWithDnsLookupFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("socket.sendTo")
+ DECLARE_EXTENSION_FUNCTION("socket.sendTo", SOCKET_SENDTO)
SocketSendToFunction();
@@ -286,7 +286,7 @@ class SocketSendToFunction : public SocketExtensionWithDnsLookupFunction {
class SocketSetKeepAliveFunction : public SocketAsyncApiFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("socket.setKeepAlive")
+ DECLARE_EXTENSION_FUNCTION("socket.setKeepAlive", SOCKET_SETKEEPALIVE)
SocketSetKeepAliveFunction();
@@ -303,7 +303,7 @@ class SocketSetKeepAliveFunction : public SocketAsyncApiFunction {
class SocketSetNoDelayFunction : public SocketAsyncApiFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("socket.setNoDelay")
+ DECLARE_EXTENSION_FUNCTION("socket.setNoDelay", SOCKET_SETNODELAY)
SocketSetNoDelayFunction();
@@ -320,7 +320,7 @@ class SocketSetNoDelayFunction : public SocketAsyncApiFunction {
class SocketGetInfoFunction : public SocketAsyncApiFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("socket.getInfo");
+ DECLARE_EXTENSION_FUNCTION("socket.getInfo", SOCKET_GETINFO)
SocketGetInfoFunction();
@@ -337,7 +337,7 @@ class SocketGetInfoFunction : public SocketAsyncApiFunction {
class SocketGetNetworkListFunction : public AsyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("socket.getNetworkList");
+ DECLARE_EXTENSION_FUNCTION("socket.getNetworkList", SOCKET_GETNETWORKLIST)
protected:
virtual ~SocketGetNetworkListFunction() {}
diff --git a/chrome/browser/extensions/api/storage/storage_api.h b/chrome/browser/extensions/api/storage/storage_api.h
index b217f6d..113d580 100644
--- a/chrome/browser/extensions/api/storage/storage_api.h
+++ b/chrome/browser/extensions/api/storage/storage_api.h
@@ -54,7 +54,7 @@ class SettingsFunction : public AsyncExtensionFunction {
class StorageGetFunction : public SettingsFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("storage.get");
+ DECLARE_EXTENSION_FUNCTION("storage.get", STORAGE_GET)
protected:
virtual ~StorageGetFunction() {}
@@ -65,7 +65,7 @@ class StorageGetFunction : public SettingsFunction {
class StorageSetFunction : public SettingsFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("storage.set");
+ DECLARE_EXTENSION_FUNCTION("storage.set", STORAGE_SET)
protected:
virtual ~StorageSetFunction() {}
@@ -80,7 +80,7 @@ class StorageSetFunction : public SettingsFunction {
class StorageRemoveFunction : public SettingsFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("storage.remove");
+ DECLARE_EXTENSION_FUNCTION("storage.remove", STORAGE_REMOVE)
protected:
virtual ~StorageRemoveFunction() {}
@@ -95,7 +95,7 @@ class StorageRemoveFunction : public SettingsFunction {
class StorageClearFunction : public SettingsFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("storage.clear");
+ DECLARE_EXTENSION_FUNCTION("storage.clear", STORAGE_CLEAR)
protected:
virtual ~StorageClearFunction() {}
@@ -110,7 +110,7 @@ class StorageClearFunction : public SettingsFunction {
class StorageGetBytesInUseFunction : public SettingsFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("storage.getBytesInUse");
+ DECLARE_EXTENSION_FUNCTION("storage.getBytesInUse", STORAGE_GETBYTESINUSE)
protected:
virtual ~StorageGetBytesInUseFunction() {}
diff --git a/chrome/browser/extensions/api/sync_file_system/sync_file_system_api.h b/chrome/browser/extensions/api/sync_file_system/sync_file_system_api.h
index b3af8dd..ade18db 100644
--- a/chrome/browser/extensions/api/sync_file_system/sync_file_system_api.h
+++ b/chrome/browser/extensions/api/sync_file_system/sync_file_system_api.h
@@ -20,7 +20,8 @@ namespace extensions {
class SyncFileSystemDeleteFileSystemFunction
: public AsyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("syncFileSystem.deleteFileSystem");
+ DECLARE_EXTENSION_FUNCTION("syncFileSystem.deleteFileSystem",
+ SYNCFILESYSTEM_DELETEFILESYSTEM)
protected:
virtual ~SyncFileSystemDeleteFileSystemFunction() {}
@@ -34,7 +35,8 @@ class SyncFileSystemDeleteFileSystemFunction
class SyncFileSystemGetFileSyncStatusFunction
: public AsyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("syncFileSystem.getFileSyncStatus");
+ DECLARE_EXTENSION_FUNCTION("syncFileSystem.getFileSyncStatus",
+ SYNCFILESYSTEM_GETFILESYNCSTATUS)
protected:
virtual ~SyncFileSystemGetFileSyncStatusFunction() {}
@@ -48,7 +50,8 @@ class SyncFileSystemGetFileSyncStatusFunction
class SyncFileSystemGetUsageAndQuotaFunction
: public AsyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("syncFileSystem.getUsageAndQuota");
+ DECLARE_EXTENSION_FUNCTION("syncFileSystem.getUsageAndQuota",
+ SYNCFILESYSTEM_GETUSAGEANDQUOTA)
protected:
virtual ~SyncFileSystemGetUsageAndQuotaFunction() {}
@@ -63,7 +66,8 @@ class SyncFileSystemGetUsageAndQuotaFunction
class SyncFileSystemRequestFileSystemFunction
: public AsyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("syncFileSystem.requestFileSystem");
+ DECLARE_EXTENSION_FUNCTION("syncFileSystem.requestFileSystem",
+ SYNCFILESYSTEM_REQUESTFILESYSTEM)
protected:
virtual ~SyncFileSystemRequestFileSystemFunction() {}
diff --git a/chrome/browser/extensions/api/system_indicator/system_indicator_api.h b/chrome/browser/extensions/api/system_indicator/system_indicator_api.h
index 58aa48f..533f6a5 100644
--- a/chrome/browser/extensions/api/system_indicator/system_indicator_api.h
+++ b/chrome/browser/extensions/api/system_indicator/system_indicator_api.h
@@ -12,7 +12,7 @@ namespace extensions {
class SystemIndicatorSetIconFunction : public ExtensionActionSetIconFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("systemIndicator.setIcon")
+ DECLARE_EXTENSION_FUNCTION("systemIndicator.setIcon", SYSTEMINDICATOR_SETICON)
protected:
virtual ~SystemIndicatorSetIconFunction() {}
@@ -20,7 +20,7 @@ class SystemIndicatorSetIconFunction : public ExtensionActionSetIconFunction {
class SystemIndicatorEnableFunction : public ExtensionActionShowFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("systemIndicator.enable")
+ DECLARE_EXTENSION_FUNCTION("systemIndicator.enable", SYSTEMINDICATOR_ENABLE)
protected:
virtual ~SystemIndicatorEnableFunction() {}
@@ -28,7 +28,7 @@ class SystemIndicatorEnableFunction : public ExtensionActionShowFunction {
class SystemIndicatorDisableFunction : public ExtensionActionHideFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("systemIndicator.disable");
+ DECLARE_EXTENSION_FUNCTION("systemIndicator.disable", SYSTEMINDICATOR_DISABLE)
protected:
virtual ~SystemIndicatorDisableFunction() {}
diff --git a/chrome/browser/extensions/api/system_info_cpu/system_info_cpu_api.h b/chrome/browser/extensions/api/system_info_cpu/system_info_cpu_api.h
index dd91051..b4d05af 100644
--- a/chrome/browser/extensions/api/system_info_cpu/system_info_cpu_api.h
+++ b/chrome/browser/extensions/api/system_info_cpu/system_info_cpu_api.h
@@ -11,7 +11,8 @@ namespace extensions {
class SystemInfoCpuGetFunction : public AsyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("experimental.systemInfo.cpu.get");
+ DECLARE_EXTENSION_FUNCTION("experimental.systemInfo.cpu.get",
+ EXPERIMENTAL_SYSTEMINFO_CPU_GET)
SystemInfoCpuGetFunction();
private:
diff --git a/chrome/browser/extensions/api/system_info_display/system_info_display_api.h b/chrome/browser/extensions/api/system_info_display/system_info_display_api.h
index 2c94ad1..3468db5 100644
--- a/chrome/browser/extensions/api/system_info_display/system_info_display_api.h
+++ b/chrome/browser/extensions/api/system_info_display/system_info_display_api.h
@@ -12,7 +12,8 @@ namespace extensions {
class SystemInfoDisplayGetFunction : public AsyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("experimental.systemInfo.display.get");
+ DECLARE_EXTENSION_FUNCTION("experimental.systemInfo.display.get",
+ EXPERIMENTAL_SYSTEMINFO_DISPLAY_GET)
protected:
virtual ~SystemInfoDisplayGetFunction() {}
diff --git a/chrome/browser/extensions/api/system_info_memory/system_info_memory_api.h b/chrome/browser/extensions/api/system_info_memory/system_info_memory_api.h
index 87989e1..e3eaec1 100644
--- a/chrome/browser/extensions/api/system_info_memory/system_info_memory_api.h
+++ b/chrome/browser/extensions/api/system_info_memory/system_info_memory_api.h
@@ -12,7 +12,8 @@ namespace extensions {
class SystemInfoMemoryGetFunction : public AsyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("experimental.systemInfo.memory.get");
+ DECLARE_EXTENSION_FUNCTION("experimental.systemInfo.memory.get",
+ EXPERIMENTAL_SYSTEMINFO_MEMORY_GET)
SystemInfoMemoryGetFunction();
private:
diff --git a/chrome/browser/extensions/api/system_info_storage/system_info_storage_api.h b/chrome/browser/extensions/api/system_info_storage/system_info_storage_api.h
index 735f4fd..7a9b894 100644
--- a/chrome/browser/extensions/api/system_info_storage/system_info_storage_api.h
+++ b/chrome/browser/extensions/api/system_info_storage/system_info_storage_api.h
@@ -13,7 +13,8 @@ namespace extensions {
// call relative to browser UI thread.
class SystemInfoStorageGetFunction : public AsyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("experimental.systemInfo.storage.get");
+ DECLARE_EXTENSION_FUNCTION("experimental.systemInfo.storage.get",
+ EXPERIMENTAL_SYSTEMINFO_STORAGE_GET)
SystemInfoStorageGetFunction();
private:
diff --git a/chrome/browser/extensions/api/tab_capture/tab_capture_api.h b/chrome/browser/extensions/api/tab_capture/tab_capture_api.h
index 4e56568..4a708f4 100644
--- a/chrome/browser/extensions/api/tab_capture/tab_capture_api.h
+++ b/chrome/browser/extensions/api/tab_capture/tab_capture_api.h
@@ -16,7 +16,7 @@ namespace extensions {
class TabCaptureCaptureFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("tabCapture.capture");
+ DECLARE_EXTENSION_FUNCTION("tabCapture.capture", TABCAPTURE_CAPTURE)
protected:
virtual ~TabCaptureCaptureFunction() {}
@@ -27,7 +27,8 @@ class TabCaptureCaptureFunction : public SyncExtensionFunction {
class TabCaptureGetCapturedTabsFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("tabCapture.getCapturedTabs");
+ DECLARE_EXTENSION_FUNCTION("tabCapture.getCapturedTabs",
+ TABCAPTURE_GETCAPTUREDTABS)
protected:
virtual ~TabCaptureGetCapturedTabsFunction() {}
diff --git a/chrome/browser/extensions/api/tabs/tabs_api.h b/chrome/browser/extensions/api/tabs/tabs_api.h
index db362cc..71d7d49 100644
--- a/chrome/browser/extensions/api/tabs/tabs_api.h
+++ b/chrome/browser/extensions/api/tabs/tabs_api.h
@@ -45,22 +45,22 @@ class PlatformBitmap;
class WindowsGetFunction : public SyncExtensionFunction {
virtual ~WindowsGetFunction() {}
virtual bool RunImpl() OVERRIDE;
- DECLARE_EXTENSION_FUNCTION_NAME("windows.get")
+ DECLARE_EXTENSION_FUNCTION("windows.get", WINDOWS_GET)
};
class WindowsGetCurrentFunction : public SyncExtensionFunction {
virtual ~WindowsGetCurrentFunction() {}
virtual bool RunImpl() OVERRIDE;
- DECLARE_EXTENSION_FUNCTION_NAME("windows.getCurrent")
+ DECLARE_EXTENSION_FUNCTION("windows.getCurrent", WINDOWS_GETCURRENT)
};
class WindowsGetLastFocusedFunction : public SyncExtensionFunction {
virtual ~WindowsGetLastFocusedFunction() {}
virtual bool RunImpl() OVERRIDE;
- DECLARE_EXTENSION_FUNCTION_NAME("windows.getLastFocused")
+ DECLARE_EXTENSION_FUNCTION("windows.getLastFocused", WINDOWS_GETLASTFOCUSED)
};
class WindowsGetAllFunction : public SyncExtensionFunction {
virtual ~WindowsGetAllFunction() {}
virtual bool RunImpl() OVERRIDE;
- DECLARE_EXTENSION_FUNCTION_NAME("windows.getAll")
+ DECLARE_EXTENSION_FUNCTION("windows.getAll", WINDOWS_GETALL)
};
class WindowsCreateFunction : public SyncExtensionFunction {
virtual ~WindowsCreateFunction() {}
@@ -74,59 +74,59 @@ class WindowsCreateFunction : public SyncExtensionFunction {
bool ShouldOpenIncognitoWindow(const base::DictionaryValue* args,
std::vector<GURL>* urls,
bool* is_error);
- DECLARE_EXTENSION_FUNCTION_NAME("windows.create")
+ DECLARE_EXTENSION_FUNCTION("windows.create", WINDOWS_CREATE)
};
class WindowsUpdateFunction : public SyncExtensionFunction {
virtual ~WindowsUpdateFunction() {}
virtual bool RunImpl() OVERRIDE;
- DECLARE_EXTENSION_FUNCTION_NAME("windows.update")
+ DECLARE_EXTENSION_FUNCTION("windows.update", WINDOWS_UPDATE)
};
class WindowsRemoveFunction : public SyncExtensionFunction {
virtual ~WindowsRemoveFunction() {}
virtual bool RunImpl() OVERRIDE;
- DECLARE_EXTENSION_FUNCTION_NAME("windows.remove")
+ DECLARE_EXTENSION_FUNCTION("windows.remove", WINDOWS_REMOVE)
};
// Tabs
class TabsGetFunction : public SyncExtensionFunction {
virtual ~TabsGetFunction() {}
virtual bool RunImpl() OVERRIDE;
- DECLARE_EXTENSION_FUNCTION_NAME("tabs.get")
+ DECLARE_EXTENSION_FUNCTION("tabs.get", TABS_GET)
};
class TabsGetCurrentFunction : public SyncExtensionFunction {
virtual ~TabsGetCurrentFunction() {}
virtual bool RunImpl() OVERRIDE;
- DECLARE_EXTENSION_FUNCTION_NAME("tabs.getCurrent")
+ DECLARE_EXTENSION_FUNCTION("tabs.getCurrent", TABS_GETCURRENT)
};
class TabsGetSelectedFunction : public SyncExtensionFunction {
virtual ~TabsGetSelectedFunction() {}
virtual bool RunImpl() OVERRIDE;
- DECLARE_EXTENSION_FUNCTION_NAME("tabs.getSelected")
+ DECLARE_EXTENSION_FUNCTION("tabs.getSelected", TABS_GETSELECTED)
};
class TabsGetAllInWindowFunction : public SyncExtensionFunction {
virtual ~TabsGetAllInWindowFunction() {}
virtual bool RunImpl() OVERRIDE;
- DECLARE_EXTENSION_FUNCTION_NAME("tabs.getAllInWindow")
+ DECLARE_EXTENSION_FUNCTION("tabs.getAllInWindow", TABS_GETALLINWINDOW)
};
class TabsQueryFunction : public SyncExtensionFunction {
virtual ~TabsQueryFunction() {}
virtual bool RunImpl() OVERRIDE;
- DECLARE_EXTENSION_FUNCTION_NAME("tabs.query")
+ DECLARE_EXTENSION_FUNCTION("tabs.query", TABS_QUERY)
};
class TabsCreateFunction : public SyncExtensionFunction {
virtual ~TabsCreateFunction() {}
virtual bool RunImpl() OVERRIDE;
- DECLARE_EXTENSION_FUNCTION_NAME("tabs.create")
+ DECLARE_EXTENSION_FUNCTION("tabs.create", TABS_CREATE)
};
class TabsDuplicateFunction : public SyncExtensionFunction {
virtual ~TabsDuplicateFunction() {}
virtual bool RunImpl() OVERRIDE;
- DECLARE_EXTENSION_FUNCTION_NAME("tabs.duplicate")
+ DECLARE_EXTENSION_FUNCTION("tabs.duplicate", TABS_DUPLICATE)
};
class TabsHighlightFunction : public SyncExtensionFunction {
virtual ~TabsHighlightFunction() {}
virtual bool RunImpl() OVERRIDE;
- DECLARE_EXTENSION_FUNCTION_NAME("tabs.highlight")
+ DECLARE_EXTENSION_FUNCTION("tabs.highlight", TABS_HIGHLIGHT)
};
class TabsUpdateFunction : public AsyncExtensionFunction {
public:
@@ -148,22 +148,22 @@ class TabsUpdateFunction : public AsyncExtensionFunction {
const GURL& on_url,
const ListValue& script_result);
- DECLARE_EXTENSION_FUNCTION_NAME("tabs.update")
+ DECLARE_EXTENSION_FUNCTION("tabs.update", TABS_UPDATE)
};
class TabsMoveFunction : public SyncExtensionFunction {
virtual ~TabsMoveFunction() {}
virtual bool RunImpl() OVERRIDE;
- DECLARE_EXTENSION_FUNCTION_NAME("tabs.move")
+ DECLARE_EXTENSION_FUNCTION("tabs.move", TABS_MOVE)
};
class TabsReloadFunction : public SyncExtensionFunction {
virtual ~TabsReloadFunction() {}
virtual bool RunImpl() OVERRIDE;
- DECLARE_EXTENSION_FUNCTION_NAME("tabs.reload")
+ DECLARE_EXTENSION_FUNCTION("tabs.reload", TABS_RELOAD)
};
class TabsRemoveFunction : public SyncExtensionFunction {
virtual ~TabsRemoveFunction() {}
virtual bool RunImpl() OVERRIDE;
- DECLARE_EXTENSION_FUNCTION_NAME("tabs.remove")
+ DECLARE_EXTENSION_FUNCTION("tabs.remove", TABS_REMOVE)
};
class TabsDetectLanguageFunction : public AsyncExtensionFunction,
public content::NotificationObserver {
@@ -176,7 +176,7 @@ class TabsDetectLanguageFunction : public AsyncExtensionFunction,
const content::NotificationDetails& details) OVERRIDE;
void GotLanguage(const std::string& language);
content::NotificationRegistrar registrar_;
- DECLARE_EXTENSION_FUNCTION_NAME("tabs.detectLanguage")
+ DECLARE_EXTENSION_FUNCTION("tabs.detectLanguage", TABS_DETECTLANGUAGE)
};
class TabsCaptureVisibleTabFunction : public AsyncExtensionFunction,
public content::NotificationObserver {
@@ -212,7 +212,7 @@ class TabsCaptureVisibleTabFunction : public AsyncExtensionFunction,
// Quality setting to use when encoding jpegs. Set in RunImpl().
int image_quality_;
- DECLARE_EXTENSION_FUNCTION_NAME("tabs.captureVisibleTab")
+ DECLARE_EXTENSION_FUNCTION("tabs.captureVisibleTab", TABS_CAPTUREVISIBLETAB)
};
// Implement API call tabs.executeScript and tabs.insertCSS.
@@ -277,14 +277,14 @@ class TabsExecuteScriptFunction : public ExecuteCodeInTabFunction {
const GURL& on_url,
const ListValue& script_result) OVERRIDE;
- DECLARE_EXTENSION_FUNCTION_NAME("tabs.executeScript")
+ DECLARE_EXTENSION_FUNCTION("tabs.executeScript", TABS_EXECUTESCRIPT)
};
class TabsInsertCSSFunction : public ExecuteCodeInTabFunction {
private:
virtual ~TabsInsertCSSFunction() {}
- DECLARE_EXTENSION_FUNCTION_NAME("tabs.insertCSS")
+ DECLARE_EXTENSION_FUNCTION("tabs.insertCSS", TABS_INSERTCSS)
};
#endif // CHROME_BROWSER_EXTENSIONS_API_TABS_TABS_API_H_
diff --git a/chrome/browser/extensions/api/terminal/terminal_private_api.h b/chrome/browser/extensions/api/terminal/terminal_private_api.h
index 298791b..75b97fb 100644
--- a/chrome/browser/extensions/api/terminal/terminal_private_api.h
+++ b/chrome/browser/extensions/api/terminal/terminal_private_api.h
@@ -29,7 +29,8 @@ class TerminalPrivateFunction : public AsyncExtensionFunction {
// Opens new terminal process. Returns the new process id.
class OpenTerminalProcessFunction : public TerminalPrivateFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("terminalPrivate.openTerminalProcess")
+ DECLARE_EXTENSION_FUNCTION("terminalPrivate.openTerminalProcess",
+ TERMINALPRIVATE_OPENTERMINALPROCESS)
OpenTerminalProcessFunction();
@@ -49,7 +50,8 @@ class OpenTerminalProcessFunction : public TerminalPrivateFunction {
// Send input to the terminal process specified by the pid sent as an argument.
class SendInputToTerminalProcessFunction : public TerminalPrivateFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("terminalPrivate.sendInput")
+ DECLARE_EXTENSION_FUNCTION("terminalPrivate.sendInput",
+ TERMINALPRIVATE_SENDINPUT)
protected:
virtual ~SendInputToTerminalProcessFunction();
@@ -65,7 +67,8 @@ class SendInputToTerminalProcessFunction : public TerminalPrivateFunction {
// Closes terminal process with given pid.
class CloseTerminalProcessFunction : public TerminalPrivateFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("terminalPrivate.closeTerminalProcess")
+ DECLARE_EXTENSION_FUNCTION("terminalPrivate.closeTerminalProcess",
+ TERMINALPRIVATE_CLOSETERMINALPROCESS)
protected:
virtual ~CloseTerminalProcessFunction();
@@ -80,7 +83,8 @@ class CloseTerminalProcessFunction : public TerminalPrivateFunction {
// Called by extension when terminal size changes.
class OnTerminalResizeFunction : public TerminalPrivateFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("terminalPrivate.onTerminalResize")
+ DECLARE_EXTENSION_FUNCTION("terminalPrivate.onTerminalResize",
+ TERMINALPRIVATE_ONTERMINALRESIZE)
protected:
virtual ~OnTerminalResizeFunction();
diff --git a/chrome/browser/extensions/api/test/test_api.h b/chrome/browser/extensions/api/test/test_api.h
index 1f47da5..823c328 100644
--- a/chrome/browser/extensions/api/test/test_api.h
+++ b/chrome/browser/extensions/api/test/test_api.h
@@ -24,7 +24,7 @@ class TestExtensionFunction : public SyncExtensionFunction {
class TestNotifyPassFunction : public TestExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("test.notifyPass")
+ DECLARE_EXTENSION_FUNCTION("test.notifyPass", UNKNOWN)
protected:
virtual ~TestNotifyPassFunction();
@@ -35,7 +35,7 @@ class TestNotifyPassFunction : public TestExtensionFunction {
class TestFailFunction : public TestExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("test.notifyFail")
+ DECLARE_EXTENSION_FUNCTION("test.notifyFail", UNKNOWN)
protected:
virtual ~TestFailFunction();
@@ -46,7 +46,7 @@ class TestFailFunction : public TestExtensionFunction {
class TestLogFunction : public TestExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("test.log")
+ DECLARE_EXTENSION_FUNCTION("test.log", UNKNOWN)
protected:
virtual ~TestLogFunction();
@@ -57,7 +57,7 @@ class TestLogFunction : public TestExtensionFunction {
class TestResetQuotaFunction : public TestExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("test.resetQuota")
+ DECLARE_EXTENSION_FUNCTION("test.resetQuota", UNKNOWN)
protected:
virtual ~TestResetQuotaFunction();
@@ -68,7 +68,7 @@ class TestResetQuotaFunction : public TestExtensionFunction {
class TestCreateIncognitoTabFunction : public TestExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("test.createIncognitoTab")
+ DECLARE_EXTENSION_FUNCTION("test.createIncognitoTab", UNKNOWN)
protected:
virtual ~TestCreateIncognitoTabFunction();
@@ -79,7 +79,7 @@ class TestCreateIncognitoTabFunction : public TestExtensionFunction {
class TestSendMessageFunction : public AsyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("test.sendMessage")
+ DECLARE_EXTENSION_FUNCTION("test.sendMessage", UNKNOWN)
// Sends a reply back to the calling extension. Many extensions don't need
// a reply and will just ignore it.
@@ -94,7 +94,7 @@ class TestSendMessageFunction : public AsyncExtensionFunction {
class TestGetConfigFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("test.getConfig")
+ DECLARE_EXTENSION_FUNCTION("test.getConfig", UNKNOWN)
// Set the dictionary returned by chrome.test.getConfig().
// Does not take ownership of |value|.
diff --git a/chrome/browser/extensions/api/top_sites/top_sites_api.h b/chrome/browser/extensions/api/top_sites/top_sites_api.h
index eea5444..1c6cb63 100644
--- a/chrome/browser/extensions/api/top_sites/top_sites_api.h
+++ b/chrome/browser/extensions/api/top_sites/top_sites_api.h
@@ -13,7 +13,7 @@ namespace extensions {
class GetTopSitesFunction : public AsyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("topSites.get")
+ DECLARE_EXTENSION_FUNCTION("topSites.get", TOPSITES_GET)
GetTopSitesFunction();
diff --git a/chrome/browser/extensions/api/usb/usb_api.h b/chrome/browser/extensions/api/usb/usb_api.h
index 59a2f61..1e560b4 100644
--- a/chrome/browser/extensions/api/usb/usb_api.h
+++ b/chrome/browser/extensions/api/usb/usb_api.h
@@ -57,7 +57,7 @@ class UsbAsyncApiTransferFunction : public UsbAsyncApiFunction {
class UsbFindDevicesFunction : public UsbAsyncApiFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("usb.findDevices");
+ DECLARE_EXTENSION_FUNCTION("usb.findDevices", USB_FINDDEVICES)
UsbFindDevicesFunction();
@@ -75,7 +75,7 @@ class UsbFindDevicesFunction : public UsbAsyncApiFunction {
class UsbCloseDeviceFunction : public UsbAsyncApiFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("usb.closeDevice");
+ DECLARE_EXTENSION_FUNCTION("usb.closeDevice", USB_CLOSEDEVICE)
UsbCloseDeviceFunction();
@@ -93,7 +93,7 @@ class UsbCloseDeviceFunction : public UsbAsyncApiFunction {
class UsbClaimInterfaceFunction : public UsbAsyncApiFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("usb.claimInterface");
+ DECLARE_EXTENSION_FUNCTION("usb.claimInterface", USB_CLAIMINTERFACE)
UsbClaimInterfaceFunction();
@@ -111,7 +111,7 @@ class UsbClaimInterfaceFunction : public UsbAsyncApiFunction {
class UsbReleaseInterfaceFunction : public UsbAsyncApiFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("usb.releaseInterface");
+ DECLARE_EXTENSION_FUNCTION("usb.releaseInterface", USB_RELEASEINTERFACE)
UsbReleaseInterfaceFunction();
@@ -129,7 +129,8 @@ class UsbReleaseInterfaceFunction : public UsbAsyncApiFunction {
class UsbSetInterfaceAlternateSettingFunction : public UsbAsyncApiFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("usb.setInterfaceAlternateSetting");
+ DECLARE_EXTENSION_FUNCTION("usb.setInterfaceAlternateSetting",
+ USB_SETINTERFACEALTERNATESETTING)
UsbSetInterfaceAlternateSettingFunction();
@@ -147,7 +148,7 @@ class UsbSetInterfaceAlternateSettingFunction : public UsbAsyncApiFunction {
class UsbControlTransferFunction : public UsbAsyncApiTransferFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("usb.controlTransfer");
+ DECLARE_EXTENSION_FUNCTION("usb.controlTransfer", USB_CONTROLTRANSFER)
UsbControlTransferFunction();
@@ -163,7 +164,7 @@ class UsbControlTransferFunction : public UsbAsyncApiTransferFunction {
class UsbBulkTransferFunction : public UsbAsyncApiTransferFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("usb.bulkTransfer");
+ DECLARE_EXTENSION_FUNCTION("usb.bulkTransfer", USB_BULKTRANSFER)
UsbBulkTransferFunction();
@@ -180,7 +181,7 @@ class UsbBulkTransferFunction : public UsbAsyncApiTransferFunction {
class UsbInterruptTransferFunction : public UsbAsyncApiTransferFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("usb.interruptTransfer");
+ DECLARE_EXTENSION_FUNCTION("usb.interruptTransfer", USB_INTERRUPTTRANSFER)
UsbInterruptTransferFunction();
@@ -196,7 +197,7 @@ class UsbInterruptTransferFunction : public UsbAsyncApiTransferFunction {
class UsbIsochronousTransferFunction : public UsbAsyncApiTransferFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("usb.isochronousTransfer");
+ DECLARE_EXTENSION_FUNCTION("usb.isochronousTransfer", USB_ISOCHRONOUSTRANSFER)
UsbIsochronousTransferFunction();
diff --git a/chrome/browser/extensions/api/web_navigation/web_navigation_api.h b/chrome/browser/extensions/api/web_navigation/web_navigation_api.h
index c15c6f4..255bf08 100644
--- a/chrome/browser/extensions/api/web_navigation/web_navigation_api.h
+++ b/chrome/browser/extensions/api/web_navigation/web_navigation_api.h
@@ -206,14 +206,15 @@ class WebNavigationEventRouter : public TabStripModelObserver,
class WebNavigationGetFrameFunction : public SyncExtensionFunction {
virtual ~WebNavigationGetFrameFunction() {}
virtual bool RunImpl() OVERRIDE;
- DECLARE_EXTENSION_FUNCTION_NAME("webNavigation.getFrame")
+ DECLARE_EXTENSION_FUNCTION("webNavigation.getFrame", WEBNAVIGATION_GETFRAME)
};
// API function that returns the states of all frames in a given tab.
class WebNavigationGetAllFramesFunction : public SyncExtensionFunction {
virtual ~WebNavigationGetAllFramesFunction() {}
virtual bool RunImpl() OVERRIDE;
- DECLARE_EXTENSION_FUNCTION_NAME("webNavigation.getAllFrames")
+ DECLARE_EXTENSION_FUNCTION("webNavigation.getAllFrames",
+ WEBNAVIGATION_GETALLFRAMES)
};
class WebNavigationAPI : public ProfileKeyedAPI,
diff --git a/chrome/browser/extensions/api/web_request/web_request_api.h b/chrome/browser/extensions/api/web_request/web_request_api.h
index c7e567a..c48852d 100644
--- a/chrome/browser/extensions/api/web_request/web_request_api.h
+++ b/chrome/browser/extensions/api/web_request/web_request_api.h
@@ -413,7 +413,8 @@ class ExtensionWebRequestEventRouter
class WebRequestAddEventListener : public SyncIOThreadExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("webRequestInternal.addEventListener");
+ DECLARE_EXTENSION_FUNCTION("webRequestInternal.addEventListener",
+ WEBREQUESTINTERNAL_ADDEVENTLISTENER)
protected:
virtual ~WebRequestAddEventListener() {}
@@ -424,7 +425,8 @@ class WebRequestAddEventListener : public SyncIOThreadExtensionFunction {
class WebRequestEventHandled : public SyncIOThreadExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("webRequestInternal.eventHandled");
+ DECLARE_EXTENSION_FUNCTION("webRequestInternal.eventHandled",
+ WEBREQUESTINTERNAL_EVENTHANDLED)
protected:
virtual ~WebRequestEventHandled() {}
@@ -436,7 +438,8 @@ class WebRequestEventHandled : public SyncIOThreadExtensionFunction {
class WebRequestHandlerBehaviorChangedFunction
: public SyncIOThreadExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("webRequest.handlerBehaviorChanged");
+ DECLARE_EXTENSION_FUNCTION("webRequest.handlerBehaviorChanged",
+ WEBREQUEST_HANDLERBEHAVIORCHANGED)
protected:
virtual ~WebRequestHandlerBehaviorChangedFunction() {}
diff --git a/chrome/browser/extensions/api/web_socket_proxy_private/web_socket_proxy_private_api.h b/chrome/browser/extensions/api/web_socket_proxy_private/web_socket_proxy_private_api.h
index bba77561..29677a6 100644
--- a/chrome/browser/extensions/api/web_socket_proxy_private/web_socket_proxy_private_api.h
+++ b/chrome/browser/extensions/api/web_socket_proxy_private/web_socket_proxy_private_api.h
@@ -79,7 +79,8 @@ class WebSocketProxyPrivate
class WebSocketProxyPrivateGetURLForTCPFunction
: public WebSocketProxyPrivate {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("webSocketProxyPrivate.getURLForTCP")
+ DECLARE_EXTENSION_FUNCTION("webSocketProxyPrivate.getURLForTCP",
+ WEBSOCKETPROXYPRIVATE_GETURLFORTCP)
WebSocketProxyPrivateGetURLForTCPFunction();
@@ -97,7 +98,8 @@ class WebSocketProxyPrivateGetURLForTCPFunction
class WebSocketProxyPrivateGetPassportForTCPFunction
: public WebSocketProxyPrivate {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("webSocketProxyPrivate.getPassportForTCP")
+ DECLARE_EXTENSION_FUNCTION("webSocketProxyPrivate.getPassportForTCP",
+ WEBSOCKETPROXYPRIVATE_GETPASSPORTFORTCP)
WebSocketProxyPrivateGetPassportForTCPFunction();
diff --git a/chrome/browser/extensions/api/webstore_private/webstore_private_api.h b/chrome/browser/extensions/api/webstore_private/webstore_private_api.h
index 9b817da..8b64fdc 100644
--- a/chrome/browser/extensions/api/webstore_private/webstore_private_api.h
+++ b/chrome/browser/extensions/api/webstore_private/webstore_private_api.h
@@ -43,7 +43,8 @@ class WebstorePrivateApi {
class InstallBundleFunction : public AsyncExtensionFunction,
public extensions::BundleInstaller::Delegate {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("webstorePrivate.installBundle");
+ DECLARE_EXTENSION_FUNCTION("webstorePrivate.installBundle",
+ WEBSTOREPRIVATE_INSTALLBUNDLE)
InstallBundleFunction();
@@ -71,7 +72,8 @@ class BeginInstallWithManifestFunction
public ExtensionInstallPrompt::Delegate,
public WebstoreInstallHelper::Delegate {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("webstorePrivate.beginInstallWithManifest3");
+ DECLARE_EXTENSION_FUNCTION("webstorePrivate.beginInstallWithManifest3",
+ WEBSTOREPRIVATE_BEGININSTALLWITHMANIFEST3)
// Result codes for the return value. If you change this, make sure to
// update the description for the beginInstallWithManifest3 callback in
@@ -150,7 +152,8 @@ class CompleteInstallFunction
: public AsyncExtensionFunction,
public WebstoreInstaller::Delegate {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("webstorePrivate.completeInstall");
+ DECLARE_EXTENSION_FUNCTION("webstorePrivate.completeInstall",
+ WEBSTOREPRIVATE_COMPLETEINSTALL)
// WebstoreInstaller::Delegate:
virtual void OnExtensionInstallSuccess(const std::string& id) OVERRIDE;
@@ -167,7 +170,8 @@ class CompleteInstallFunction
class GetBrowserLoginFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("webstorePrivate.getBrowserLogin");
+ DECLARE_EXTENSION_FUNCTION("webstorePrivate.getBrowserLogin",
+ WEBSTOREPRIVATE_GETBROWSERLOGIN)
protected:
virtual ~GetBrowserLoginFunction() {}
@@ -178,7 +182,8 @@ class GetBrowserLoginFunction : public SyncExtensionFunction {
class GetStoreLoginFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("webstorePrivate.getStoreLogin");
+ DECLARE_EXTENSION_FUNCTION("webstorePrivate.getStoreLogin",
+ WEBSTOREPRIVATE_GETSTORELOGIN)
protected:
virtual ~GetStoreLoginFunction() {}
@@ -189,7 +194,8 @@ class GetStoreLoginFunction : public SyncExtensionFunction {
class SetStoreLoginFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("webstorePrivate.setStoreLogin");
+ DECLARE_EXTENSION_FUNCTION("webstorePrivate.setStoreLogin",
+ WEBSTOREPRIVATE_SETSTORELOGIN)
protected:
virtual ~SetStoreLoginFunction() {}
@@ -200,7 +206,8 @@ class SetStoreLoginFunction : public SyncExtensionFunction {
class GetWebGLStatusFunction : public AsyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("webstorePrivate.getWebGLStatus");
+ DECLARE_EXTENSION_FUNCTION("webstorePrivate.getWebGLStatus",
+ WEBSTOREPRIVATE_GETWEBGLSTATUS)
GetWebGLStatusFunction();
diff --git a/chrome/browser/extensions/extension_function.cc b/chrome/browser/extensions/extension_function.cc
index 7f5b20b..c1b2148 100644
--- a/chrome/browser/extensions/extension_function.cc
+++ b/chrome/browser/extensions/extension_function.cc
@@ -6,6 +6,7 @@
#include "base/json/json_writer.h"
#include "base/logging.h"
+#include "base/metrics/histogram.h"
#include "chrome/browser/extensions/extension_function_dispatcher.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/window_controller.h"
@@ -71,7 +72,8 @@ ExtensionFunction::ExtensionFunction()
include_incognito_(false),
user_gesture_(false),
args_(NULL),
- bad_message_(false) {
+ bad_message_(false),
+ histogram_value_(extensions::functions::UNKNOWN) {
}
ExtensionFunction::~ExtensionFunction() {
@@ -117,6 +119,9 @@ void ExtensionFunction::SetError(const std::string& error) {
}
void ExtensionFunction::Run() {
+ UMA_HISTOGRAM_ENUMERATION("Extensions.FunctionCalls", histogram_value(),
+ extensions::functions::ENUM_BOUNDARY);
+
if (!RunImpl())
SendResponse(false);
}
diff --git a/chrome/browser/extensions/extension_function.h b/chrome/browser/extensions/extension_function.h
index 5c009f1..86cce8c 100644
--- a/chrome/browser/extensions/extension_function.h
+++ b/chrome/browser/extensions/extension_function.h
@@ -14,6 +14,7 @@
#include "base/memory/weak_ptr.h"
#include "base/process.h"
#include "base/sequenced_task_runner_helpers.h"
+#include "chrome/browser/extensions/extension_function_histogram_value.h"
#include "chrome/browser/extensions/extension_info_map.h"
#include "chrome/common/extensions/extension.h"
#include "content/public/browser/browser_thread.h"
@@ -63,8 +64,14 @@ class WindowController;
return false; \
} while (0)
-#define DECLARE_EXTENSION_FUNCTION_NAME(name) \
- public: static const char* function_name() { return name; }
+// Declares a callable extension function with the given |name|. You must also
+// supply a unique |histogramvalue| used for histograms of extension function
+// invocation (add new ones at the end of the enum in
+// extension_function_histogram_value.h).
+#define DECLARE_EXTENSION_FUNCTION(name, histogramvalue) \
+ public: static const char* function_name() { return name; } \
+ public: static extensions::functions::HistogramValue histogram_value() \
+ { return extensions::functions::histogramvalue; }
// Traits that describe how ExtensionFunction should be deleted. This just calls
// the virtual "Destruct" method on ExtensionFunction, allowing derived classes
@@ -165,6 +172,12 @@ class ExtensionFunction
void set_user_gesture(bool user_gesture) { user_gesture_ = user_gesture; }
bool user_gesture() const { return user_gesture_; }
+ void set_histogram_value(
+ extensions::functions::HistogramValue histogram_value) {
+ histogram_value_ = histogram_value; }
+ extensions::functions::HistogramValue histogram_value() const {
+ return histogram_value_; }
+
protected:
friend struct ExtensionFunctionDeleteTraits;
@@ -239,6 +252,10 @@ class ExtensionFunction
// returning. The calling renderer process will be killed.
bool bad_message_;
+ // The sample value to record with the histogram API when the function
+ // is invoked.
+ extensions::functions::HistogramValue histogram_value_;
+
DISALLOW_COPY_AND_ASSIGN(ExtensionFunction);
};
diff --git a/chrome/browser/extensions/extension_function_histogram_value.h b/chrome/browser/extensions/extension_function_histogram_value.h
new file mode 100644
index 0000000..799c91a
--- /dev/null
+++ b/chrome/browser/extensions/extension_function_histogram_value.h
@@ -0,0 +1,418 @@
+// Copyright (c) 2012 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_EXTENSION_FUNCTION_HISTOGRAM_VALUE_H_
+#define CHROME_BROWSER_EXTENSIONS_EXTENSION_FUNCTION_HISTOGRAM_VALUE_H_
+
+
+namespace extensions {
+namespace functions {
+
+// Do not reorder this enumeration. If you need to add a new entry, add it just
+// prior to ENUM_BOUNDARY.
+enum HistogramValue {
+ UNKNOWN = 0,
+ WEBNAVIGATION_GETALLFRAMES,
+ BROWSINGDATA_REMOVEWEBSQL,
+ ALARMS_CREATE,
+ FILEBROWSERPRIVATE_REMOVEFILEWATCH,
+ COOKIES_GET,
+ FONTSETTINGS_GETMINIMUMFONTSIZE,
+ CHROMEOSINFOPRIVATE_GET,
+ BOOKMARKMANAGERPRIVATE_CUT,
+ TABS_CAPTUREVISIBLETAB,
+ MANAGEMENT_SETENABLED,
+ HISTORY_DELETEALL,
+ STORAGE_GET,
+ SOCKET_SETKEEPALIVE,
+ DOWNLOADS_CANCEL,
+ BOOKMARKS_CREATE,
+ BOOKMARKS_UPDATE,
+ FILEBROWSERPRIVATE_GETDRIVEFILES,
+ TERMINALPRIVATE_ONTERMINALRESIZE,
+ FILEBROWSERPRIVATE_REQUESTDIRECTORYREFRESH,
+ BLUETOOTH_GETADAPTERSTATE,
+ FILEBROWSERPRIVATE_CANCELFILETRANSFERS,
+ FILEBROWSERPRIVATE_PINDRIVEFILE,
+ SOCKET_WRITE,
+ OMNIBOX_SETDEFAULTSUGGESTION,
+ TTS_SPEAK,
+ WALLPAPERPRIVATE_RESTOREMINIMIZEDWINDOWS,
+ BROWSINGDATA_REMOVEHISTORY,
+ FILEBROWSERPRIVATE_ISFULLSCREEN,
+ AUTOTESTPRIVATE_LOGOUT,
+ EXPERIMENTAL_HISTORY_GETMOSTVISITED,
+ BLUETOOTH_DISCONNECT,
+ BLUETOOTH_SETOUTOFBANDPAIRINGDATA,
+ BOOKMARKMANAGERPRIVATE_CANPASTE,
+ AUTOTESTPRIVATE_RESTART,
+ USB_CLAIMINTERFACE,
+ MEDIAPLAYERPRIVATE_SETWINDOWHEIGHT,
+ EXPERIMENTAL_PROCESSES_GETPROCESSINFO,
+ HISTORY_GETVISITS,
+ SOCKET_BIND,
+ TABS_MOVE,
+ SOCKET_DISCONNECT,
+ FILESYSTEM_GETWRITABLEENTRY,
+ SYNCFILESYSTEM_REQUESTFILESYSTEM,
+ COMMANDS_GETALL,
+ EXPERIMENTAL_DISCOVERY_REMOVESUGGESTION,
+ EXPERIMENTAL_INPUT_VIRTUALKEYBOARD_SENDKEYBOARDEVENT,
+ BOOKMARKMANAGERPRIVATE_GETSUBTREE,
+ EXPERIMENTAL_RLZ_RECORDPRODUCTEVENT,
+ BOOKMARKS_GETRECENT,
+ APP_CURRENTWINDOWINTERNAL_SETBOUNDS,
+ CLOUDPRINTPRIVATE_SETUPCONNECTOR,
+ SERIAL_SETCONTROLSIGNALS,
+ FILEBROWSERPRIVATE_SETLASTMODIFIED,
+ IDLE_SETDETECTIONINTERVAL,
+ FILEBROWSERPRIVATE_GETFILETASKS,
+ WEBSTOREPRIVATE_GETSTORELOGIN,
+ SYSTEMPRIVATE_GETINCOGNITOMODEAVAILABILITY,
+ EXPERIMENTAL_IDLTEST_SENDARRAYBUFFERVIEW,
+ SOCKET_SETNODELAY,
+ APP_CURRENTWINDOWINTERNAL_SHOW,
+ WEBSTOREPRIVATE_GETBROWSERLOGIN,
+ EXPERIMENTAL_IDENTITY_GETAUTHTOKEN,
+ EXPERIMENTAL_SYSTEMINFO_DISPLAY_GET,
+ BROWSINGDATA_REMOVEPLUGINDATA,
+ SOCKET_LISTEN,
+ MEDIAGALLERIES_GETMEDIAFILESYSTEMS,
+ DOWNLOADS_OPEN,
+ TABS_EXECUTESCRIPT,
+ SYNCFILESYSTEM_GETUSAGEANDQUOTA,
+ INPUTMETHODPRIVATE_GET,
+ USB_CLOSEDEVICE,
+ TTS_STOP,
+ SERIAL_GETPORTS,
+ FILEBROWSERPRIVATE_CLEARDRIVECACHE,
+ SERIAL_GETCONTROLSIGNALS,
+ DEVELOPERPRIVATE_ENABLE,
+ FILEBROWSERPRIVATE_GETDRIVEFILEPROPERTIES,
+ USB_FINDDEVICES,
+ BOOKMARKMANAGERPRIVATE_DROP,
+ FILEBROWSERPRIVATE_GETFILETRANSFERS,
+ INPUT_IME_SETMENUITEMS,
+ BOOKMARKS_EXPORT,
+ HISTORY_SEARCH,
+ TTSENGINE_SENDTTSEVENT,
+ EXPERIMENTAL_ACCESSIBILITY_GETALERTSFORTAB,
+ BOOKMARKS_IMPORT,
+ SYNCFILESYSTEM_DELETEFILESYSTEM,
+ DEBUGGER_SENDCOMMAND,
+ DEBUGGER_DETACH,
+ METRICSPRIVATE_RECORDSMALLCOUNT,
+ APP_CURRENTWINDOWINTERNAL_MINIMIZE,
+ DEVELOPERPRIVATE_AUTOUPDATE,
+ EXPERIMENTAL_DNS_RESOLVE,
+ EXPERIMENTAL_SYSTEMINFO_MEMORY_GET,
+ HISTORY_ADDURL,
+ TABS_GET,
+ BROWSERACTION_SETBADGETEXT,
+ TABS_RELOAD,
+ WINDOWS_CREATE,
+ DEVELOPERPRIVATE_LOADUNPACKED,
+ DOWNLOADS_SETDESTINATION,
+ EXPERIMENTAL_PROCESSES_GETPROCESSIDFORTAB,
+ BOOKMARKS_GETCHILDREN,
+ BROWSERACTION_GETTITLE,
+ TERMINALPRIVATE_OPENTERMINALPROCESS,
+ SERIAL_CLOSE,
+ CONTEXTMENUS_REMOVE,
+ FILEBROWSERPRIVATE_REQUESTLOCALFILESYSTEM,
+ ECHOPRIVATE_GETREGISTRATIONCODE,
+ TABS_GETCURRENT,
+ FONTSETTINGS_CLEARDEFAULTFIXEDFONTSIZE,
+ MEDIAPLAYERPRIVATE_CLOSEWINDOW,
+ WEBREQUESTINTERNAL_ADDEVENTLISTENER,
+ CLOUDPRINTPRIVATE_GETPRINTERS,
+ STORAGE_SET,
+ FONTSETTINGS_GETDEFAULTFONTSIZE,
+ EXTENSION_SETUPDATEURLDATA,
+ SERIAL_WRITE,
+ IDLE_QUERYSTATE,
+ EXPERIMENTAL_RLZ_GETACCESSPOINTRLZ,
+ WEBSTOREPRIVATE_SETSTORELOGIN,
+ PAGEACTIONS_ENABLEFORTAB,
+ COOKIES_SET,
+ CONTENTSETTINGS_SET,
+ CONTEXTMENUS_REMOVEALL,
+ TABS_INSERTCSS,
+ WEBREQUEST_HANDLERBEHAVIORCHANGED,
+ INPUT_IME_SETCURSORPOSITION,
+ OMNIBOX_SENDSUGGESTIONS,
+ SYSTEMINDICATOR_ENABLE,
+ EVENTS_GETRULES,
+ BOOKMARKMANAGERPRIVATE_COPY,
+ SOCKET_RECVFROM,
+ TABS_GETALLINWINDOW,
+ CONTEXTMENUS_UPDATE,
+ BOOKMARKS_SEARCH,
+ EXPERIMENTAL_APP_CLEARALLNOTIFICATIONS,
+ BLUETOOTH_GETLOCALOUTOFBANDPAIRINGDATA,
+ SYSTEMPRIVATE_GETUPDATESTATUS,
+ FONTSETTINGS_CLEARMINIMUMFONTSIZE,
+ FILEBROWSERPRIVATE_GETFILELOCATIONS,
+ EXPERIMENTAL_DISCOVERY_SUGGEST,
+ FILEBROWSERPRIVATE_SETDEFAULTTASK,
+ BROWSERACTION_GETBADGETEXT,
+ APP_CURRENTWINDOWINTERNAL_HIDE,
+ SOCKET_CONNECT,
+ BOOKMARKS_GETSUBTREE,
+ HISTORY_DELETEURL,
+ EXPERIMENTAL_MEDIAGALLERIES_ASSEMBLEMEDIAFILE,
+ BOOKMARKMANAGERPRIVATE_STARTDRAG,
+ BROWSINGDATA_REMOVEPASSWORDS,
+ DOWNLOADS_DRAG,
+ INPUT_IME_SETCOMPOSITION,
+ METRICSPRIVATE_RECORDUSERACTION,
+ USB_RELEASEINTERFACE,
+ PAGEACTION_GETPOPUP,
+ SCRIPTBADGE_GETATTENTION,
+ FONTSETTINGS_GETFONTLIST,
+ PERMISSIONS_CONTAINS,
+ SCRIPTBADGE_GETPOPUP,
+ EXPERIMENTAL_ACCESSIBILITY_GETFOCUSEDCONTROL,
+ DEVELOPERPRIVATE_GETSTRINGS,
+ METRICSPRIVATE_RECORDMEDIUMCOUNT,
+ MANAGEMENT_GET,
+ PERMISSIONS_GETALL,
+ DOWNLOADS_SHOW,
+ EXPERIMENTAL_RLZ_CLEARPRODUCTSTATE,
+ TABS_REMOVE,
+ MANAGEMENT_GETPERMISSIONWARNINGSBYID,
+ WINDOWS_GET,
+ FILEBROWSERPRIVATE_EXECUTETASK,
+ TTS_GETVOICES,
+ MANAGEMENT_GETALL,
+ MANAGEMENT_GETPERMISSIONWARNINGSBYMANIFEST,
+ APP_CURRENTWINDOWINTERNAL_CLEARATTENTION,
+ AUTOTESTPRIVATE_SHUTDOWN,
+ FONTSETTINGS_CLEARDEFAULTFONTSIZE,
+ BOOKMARKS_GETTREE,
+ FILEBROWSERPRIVATE_SELECTFILES,
+ RUNTIME_GETBACKGROUNDPAGE,
+ EXPERIMENTAL_RECORD_REPLAYURLS,
+ WEBSTOREPRIVATE_COMPLETEINSTALL,
+ EXPERIMENTAL_SPEECHINPUT_START,
+ COOKIES_GETALL,
+ DOWNLOADS_GETFILEICON,
+ PAGEACTION_GETTITLE,
+ BROWSINGDATA_REMOVE,
+ SERIAL_OPEN,
+ FILESYSTEM_GETDISPLAYPATH,
+ FILEBROWSERPRIVATE_FORMATDEVICE,
+ BOOKMARKS_GET,
+ MANAGEDMODEPRIVATE_GET,
+ ALARMS_CLEAR,
+ SYNCFILESYSTEM_GETFILESYNCSTATUS,
+ SOCKET_GETINFO,
+ WEBSTOREPRIVATE_INSTALLBUNDLE,
+ BROWSERACTION_ENABLE,
+ METRICSPRIVATE_RECORDMEDIUMTIME,
+ PAGEACTION_SETTITLE,
+ CLOUDPRINTPRIVATE_GETHOSTNAME,
+ CONTENTSETTINGS_GETRESOURCEIDENTIFIERS,
+ SOCKET_CREATE,
+ DEVELOPERPRIVATE_RELOAD,
+ FILEBROWSERPRIVATE_GETMOUNTPOINTS,
+ APP_RUNTIME_POSTINTENTRESPONSE,
+ MANAGEDMODEPRIVATE_SETPOLICY,
+ WEBSTOREPRIVATE_BEGININSTALLWITHMANIFEST3,
+ WALLPAPERPRIVATE_SETWALLPAPER,
+ USB_CONTROLTRANSFER,
+ EXPERIMENTAL_SPEECHINPUT_STOP,
+ USB_BULKTRANSFER,
+ FILEBROWSERPRIVATE_GETVOLUMEMETADATA,
+ PAGECAPTURE_SAVEASMHTML,
+ EXTENSION_ISALLOWEDINCOGNITOACCESS,
+ BROWSINGDATA_REMOVEAPPCACHE,
+ APP_CURRENTWINDOWINTERNAL_DRAWATTENTION,
+ METRICSPRIVATE_RECORDCOUNT,
+ USB_INTERRUPTTRANSFER,
+ TYPES_CHROMESETTING_CLEAR,
+ INPUT_IME_COMMITTEXT,
+ EXPERIMENTAL_IDLTEST_SENDARRAYBUFFER,
+ WALLPAPERPRIVATE_SETWALLPAPERIFEXIST,
+ SOCKET_ACCEPT,
+ WEBNAVIGATION_GETFRAME,
+ EXPERIMENTAL_POWER_RELEASEKEEPAWAKE,
+ APP_CURRENTWINDOWINTERNAL_SETICON,
+ PUSHMESSAGING_GETCHANNELID,
+ EXPERIMENTAL_INFOBARS_SHOW,
+ INPUT_IME_SETCANDIDATEWINDOWPROPERTIES,
+ METRICSPRIVATE_RECORDPERCENTAGE,
+ TYPES_CHROMESETTING_GET,
+ WINDOWS_GETLASTFOCUSED,
+ MANAGEDMODEPRIVATE_GETPOLICY,
+ STORAGE_CLEAR,
+ STORAGE_GETBYTESINUSE,
+ TABS_QUERY,
+ PAGEACTION_SETPOPUP,
+ DEVELOPERPRIVATE_INSPECT,
+ DOWNLOADS_SEARCH,
+ FONTSETTINGS_CLEARFONT,
+ WINDOWS_UPDATE,
+ BOOKMARKMANAGERPRIVATE_CANOPENNEWWINDOWS,
+ SERIAL_FLUSH,
+ BROWSERACTION_SETTITLE,
+ BOOKMARKMANAGERPRIVATE_CANEDIT,
+ WALLPAPERPRIVATE_SETCUSTOMWALLPAPER,
+ BOOKMARKS_REMOVE,
+ INPUT_IME_SETCANDIDATES,
+ TERMINALPRIVATE_CLOSETERMINALPROCESS,
+ HISTORY_DELETERANGE,
+ EXPERIMENTAL_IDLTEST_GETARRAYBUFFER,
+ TERMINALPRIVATE_SENDINPUT,
+ TABS_HIGHLIGHT,
+ BLUETOOTH_STARTDISCOVERY,
+ FILEBROWSERPRIVATE_SELECTFILE,
+ WINDOWS_GETCURRENT,
+ DEBUGGER_ATTACH,
+ WALLPAPERPRIVATE_SAVETHUMBNAIL,
+ INPUT_IME_KEYEVENTHANDLED,
+ FONTSETTINGS_SETDEFAULTFONTSIZE,
+ RUNTIME_REQUESTUPDATECHECK,
+ PAGEACTION_SETICON,
+ BROWSERACTION_SETBADGEBACKGROUNDCOLOR,
+ DEVELOPERPRIVATE_GETITEMSINFO,
+ BLUETOOTH_STOPDISCOVERY,
+ COOKIES_REMOVE,
+ EXPERIMENTAL_RLZ_SENDFINANCIALPING,
+ TABCAPTURE_GETCAPTUREDTABS,
+ WINDOWS_REMOVE,
+ WALLPAPERPRIVATE_GETOFFLINEWALLPAPERLIST,
+ BROWSERACTION_GETBADGEBACKGROUNDCOLOR,
+ PAGEACTIONS_DISABLEFORTAB,
+ DEVELOPERPRIVATE_ALLOWFILEACCESS,
+ FILEBROWSERPRIVATE_REMOVEMOUNT,
+ BLUETOOTH_CONNECT,
+ TABCAPTURE_CAPTURE,
+ EXPERIMENTAL_NOTIFICATION_SHOW,
+ TABS_DUPLICATE,
+ BLUETOOTH_WRITE,
+ PAGEACTION_SHOW,
+ WALLPAPERPRIVATE_GETTHUMBNAIL,
+ DOWNLOADS_PAUSE,
+ PERMISSIONS_REQUEST,
+ TOPSITES_GET,
+ BROWSINGDATA_REMOVEDOWNLOADS,
+ BROWSINGDATA_REMOVELOCALSTORAGE,
+ FILEBROWSERHANDLERINTERNAL_SELECTFILE,
+ INPUT_IME_UPDATEMENUITEMS,
+ FILEBROWSERPRIVATE_GETSTRINGS,
+ CONTENTSETTINGS_GET,
+ FONTSETTINGS_SETDEFAULTFIXEDFONTSIZE,
+ EXPERIMENTAL_APP_NOTIFY,
+ METRICSPRIVATE_RECORDLONGTIME,
+ SOCKET_READ,
+ EXPERIMENTAL_PROCESSES_TERMINATE,
+ METRICSPRIVATE_RECORDTIME,
+ BOOKMARKMANAGERPRIVATE_GETSTRINGS,
+ USB_ISOCHRONOUSTRANSFER,
+ PERMISSIONS_REMOVE,
+ MANAGEMENT_UNINSTALL,
+ I18N_GETACCEPTLANGUAGES,
+ MANAGEMENT_LAUNCHAPP,
+ INPUT_IME_CLEARCOMPOSITION,
+ ALARMS_GETALL,
+ DIAL_DISCOVERNOW,
+ TYPES_CHROMESETTING_SET,
+ BROWSERACTION_SETICON,
+ EXPERIMENTAL_ACCESSIBILITY_SETACCESSIBILITYENABLED,
+ FILEBROWSERPRIVATE_VIEWFILES,
+ BLUETOOTH_GETSERVICES,
+ TABS_UPDATE,
+ BROWSINGDATA_REMOVEFORMDATA,
+ FILEBROWSERPRIVATE_RELOADDRIVE,
+ ALARMS_GET,
+ BROWSINGDATA_REMOVEINDEXEDDB,
+ FILEBROWSERPRIVATE_ADDFILEWATCH,
+ CONTENTSETTINGS_CLEAR,
+ FILEBROWSERPRIVATE_GETPREFERENCES,
+ BOOKMARKMANAGERPRIVATE_PASTE,
+ FILESYSTEM_ISWRITABLEENTRY,
+ USB_SETINTERFACEALTERNATESETTING,
+ FONTSETTINGS_SETMINIMUMFONTSIZE,
+ BROWSERACTION_GETPOPUP,
+ SOCKET_DESTROY,
+ BLUETOOTH_GETDEVICES,
+ ALARMS_CLEARALL,
+ FONTSETTINGS_GETDEFAULTFIXEDFONTSIZE,
+ FILEBROWSERPRIVATE_ZIPSELECTION,
+ SYSTEMINDICATOR_DISABLE,
+ SCRIPTBADGE_SETPOPUP,
+ EXTENSION_ISALLOWEDFILESCHEMEACCESS,
+ EXPERIMENTAL_IDENTITY_LAUNCHWEBAUTHFLOW,
+ FILEBROWSERPRIVATE_GETNETWORKCONNECTIONSTATE,
+ TABS_DETECTLANGUAGE,
+ METRICSPRIVATE_RECORDVALUE,
+ BOOKMARKMANAGERPRIVATE_SORTCHILDREN,
+ SERIAL_READ,
+ APP_CURRENTWINDOWINTERNAL_MAXIMIZE,
+ EXPERIMENTAL_DISCOVERY_CLEARALLSUGGESTIONS,
+ MANAGEDMODEPRIVATE_ENTER,
+ FILEBROWSERPRIVATE_TRANSFERFILE,
+ BROWSERACTION_SETPOPUP,
+ TABS_GETSELECTED,
+ FONTSETTINGS_GETFONT,
+ BLUETOOTH_READ,
+ WEBREQUESTINTERNAL_EVENTHANDLED,
+ EVENTS_ADDRULES,
+ CONTEXTMENUS_CREATE,
+ MEDIAPLAYERPRIVATE_GETPLAYLIST,
+ DOWNLOADS_ERASE,
+ EXPERIMENTAL_RECORD_CAPTUREURLS,
+ TTS_ISSPEAKING,
+ BOOKMARKS_REMOVETREE,
+ FILEBROWSERPRIVATE_SEARCHDRIVE,
+ EXPERIMENTAL_SYSTEMINFO_CPU_GET,
+ FILEBROWSERPRIVATE_SETPREFERENCES,
+ FONTSETTINGS_SETFONT,
+ SOCKET_GETNETWORKLIST,
+ BOOKMARKS_MOVE,
+ WALLPAPERPRIVATE_MINIMIZEINACTIVEWINDOWS,
+ STORAGE_REMOVE,
+ AUTOTESTPRIVATE_LOGINSTATUS,
+ TABS_CREATE,
+ FILEBROWSERPRIVATE_CANCELDIALOG,
+ BROWSINGDATA_REMOVECOOKIES,
+ FILESYSTEM_CHOOSEENTRY,
+ MEDIAPLAYERPRIVATE_PLAY,
+ WEBSTOREPRIVATE_GETWEBGLSTATUS,
+ SOCKET_SENDTO,
+ BROWSINGDATA_REMOVEFILESYSTEMS,
+ WALLPAPERPRIVATE_GETSTRINGS,
+ BROWSINGDATA_REMOVECACHE,
+ BOOKMARKMANAGERPRIVATE_RECORDLAUNCH,
+ BROWSERACTION_DISABLE,
+ EXPERIMENTAL_SPEECHINPUT_ISRECORDING,
+ APP_WINDOW_CREATE,
+ RUNTIME_RELOAD,
+ EXPERIMENTAL_POWER_REQUESTKEEPAWAKE,
+ SYSTEMINDICATOR_SETICON,
+ FILEBROWSERPRIVATE_ADDMOUNT,
+ APP_CURRENTWINDOWINTERNAL_FOCUS,
+ EVENTS_REMOVERULES,
+ DOWNLOADS_DOWNLOAD,
+ WINDOWS_GETALL,
+ FILEBROWSERPRIVATE_TOGGLEFULLSCREEN,
+ APP_CURRENTWINDOWINTERNAL_RESTORE,
+ WEBSOCKETPROXYPRIVATE_GETPASSPORTFORTCP,
+ PAGEACTION_HIDE,
+ EXPERIMENTAL_SYSTEMINFO_STORAGE_GET,
+ DOWNLOADS_ACCEPTDANGER,
+ WEBSOCKETPROXYPRIVATE_GETURLFORTCP,
+ FILEBROWSERPRIVATE_GETSIZESTATS,
+ DOWNLOADS_RESUME,
+ COOKIES_GETALLCOOKIESTORES,
+ MEDIAGALLERIESPRIVATE_ADDGALLERYWATCH,
+ MEDIAGALLERIESPRIVATE_REMOVEGALLERYWATCH,
+ ENUM_BOUNDARY // Last entry: Add new entries above.
+};
+
+} // namespace functions
+} // namespace extensions
+
+#endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_FUNCTION_HISTOGRAM_VALUE_H_
diff --git a/chrome/browser/extensions/extension_function_registry.cc b/chrome/browser/extensions/extension_function_registry.cc
index dc585dc..a4b26f6 100644
--- a/chrome/browser/extensions/extension_function_registry.cc
+++ b/chrome/browser/extensions/extension_function_registry.cc
@@ -273,7 +273,7 @@ bool ExtensionFunctionRegistry::OverrideFunction(
if (iter == factories_.end()) {
return false;
} else {
- iter->second = factory;
+ iter->second.factory_ = factory;
return true;
}
}
@@ -282,7 +282,18 @@ ExtensionFunction* ExtensionFunctionRegistry::NewFunction(
const std::string& name) {
FactoryMap::iterator iter = factories_.find(name);
DCHECK(iter != factories_.end());
- ExtensionFunction* function = iter->second();
+ ExtensionFunction* function = iter->second.factory_();
function->set_name(name);
+ function->set_histogram_value(iter->second.histogram_value_);
return function;
}
+
+ExtensionFunctionRegistry::FactoryEntry::FactoryEntry()
+ : factory_(0), histogram_value_(extensions::functions::UNKNOWN) {
+}
+
+ExtensionFunctionRegistry::FactoryEntry::FactoryEntry(
+ ExtensionFunctionFactory factory,
+ extensions::functions::HistogramValue histogram_value)
+ : factory_(factory), histogram_value_(histogram_value) {
+}
diff --git a/chrome/browser/extensions/extension_function_registry.h b/chrome/browser/extensions/extension_function_registry.h
index 3f63942..8605104 100644
--- a/chrome/browser/extensions/extension_function_registry.h
+++ b/chrome/browser/extensions/extension_function_registry.h
@@ -9,6 +9,8 @@
#include <string>
#include <vector>
+#include "chrome/browser/extensions/extension_function_histogram_value.h"
+
class ExtensionFunction;
// A factory function for creating new ExtensionFunction instances.
@@ -44,11 +46,22 @@ class ExtensionFunctionRegistry {
template<class T>
void RegisterFunction() {
- factories_[T::function_name()] = &NewExtensionFunction<T>;
+ ExtensionFunctionFactory factory = &NewExtensionFunction<T>;
+ factories_[T::function_name()] =
+ FactoryEntry(factory, T::histogram_value());
}
- private:
- typedef std::map<std::string, ExtensionFunctionFactory> FactoryMap;
+ struct FactoryEntry {
+ public:
+ explicit FactoryEntry();
+ explicit FactoryEntry(ExtensionFunctionFactory factory,
+ extensions::functions::HistogramValue histogram_value);
+
+ ExtensionFunctionFactory factory_;
+ extensions::functions::HistogramValue histogram_value_;
+ };
+
+ typedef std::map<std::string, FactoryEntry> FactoryMap;
FactoryMap factories_;
};
diff --git a/chrome/browser/extensions/extension_service.h b/chrome/browser/extensions/extension_service.h
index 211d19b..58e7a21 100644
--- a/chrome/browser/extensions/extension_service.h
+++ b/chrome/browser/extensions/extension_service.h
@@ -21,6 +21,7 @@
#include "chrome/browser/extensions/app_shortcut_manager.h"
#include "chrome/browser/extensions/app_sync_bundle.h"
#include "chrome/browser/extensions/blacklist.h"
+#include "chrome/browser/extensions/extension_function_histogram_value.h"
#include "chrome/browser/extensions/extension_icon_manager.h"
#include "chrome/browser/extensions/extension_prefs.h"
#include "chrome/browser/extensions/extension_process_manager.h"
@@ -663,7 +664,7 @@ class ExtensionService
const extensions::Extension* e, const char* histogram);
// Open a dev tools window for the background page for the given extension,
- // starting the background page first if necesary.
+ // starting the background page first if necessary.
void InspectBackgroundPage(const extensions::Extension* extension);
#if defined(UNIT_TEST)
diff --git a/chrome/browser/extensions/system/system_api.h b/chrome/browser/extensions/system/system_api.h
index ba100bb..f8fce69 100644
--- a/chrome/browser/extensions/system/system_api.h
+++ b/chrome/browser/extensions/system/system_api.h
@@ -14,7 +14,8 @@ namespace extensions {
class GetIncognitoModeAvailabilityFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("systemPrivate.getIncognitoModeAvailability")
+ DECLARE_EXTENSION_FUNCTION("systemPrivate.getIncognitoModeAvailability",
+ SYSTEMPRIVATE_GETINCOGNITOMODEAVAILABILITY)
protected:
virtual ~GetIncognitoModeAvailabilityFunction() {}
@@ -26,7 +27,8 @@ class GetIncognitoModeAvailabilityFunction : public SyncExtensionFunction {
// API function which returns the status of system update.
class GetUpdateStatusFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("systemPrivate.getUpdateStatus")
+ DECLARE_EXTENSION_FUNCTION("systemPrivate.getUpdateStatus",
+ SYSTEMPRIVATE_GETUPDATESTATUS)
protected:
virtual ~GetUpdateStatusFunction() {}
diff --git a/chrome/browser/infobars/infobar_extension_api.h b/chrome/browser/infobars/infobar_extension_api.h
index 560acaa..2b2ea7c 100644
--- a/chrome/browser/infobars/infobar_extension_api.h
+++ b/chrome/browser/infobars/infobar_extension_api.h
@@ -10,7 +10,8 @@
class ShowInfoBarFunction : public SyncExtensionFunction {
virtual ~ShowInfoBarFunction() {}
virtual bool RunImpl() OVERRIDE;
- DECLARE_EXTENSION_FUNCTION_NAME("experimental.infobars.show")
+ DECLARE_EXTENSION_FUNCTION("experimental.infobars.show",
+ EXPERIMENTAL_INFOBARS_SHOW)
};
#endif // CHROME_BROWSER_INFOBARS_INFOBAR_EXTENSION_API_H_
diff --git a/chrome/browser/rlz/rlz_extension_api.h b/chrome/browser/rlz/rlz_extension_api.h
index 47c7940..e10521b 100644
--- a/chrome/browser/rlz/rlz_extension_api.h
+++ b/chrome/browser/rlz/rlz_extension_api.h
@@ -15,7 +15,8 @@
class RlzRecordProductEventFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("experimental.rlz.recordProductEvent")
+ DECLARE_EXTENSION_FUNCTION("experimental.rlz.recordProductEvent",
+ EXPERIMENTAL_RLZ_RECORDPRODUCTEVENT)
protected:
virtual ~RlzRecordProductEventFunction() {}
@@ -26,7 +27,8 @@ class RlzRecordProductEventFunction : public SyncExtensionFunction {
class RlzGetAccessPointRlzFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("experimental.rlz.getAccessPointRlz")
+ DECLARE_EXTENSION_FUNCTION("experimental.rlz.getAccessPointRlz",
+ EXPERIMENTAL_RLZ_GETACCESSPOINTRLZ)
protected:
virtual ~RlzGetAccessPointRlzFunction() {}
@@ -37,7 +39,8 @@ class RlzGetAccessPointRlzFunction : public SyncExtensionFunction {
class RlzSendFinancialPingFunction : public AsyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("experimental.rlz.sendFinancialPing")
+ DECLARE_EXTENSION_FUNCTION("experimental.rlz.sendFinancialPing",
+ EXPERIMENTAL_RLZ_SENDFINANCIALPING)
RlzSendFinancialPingFunction();
@@ -63,7 +66,8 @@ class RlzSendFinancialPingFunction : public AsyncExtensionFunction {
class RlzClearProductStateFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("experimental.rlz.clearProductState")
+ DECLARE_EXTENSION_FUNCTION("experimental.rlz.clearProductState",
+ EXPERIMENTAL_RLZ_CLEARPRODUCTSTATE)
protected:
virtual ~RlzClearProductStateFunction() {}
diff --git a/chrome/browser/speech/extension_api/tts_engine_extension_api.h b/chrome/browser/speech/extension_api/tts_engine_extension_api.h
index c2b5c77..ea62a49 100644
--- a/chrome/browser/speech/extension_api/tts_engine_extension_api.h
+++ b/chrome/browser/speech/extension_api/tts_engine_extension_api.h
@@ -51,7 +51,7 @@ class ExtensionTtsEngineSendTtsEventFunction : public SyncExtensionFunction {
private:
virtual ~ExtensionTtsEngineSendTtsEventFunction() {}
virtual bool RunImpl() OVERRIDE;
- DECLARE_EXTENSION_FUNCTION_NAME("ttsEngine.sendTtsEvent")
+ DECLARE_EXTENSION_FUNCTION("ttsEngine.sendTtsEvent", TTSENGINE_SENDTTSEVENT)
};
#endif // CHROME_BROWSER_SPEECH_EXTENSION_API_TTS_ENGINE_EXTENSION_API_H_
diff --git a/chrome/browser/speech/extension_api/tts_extension_api.h b/chrome/browser/speech/extension_api/tts_extension_api.h
index cd00896..55226ea 100644
--- a/chrome/browser/speech/extension_api/tts_extension_api.h
+++ b/chrome/browser/speech/extension_api/tts_extension_api.h
@@ -20,28 +20,28 @@ class TtsSpeakFunction
private:
virtual ~TtsSpeakFunction() {}
virtual bool RunImpl() OVERRIDE;
- DECLARE_EXTENSION_FUNCTION_NAME("tts.speak")
+ DECLARE_EXTENSION_FUNCTION("tts.speak", TTS_SPEAK)
};
class TtsStopSpeakingFunction : public SyncExtensionFunction {
private:
virtual ~TtsStopSpeakingFunction() {}
virtual bool RunImpl() OVERRIDE;
- DECLARE_EXTENSION_FUNCTION_NAME("tts.stop")
+ DECLARE_EXTENSION_FUNCTION("tts.stop", TTS_STOP)
};
class TtsIsSpeakingFunction : public SyncExtensionFunction {
private:
virtual ~TtsIsSpeakingFunction() {}
virtual bool RunImpl() OVERRIDE;
- DECLARE_EXTENSION_FUNCTION_NAME("tts.isSpeaking")
+ DECLARE_EXTENSION_FUNCTION("tts.isSpeaking", TTS_ISSPEAKING)
};
class TtsGetVoicesFunction : public SyncExtensionFunction {
private:
virtual ~TtsGetVoicesFunction() {}
virtual bool RunImpl() OVERRIDE;
- DECLARE_EXTENSION_FUNCTION_NAME("tts.getVoices")
+ DECLARE_EXTENSION_FUNCTION("tts.getVoices", TTS_GETVOICES)
};
class TtsAPI : public ProfileKeyedAPI {
diff --git a/chrome/browser/speech/speech_input_extension_api.h b/chrome/browser/speech/speech_input_extension_api.h
index d330210..c631969e 100644
--- a/chrome/browser/speech/speech_input_extension_api.h
+++ b/chrome/browser/speech/speech_input_extension_api.h
@@ -42,7 +42,8 @@ class SpeechInputAsyncFunction : public AsyncExtensionFunction,
// Implements experimental.speechInput.start.
class StartSpeechInputFunction : public SpeechInputAsyncFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("experimental.speechInput.start");
+ DECLARE_EXTENSION_FUNCTION("experimental.speechInput.start",
+ EXPERIMENTAL_SPEECHINPUT_START)
StartSpeechInputFunction();
@@ -57,7 +58,8 @@ class StartSpeechInputFunction : public SpeechInputAsyncFunction {
// Implements experimental.speechInput.stop.
class StopSpeechInputFunction : public SpeechInputAsyncFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("experimental.speechInput.stop");
+ DECLARE_EXTENSION_FUNCTION("experimental.speechInput.stop",
+ EXPERIMENTAL_SPEECHINPUT_STOP)
StopSpeechInputFunction();
@@ -72,7 +74,8 @@ class StopSpeechInputFunction : public SpeechInputAsyncFunction {
// Implements experimental.speechInput.isRecording.
class IsRecordingSpeechInputFunction : public SyncExtensionFunction {
public:
- DECLARE_EXTENSION_FUNCTION_NAME("experimental.speechInput.isRecording");
+ DECLARE_EXTENSION_FUNCTION("experimental.speechInput.isRecording",
+ EXPERIMENTAL_SPEECHINPUT_ISRECORDING)
// Called back from SpeechInputExtensionManager in the UI thread.
void SetIsRecordingResult(bool result);