Remove all references to UIThreadExtensionFunction
UIThreadExtensionFunction was merged into ExtensionFunction in
http://crrev.com/c/1718990. This removes the stub
UIThreadExtensionFunction class and renames all the references from
UIThreadExtensionFunction to ExtensionFunction.
This CL was generated with the command:
git grep --name-only UIThreadExtensionFunction | \
xargs sed -i 's/UIThreadExtensionFunction/ExtensionFunction/g'
Bug: 980774
Change-Id: Ie1772044041517b88e9f8a625a2b941913aae9b6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1721876
Reviewed-by: John Abd-El-Malek <[email protected]>
Reviewed-by: Karan Bhatia <[email protected]>
Commit-Queue: Clark DuVall <[email protected]>
Cr-Commit-Position: refs/heads/master@{#682393}
diff --git a/chrome/browser/accessibility/accessibility_extension_api.h b/chrome/browser/accessibility/accessibility_extension_api.h
index 0d21dd3..92765e4 100644
--- a/chrome/browser/accessibility/accessibility_extension_api.h
+++ b/chrome/browser/accessibility/accessibility_extension_api.h
@@ -14,7 +14,7 @@
// API function that enables or disables web content accessibility support.
class AccessibilityPrivateSetNativeAccessibilityEnabledFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
~AccessibilityPrivateSetNativeAccessibilityEnabledFunction() override {}
ResponseAction Run() override;
DECLARE_EXTENSION_FUNCTION(
@@ -23,8 +23,7 @@
};
// API function that sets the location of the accessibility focus ring.
-class AccessibilityPrivateSetFocusRingsFunction
- : public UIThreadExtensionFunction {
+class AccessibilityPrivateSetFocusRingsFunction : public ExtensionFunction {
~AccessibilityPrivateSetFocusRingsFunction() override {}
ResponseAction Run() override;
DECLARE_EXTENSION_FUNCTION("accessibilityPrivate.setFocusRings",
@@ -32,8 +31,7 @@
};
// API function that sets the location of the accessibility highlights.
-class AccessibilityPrivateSetHighlightsFunction
- : public UIThreadExtensionFunction {
+class AccessibilityPrivateSetHighlightsFunction : public ExtensionFunction {
~AccessibilityPrivateSetHighlightsFunction() override {}
ResponseAction Run() override;
DECLARE_EXTENSION_FUNCTION("accessibilityPrivate.setHighlights",
@@ -42,7 +40,7 @@
// API function that sets keyboard capture mode.
class AccessibilityPrivateSetKeyboardListenerFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
~AccessibilityPrivateSetKeyboardListenerFunction() override {}
ResponseAction Run() override;
DECLARE_EXTENSION_FUNCTION("accessibilityPrivate.setKeyboardListener",
@@ -50,8 +48,7 @@
};
// API function that darkens or undarkens the screen.
-class AccessibilityPrivateDarkenScreenFunction
- : public UIThreadExtensionFunction {
+class AccessibilityPrivateDarkenScreenFunction : public ExtensionFunction {
~AccessibilityPrivateDarkenScreenFunction() override {}
ResponseAction Run() override;
DECLARE_EXTENSION_FUNCTION("accessibilityPrivate.darkenScreen",
@@ -60,7 +57,7 @@
// Opens a specified subpage in Chrome settings.
class AccessibilityPrivateOpenSettingsSubpageFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
~AccessibilityPrivateOpenSettingsSubpageFunction() override {}
ResponseAction Run() override;
DECLARE_EXTENSION_FUNCTION("accessibilityPrivate.openSettingsSubpage",
@@ -70,7 +67,7 @@
#if defined(OS_CHROMEOS)
// API function that sets the keys to be captured by Switch Access.
class AccessibilityPrivateSetSwitchAccessKeysFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
~AccessibilityPrivateSetSwitchAccessKeysFunction() override {}
ResponseAction Run() override;
DECLARE_EXTENSION_FUNCTION("accessibilityPrivate.setSwitchAccessKeys",
@@ -79,7 +76,7 @@
// API function that sets native ChromeVox ARC support.
class AccessibilityPrivateSetNativeChromeVoxArcSupportForCurrentAppFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
~AccessibilityPrivateSetNativeChromeVoxArcSupportForCurrentAppFunction()
override {}
ResponseAction Run() override;
@@ -90,7 +87,7 @@
// API function that injects key events.
class AccessibilityPrivateSendSyntheticKeyEventFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
~AccessibilityPrivateSendSyntheticKeyEventFunction() override {}
ResponseAction Run() override;
DECLARE_EXTENSION_FUNCTION("accessibilityPrivate.sendSyntheticKeyEvent",
@@ -99,7 +96,7 @@
// API function that enables or disables mouse events in ChromeVox.
class AccessibilityPrivateEnableChromeVoxMouseEventsFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
~AccessibilityPrivateEnableChromeVoxMouseEventsFunction() override {}
ResponseAction Run() override;
DECLARE_EXTENSION_FUNCTION("accessibilityPrivate.enableChromeVoxMouseEvents",
@@ -108,7 +105,7 @@
// API function that injects mouse events.
class AccessibilityPrivateSendSyntheticMouseEventFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
~AccessibilityPrivateSendSyntheticMouseEventFunction() override {}
ResponseAction Run() override;
DECLARE_EXTENSION_FUNCTION("accessibilityPrivate.sendSyntheticMouseEvent",
@@ -117,7 +114,7 @@
// API function that is called when the Select-to-Speak extension state changes.
class AccessibilityPrivateOnSelectToSpeakStateChangedFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
~AccessibilityPrivateOnSelectToSpeakStateChangedFunction() override {}
ResponseAction Run() override;
DECLARE_EXTENSION_FUNCTION("accessibilityPrivate.onSelectToSpeakStateChanged",
@@ -127,7 +124,7 @@
// API function that is called when the Autoclick extension finds scrollable
// bounds.
class AccessibilityPrivateOnScrollableBoundsForPointFoundFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
~AccessibilityPrivateOnScrollableBoundsForPointFoundFunction() override {}
ResponseAction Run() override;
DECLARE_EXTENSION_FUNCTION(
@@ -137,8 +134,7 @@
// API function that is called when a user toggles Dictation from another
// acessibility feature.
-class AccessibilityPrivateToggleDictationFunction
- : public UIThreadExtensionFunction {
+class AccessibilityPrivateToggleDictationFunction : public ExtensionFunction {
~AccessibilityPrivateToggleDictationFunction() override {}
ResponseAction Run() override;
DECLARE_EXTENSION_FUNCTION("accessibilityPrivate.toggleDictation",
@@ -147,7 +143,7 @@
// API function that is called to show or hide the Switch Access menu.
class AccessibilityPrivateSetSwitchAccessMenuStateFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
~AccessibilityPrivateSetSwitchAccessMenuStateFunction() override {}
ResponseAction Run() override;
DECLARE_EXTENSION_FUNCTION("accessibilityPrivate.setSwitchAccessMenuState",
@@ -157,7 +153,7 @@
// API function that requests that key events be forwarded to the Switch
// Access extension.
class AccessibilityPrivateForwardKeyEventsToSwitchAccessFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
~AccessibilityPrivateForwardKeyEventsToSwitchAccessFunction() override {}
ResponseAction Run() override;
DECLARE_EXTENSION_FUNCTION(
@@ -167,7 +163,7 @@
// API function that is called to get the device's battery status as a string.
class AccessibilityPrivateGetBatteryDescriptionFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
public:
AccessibilityPrivateGetBatteryDescriptionFunction();
ResponseAction Run() override;
@@ -180,7 +176,7 @@
// API function that opens or closes the virtual keyboard.
class AccessibilityPrivateSetVirtualKeyboardVisibleFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
~AccessibilityPrivateSetVirtualKeyboardVisibleFunction() override {}
ResponseAction Run() override;
DECLARE_EXTENSION_FUNCTION("accessibilityPrivate.setVirtualKeyboardVisible",
diff --git a/chrome/browser/apps/platform_apps/api/arc_apps_private/arc_apps_private_api.h b/chrome/browser/apps/platform_apps/api/arc_apps_private/arc_apps_private_api.h
index c0724af..61a7bae 100644
--- a/chrome/browser/apps/platform_apps/api/arc_apps_private/arc_apps_private_api.h
+++ b/chrome/browser/apps/platform_apps/api/arc_apps_private/arc_apps_private_api.h
@@ -52,8 +52,7 @@
DISALLOW_COPY_AND_ASSIGN(ArcAppsPrivateAPI);
};
-class ArcAppsPrivateGetLaunchableAppsFunction
- : public UIThreadExtensionFunction {
+class ArcAppsPrivateGetLaunchableAppsFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("arcAppsPrivate.getLaunchableApps",
ARCAPPSPRIVATE_GETLAUNCHABLEAPPS)
@@ -70,7 +69,7 @@
DISALLOW_COPY_AND_ASSIGN(ArcAppsPrivateGetLaunchableAppsFunction);
};
-class ArcAppsPrivateLaunchAppFunction : public UIThreadExtensionFunction {
+class ArcAppsPrivateLaunchAppFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("arcAppsPrivate.launchApp",
ARCAPPSPRIVATE_LAUNCHAPP)
diff --git a/chrome/browser/apps/platform_apps/api/browser/browser_api.h b/chrome/browser/apps/platform_apps/api/browser/browser_api.h
index 31eaf0e..daa7fa028 100644
--- a/chrome/browser/apps/platform_apps/api/browser/browser_api.h
+++ b/chrome/browser/apps/platform_apps/api/browser/browser_api.h
@@ -10,7 +10,7 @@
namespace chrome_apps {
namespace api {
-class BrowserOpenTabFunction : public UIThreadExtensionFunction {
+class BrowserOpenTabFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("browser.openTab", BROWSER_OPENTAB)
diff --git a/chrome/browser/apps/platform_apps/api/first_run_private/first_run_private_api.h b/chrome/browser/apps/platform_apps/api/first_run_private/first_run_private_api.h
index f9efc2c6..5b099936 100644
--- a/chrome/browser/apps/platform_apps/api/first_run_private/first_run_private_api.h
+++ b/chrome/browser/apps/platform_apps/api/first_run_private/first_run_private_api.h
@@ -12,8 +12,7 @@
namespace chrome_apps {
namespace api {
-class FirstRunPrivateGetLocalizedStringsFunction
- : public UIThreadExtensionFunction {
+class FirstRunPrivateGetLocalizedStringsFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("firstRunPrivate.getLocalizedStrings",
FIRSTRUNPRIVATE_GETLOCALIZEDSTRINGS)
@@ -25,7 +24,7 @@
ResponseAction Run() override;
};
-class FirstRunPrivateLaunchTutorialFunction : public UIThreadExtensionFunction {
+class FirstRunPrivateLaunchTutorialFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("firstRunPrivate.launchTutorial",
FIRSTRUNPRIVATE_LAUNCHTUTORIAL)
diff --git a/chrome/browser/apps/platform_apps/api/music_manager_private/music_manager_private_api.h b/chrome/browser/apps/platform_apps/api/music_manager_private/music_manager_private_api.h
index a726b00..42db857 100644
--- a/chrome/browser/apps/platform_apps/api/music_manager_private/music_manager_private_api.h
+++ b/chrome/browser/apps/platform_apps/api/music_manager_private/music_manager_private_api.h
@@ -10,8 +10,7 @@
namespace chrome_apps {
namespace api {
-class MusicManagerPrivateGetDeviceIdFunction
- : public UIThreadExtensionFunction {
+class MusicManagerPrivateGetDeviceIdFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("musicManagerPrivate.getDeviceId",
MUSICMANAGERPRIVATE_GETDEVICEID)
@@ -21,7 +20,7 @@
protected:
~MusicManagerPrivateGetDeviceIdFunction() override;
- // UIThreadExtensionFunction:
+ // ExtensionFunction:
ResponseAction Run() override;
void DeviceIdCallback(const std::string& device_id);
diff --git a/chrome/browser/apps/platform_apps/api/sync_file_system/sync_file_system_api.h b/chrome/browser/apps/platform_apps/api/sync_file_system/sync_file_system_api.h
index 45f2b4e..1bcfe19 100644
--- a/chrome/browser/apps/platform_apps/api/sync_file_system/sync_file_system_api.h
+++ b/chrome/browser/apps/platform_apps/api/sync_file_system/sync_file_system_api.h
@@ -122,7 +122,7 @@
};
class SyncFileSystemSetConflictResolutionPolicyFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("syncFileSystem.setConflictResolutionPolicy",
SYNCFILESYSTEM_SETCONFLICTRESOLUTIONPOLICY)
@@ -133,7 +133,7 @@
};
class SyncFileSystemGetConflictResolutionPolicyFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("syncFileSystem.getConflictResolutionPolicy",
SYNCFILESYSTEM_GETCONFLICTRESOLUTIONPOLICY)
@@ -143,8 +143,7 @@
ResponseAction Run() override;
};
-class SyncFileSystemGetServiceStatusFunction
- : public UIThreadExtensionFunction {
+class SyncFileSystemGetServiceStatusFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("syncFileSystem.getServiceStatus",
SYNCFILESYSTEM_GETSERVICESTATUS)
diff --git a/chrome/browser/apps/platform_apps/api/webstore_widget_private/webstore_widget_private_api.h b/chrome/browser/apps/platform_apps/api/webstore_widget_private/webstore_widget_private_api.h
index 9d1aa430..47f80853 100644
--- a/chrome/browser/apps/platform_apps/api/webstore_widget_private/webstore_widget_private_api.h
+++ b/chrome/browser/apps/platform_apps/api/webstore_widget_private/webstore_widget_private_api.h
@@ -15,7 +15,7 @@
namespace api {
class WebstoreWidgetPrivateInstallWebstoreItemFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
public:
WebstoreWidgetPrivateInstallWebstoreItemFunction();
@@ -25,7 +25,7 @@
protected:
~WebstoreWidgetPrivateInstallWebstoreItemFunction() override;
- // UIThreadExtensionFunction overrides.
+ // ExtensionFunction overrides.
ResponseAction Run() override;
private:
diff --git a/chrome/browser/chromeos/extensions/autotest_private/autotest_private_api.h b/chrome/browser/chromeos/extensions/autotest_private/autotest_private_api.h
index cee74821..3bfc0f8 100644
--- a/chrome/browser/chromeos/extensions/autotest_private/autotest_private_api.h
+++ b/chrome/browser/chromeos/extensions/autotest_private/autotest_private_api.h
@@ -28,7 +28,7 @@
namespace extensions {
-class AutotestPrivateLogoutFunction : public UIThreadExtensionFunction {
+class AutotestPrivateLogoutFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("autotestPrivate.logout", AUTOTESTPRIVATE_LOGOUT)
@@ -37,7 +37,7 @@
ResponseAction Run() override;
};
-class AutotestPrivateRestartFunction : public UIThreadExtensionFunction {
+class AutotestPrivateRestartFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("autotestPrivate.restart", AUTOTESTPRIVATE_RESTART)
@@ -46,7 +46,7 @@
ResponseAction Run() override;
};
-class AutotestPrivateShutdownFunction : public UIThreadExtensionFunction {
+class AutotestPrivateShutdownFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("autotestPrivate.shutdown",
AUTOTESTPRIVATE_SHUTDOWN)
@@ -56,7 +56,7 @@
ResponseAction Run() override;
};
-class AutotestPrivateLoginStatusFunction : public UIThreadExtensionFunction {
+class AutotestPrivateLoginStatusFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("autotestPrivate.loginStatus",
AUTOTESTPRIVATE_LOGINSTATUS)
@@ -66,7 +66,7 @@
ResponseAction Run() override;
};
-class AutotestPrivateLockScreenFunction : public UIThreadExtensionFunction {
+class AutotestPrivateLockScreenFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("autotestPrivate.lockScreen",
AUTOTESTPRIVATE_LOCKSCREEN)
@@ -76,8 +76,7 @@
ResponseAction Run() override;
};
-class AutotestPrivateGetExtensionsInfoFunction
- : public UIThreadExtensionFunction {
+class AutotestPrivateGetExtensionsInfoFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("autotestPrivate.getExtensionsInfo",
AUTOTESTPRIVATE_GETEXTENSIONSINFO)
@@ -87,8 +86,7 @@
ResponseAction Run() override;
};
-class AutotestPrivateSimulateAsanMemoryBugFunction
- : public UIThreadExtensionFunction {
+class AutotestPrivateSimulateAsanMemoryBugFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("autotestPrivate.simulateAsanMemoryBug",
AUTOTESTPRIVATE_SIMULATEASANMEMORYBUG)
@@ -98,8 +96,7 @@
ResponseAction Run() override;
};
-class AutotestPrivateSetTouchpadSensitivityFunction
- : public UIThreadExtensionFunction {
+class AutotestPrivateSetTouchpadSensitivityFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("autotestPrivate.setTouchpadSensitivity",
AUTOTESTPRIVATE_SETTOUCHPADSENSITIVITY)
@@ -109,7 +106,7 @@
ResponseAction Run() override;
};
-class AutotestPrivateSetTapToClickFunction : public UIThreadExtensionFunction {
+class AutotestPrivateSetTapToClickFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("autotestPrivate.setTapToClick",
AUTOTESTPRIVATE_SETTAPTOCLICK)
@@ -119,8 +116,7 @@
ResponseAction Run() override;
};
-class AutotestPrivateSetThreeFingerClickFunction
- : public UIThreadExtensionFunction {
+class AutotestPrivateSetThreeFingerClickFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("autotestPrivate.setThreeFingerClick",
AUTOTESTPRIVATE_SETTHREEFINGERCLICK)
@@ -130,7 +126,7 @@
ResponseAction Run() override;
};
-class AutotestPrivateSetTapDraggingFunction : public UIThreadExtensionFunction {
+class AutotestPrivateSetTapDraggingFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("autotestPrivate.setTapDragging",
AUTOTESTPRIVATE_SETTAPDRAGGING)
@@ -140,8 +136,7 @@
ResponseAction Run() override;
};
-class AutotestPrivateSetNaturalScrollFunction
- : public UIThreadExtensionFunction {
+class AutotestPrivateSetNaturalScrollFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("autotestPrivate.setNaturalScroll",
AUTOTESTPRIVATE_SETNATURALSCROLL)
@@ -151,8 +146,7 @@
ResponseAction Run() override;
};
-class AutotestPrivateSetMouseSensitivityFunction
- : public UIThreadExtensionFunction {
+class AutotestPrivateSetMouseSensitivityFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("autotestPrivate.setMouseSensitivity",
AUTOTESTPRIVATE_SETMOUSESENSITIVITY)
@@ -162,8 +156,7 @@
ResponseAction Run() override;
};
-class AutotestPrivateSetPrimaryButtonRightFunction
- : public UIThreadExtensionFunction {
+class AutotestPrivateSetPrimaryButtonRightFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("autotestPrivate.setPrimaryButtonRight",
AUTOTESTPRIVATE_SETPRIMARYBUTTONRIGHT)
@@ -173,8 +166,7 @@
ResponseAction Run() override;
};
-class AutotestPrivateSetMouseReverseScrollFunction
- : public UIThreadExtensionFunction {
+class AutotestPrivateSetMouseReverseScrollFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("autotestPrivate.setMouseReverseScroll",
AUTOTESTPRIVATE_SETMOUSEREVERSESCROLL)
@@ -185,7 +177,7 @@
};
class AutotestPrivateGetVisibleNotificationsFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
public:
AutotestPrivateGetVisibleNotificationsFunction();
DECLARE_EXTENSION_FUNCTION("autotestPrivate.getVisibleNotifications",
@@ -196,8 +188,7 @@
ResponseAction Run() override;
};
-class AutotestPrivateGetPlayStoreStateFunction
- : public UIThreadExtensionFunction {
+class AutotestPrivateGetPlayStoreStateFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("autotestPrivate.getPlayStoreState",
AUTOTESTPRIVATE_GETPLAYSTORESTATE)
@@ -207,7 +198,7 @@
ResponseAction Run() override;
};
-class AutotestPrivateGetArcStateFunction : public UIThreadExtensionFunction {
+class AutotestPrivateGetArcStateFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("autotestPrivate.getArcState",
AUTOTESTPRIVATE_GETARCSTATE)
@@ -217,8 +208,7 @@
ResponseAction Run() override;
};
-class AutotestPrivateSetPlayStoreEnabledFunction
- : public UIThreadExtensionFunction {
+class AutotestPrivateSetPlayStoreEnabledFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("autotestPrivate.setPlayStoreEnabled",
AUTOTESTPRIVATE_SETPLAYSTOREENABLED)
@@ -228,7 +218,7 @@
ResponseAction Run() override;
};
-class AutotestPrivateGetHistogramFunction : public UIThreadExtensionFunction {
+class AutotestPrivateGetHistogramFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("autotestPrivate.getHistogram",
AUTOTESTPRIVATE_GETHISTOGRAM)
@@ -246,7 +236,7 @@
ResponseValue GetHistogram(const std::string& name);
};
-class AutotestPrivateIsAppShownFunction : public UIThreadExtensionFunction {
+class AutotestPrivateIsAppShownFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("autotestPrivate.isAppShown",
AUTOTESTPRIVATE_ISAPPSHOWN)
@@ -257,8 +247,7 @@
};
// Deprecated, use GetArcState instead.
-class AutotestPrivateIsArcProvisionedFunction
- : public UIThreadExtensionFunction {
+class AutotestPrivateIsArcProvisionedFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("autotestPrivate.isArcProvisioned",
AUTOTESTPRIVATE_ISARCPROVISIONED)
@@ -268,7 +257,7 @@
ResponseAction Run() override;
};
-class AutotestPrivateGetArcAppFunction : public UIThreadExtensionFunction {
+class AutotestPrivateGetArcAppFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("autotestPrivate.getArcApp",
AUTOTESTPRIVATE_GETARCAPP)
@@ -278,7 +267,7 @@
ResponseAction Run() override;
};
-class AutotestPrivateGetArcPackageFunction : public UIThreadExtensionFunction {
+class AutotestPrivateGetArcPackageFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("autotestPrivate.getArcPackage",
AUTOTESTPRIVATE_GETARCPACKAGE)
@@ -288,7 +277,7 @@
ResponseAction Run() override;
};
-class AutotestPrivateLaunchArcAppFunction : public UIThreadExtensionFunction {
+class AutotestPrivateLaunchArcAppFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("autotestPrivate.launchArcApp",
AUTOTESTPRIVATE_LAUNCHARCAPP)
@@ -298,7 +287,7 @@
ResponseAction Run() override;
};
-class AutotestPrivateLaunchAppFunction : public UIThreadExtensionFunction {
+class AutotestPrivateLaunchAppFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("autotestPrivate.launchApp",
AUTOTESTPRIVATE_LAUNCHAPP)
@@ -308,7 +297,7 @@
ResponseAction Run() override;
};
-class AutotestPrivateCloseAppFunction : public UIThreadExtensionFunction {
+class AutotestPrivateCloseAppFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("autotestPrivate.closeApp",
AUTOTESTPRIVATE_CLOSEAPP)
@@ -318,8 +307,7 @@
ResponseAction Run() override;
};
-class AutotestPrivateSetCrostiniEnabledFunction
- : public UIThreadExtensionFunction {
+class AutotestPrivateSetCrostiniEnabledFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("autotestPrivate.setCrostiniEnabled",
AUTOTESTPRIVATE_SETCROSTINIENABLED)
@@ -329,8 +317,7 @@
ResponseAction Run() override;
};
-class AutotestPrivateRunCrostiniInstallerFunction
- : public UIThreadExtensionFunction {
+class AutotestPrivateRunCrostiniInstallerFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("autotestPrivate.runCrostiniInstaller",
AUTOTESTPRIVATE_RUNCROSTINIINSTALLER)
@@ -342,8 +329,7 @@
void CrostiniRestarted(crostini::CrostiniResult);
};
-class AutotestPrivateRunCrostiniUninstallerFunction
- : public UIThreadExtensionFunction {
+class AutotestPrivateRunCrostiniUninstallerFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("autotestPrivate.runCrostiniUninstaller",
AUTOTESTPRIVATE_RUNCROSTINIUNINSTALLER)
@@ -355,7 +341,7 @@
void CrostiniRemoved(crostini::CrostiniResult);
};
-class AutotestPrivateExportCrostiniFunction : public UIThreadExtensionFunction {
+class AutotestPrivateExportCrostiniFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("autotestPrivate.exportCrostini",
AUTOTESTPRIVATE_EXPORTCROSTINI)
@@ -367,7 +353,7 @@
void CrostiniExported(crostini::CrostiniResult);
};
-class AutotestPrivateImportCrostiniFunction : public UIThreadExtensionFunction {
+class AutotestPrivateImportCrostiniFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("autotestPrivate.importCrostini",
AUTOTESTPRIVATE_IMPORTCROSTINI)
@@ -379,7 +365,7 @@
void CrostiniImported(crostini::CrostiniResult);
};
-class AutotestPrivateTakeScreenshotFunction : public UIThreadExtensionFunction {
+class AutotestPrivateTakeScreenshotFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("autotestPrivate.takeScreenshot",
AUTOTESTPRIVATE_TAKESCREENSHOT)
@@ -394,7 +380,7 @@
};
class AutotestPrivateGetPrinterListFunction
- : public UIThreadExtensionFunction,
+ : public ExtensionFunction,
public chromeos::CupsPrintersManager::Observer {
public:
DECLARE_EXTENSION_FUNCTION("autotestPrivate.getPrinterList",
@@ -413,7 +399,7 @@
base::OneShotTimer timeout_timer_;
};
-class AutotestPrivateUpdatePrinterFunction : public UIThreadExtensionFunction {
+class AutotestPrivateUpdatePrinterFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("autotestPrivate.updatePrinter",
AUTOTESTPRIVATE_UPDATEPRINTER)
@@ -423,7 +409,7 @@
ResponseAction Run() override;
};
-class AutotestPrivateRemovePrinterFunction : public UIThreadExtensionFunction {
+class AutotestPrivateRemovePrinterFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("autotestPrivate.removePrinter",
AUTOTESTPRIVATE_REMOVEPRINTER)
@@ -434,7 +420,7 @@
};
class AutotestPrivateGetAllEnterprisePoliciesFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("autotestPrivate.getAllEnterprisePolicies",
AUTOTESTPRIVATE_GETALLENTERPRISEPOLICIES)
@@ -445,7 +431,7 @@
};
class AutotestPrivateBootstrapMachineLearningServiceFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
public:
AutotestPrivateBootstrapMachineLearningServiceFunction();
DECLARE_EXTENSION_FUNCTION("autotestPrivate.bootstrapMachineLearningService",
@@ -465,7 +451,7 @@
// Enable/disable the Google Assistant feature. This toggles the Assistant user
// pref which will indirectly bring up or shut down the Assistant service.
class AutotestPrivateSetAssistantEnabledFunction
- : public UIThreadExtensionFunction,
+ : public ExtensionFunction,
public ash::DefaultVoiceInteractionObserver {
public:
AutotestPrivateSetAssistantEnabledFunction();
@@ -491,7 +477,7 @@
// Send text query to Assistant and return response.
class AutotestPrivateSendAssistantTextQueryFunction
- : public UIThreadExtensionFunction,
+ : public ExtensionFunction,
public chromeos::assistant::mojom::AssistantInteractionSubscriber {
public:
AutotestPrivateSendAssistantTextQueryFunction();
@@ -540,8 +526,7 @@
};
// Set user pref value in the pref tree.
-class AutotestPrivateSetWhitelistedPrefFunction
- : public UIThreadExtensionFunction {
+class AutotestPrivateSetWhitelistedPrefFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("autotestPrivate.setWhitelistedPref",
AUTOTESTPRIVATE_SETWHITELISTEDPREF)
@@ -553,8 +538,7 @@
// Enable/disable a Crostini app's "scaled" property.
// When an app is "scaled", it will use low display density.
-class AutotestPrivateSetCrostiniAppScaledFunction
- : public UIThreadExtensionFunction {
+class AutotestPrivateSetCrostiniAppScaledFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("autotestPrivate.setCrostiniAppScaled",
AUTOTESTPRIVATE_SETCROSTINIAPPSCALED)
@@ -589,7 +573,7 @@
// Get the primary display's scale factor.
class AutotestPrivateGetPrimaryDisplayScaleFactorFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("autotestPrivate.getPrimaryDisplayScaleFactor",
AUTOTESTPRIVATE_GETPRIMARYDISPLAYSCALEFACTOR)
@@ -599,8 +583,7 @@
};
// Returns if tablet mode is enabled.
-class AutotestPrivateIsTabletModeEnabledFunction
- : public UIThreadExtensionFunction {
+class AutotestPrivateIsTabletModeEnabledFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("autotestPrivate.isTabletModeEnabled",
AUTOTESTPRIVATE_ISTABLETMODEENABLED)
@@ -610,8 +593,7 @@
};
// Enables/Disables tablet mode.
-class AutotestPrivateSetTabletModeEnabledFunction
- : public UIThreadExtensionFunction {
+class AutotestPrivateSetTabletModeEnabledFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("autotestPrivate.setTabletModeEnabled",
AUTOTESTPRIVATE_SETTABLETMODEENABLED)
@@ -623,7 +605,7 @@
// Returns the shelf auto hide behavior.
class AutotestPrivateGetShelfAutoHideBehaviorFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
public:
AutotestPrivateGetShelfAutoHideBehaviorFunction();
DECLARE_EXTENSION_FUNCTION("autotestPrivate.getShelfAutoHideBehavior",
@@ -636,7 +618,7 @@
// Sets shelf autohide behavior.
class AutotestPrivateSetShelfAutoHideBehaviorFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
public:
AutotestPrivateSetShelfAutoHideBehaviorFunction();
DECLARE_EXTENSION_FUNCTION("autotestPrivate.setShelfAutoHideBehavior",
@@ -648,8 +630,7 @@
};
// Returns the shelf alignment.
-class AutotestPrivateGetShelfAlignmentFunction
- : public UIThreadExtensionFunction {
+class AutotestPrivateGetShelfAlignmentFunction : public ExtensionFunction {
public:
AutotestPrivateGetShelfAlignmentFunction();
DECLARE_EXTENSION_FUNCTION("autotestPrivate.getShelfAlignment",
@@ -661,8 +642,7 @@
};
// Sets shelf alignment.
-class AutotestPrivateSetShelfAlignmentFunction
- : public UIThreadExtensionFunction {
+class AutotestPrivateSetShelfAlignmentFunction : public ExtensionFunction {
public:
AutotestPrivateSetShelfAlignmentFunction();
DECLARE_EXTENSION_FUNCTION("autotestPrivate.setShelfAlignment",
@@ -674,7 +654,7 @@
};
class AutotestPrivateShowVirtualKeyboardIfEnabledFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
public:
AutotestPrivateShowVirtualKeyboardIfEnabledFunction();
DECLARE_EXTENSION_FUNCTION("autotestPrivate.showVirtualKeyboardIfEnabled",
@@ -685,8 +665,7 @@
ResponseAction Run() override;
};
-class AutotestPrivateSetArcAppWindowStateFunction
- : public UIThreadExtensionFunction {
+class AutotestPrivateSetArcAppWindowStateFunction : public ExtensionFunction {
public:
AutotestPrivateSetArcAppWindowStateFunction();
DECLARE_EXTENSION_FUNCTION("autotestPrivate.setArcAppWindowState",
diff --git a/chrome/browser/chromeos/extensions/echo_private_api.h b/chrome/browser/chromeos/extensions/echo_private_api.h
index 60302f57..0e00caa9 100644
--- a/chrome/browser/chromeos/extensions/echo_private_api.h
+++ b/chrome/browser/chromeos/extensions/echo_private_api.h
@@ -26,8 +26,7 @@
} // namespace chromeos
-class EchoPrivateGetRegistrationCodeFunction
- : public UIThreadExtensionFunction {
+class EchoPrivateGetRegistrationCodeFunction : public ExtensionFunction {
public:
EchoPrivateGetRegistrationCodeFunction();
@@ -56,7 +55,7 @@
ECHOPRIVATE_GETOOBETIMESTAMP)
};
-class EchoPrivateSetOfferInfoFunction : public UIThreadExtensionFunction {
+class EchoPrivateSetOfferInfoFunction : public ExtensionFunction {
public:
EchoPrivateSetOfferInfoFunction();
@@ -69,7 +68,7 @@
ECHOPRIVATE_SETOFFERINFO)
};
-class EchoPrivateGetOfferInfoFunction : public UIThreadExtensionFunction {
+class EchoPrivateGetOfferInfoFunction : public ExtensionFunction {
public:
EchoPrivateGetOfferInfoFunction();
diff --git a/chrome/browser/chromeos/extensions/file_manager/file_browser_handler_api.h b/chrome/browser/chromeos/extensions/file_manager/file_browser_handler_api.h
index b892577..bbe7cc8c 100644
--- a/chrome/browser/chromeos/extensions/file_manager/file_browser_handler_api.h
+++ b/chrome/browser/chromeos/extensions/file_manager/file_browser_handler_api.h
@@ -81,7 +81,7 @@
// The fileBrowserHandlerInternal.selectFile extension function implementation.
// See the file description for more info.
class FileBrowserHandlerInternalSelectFileFunction
- : public extensions::LoggedUIThreadExtensionFunction {
+ : public extensions::LoggedExtensionFunction {
public:
// Default constructor used in production code.
// It will create its own FileSelectorFactory implementation, and set the
@@ -108,7 +108,7 @@
// The class is ref counted, so destructor should not be public.
~FileBrowserHandlerInternalSelectFileFunction() override;
- // UIThreadExtensionFunction implementation.
+ // ExtensionFunction implementation.
// Runs the extension function implementation.
ResponseAction Run() override;
diff --git a/chrome/browser/chromeos/extensions/file_manager/private_api_base.cc b/chrome/browser/chromeos/extensions/file_manager/private_api_base.cc
index 581d480..42eec842 100644
--- a/chrome/browser/chromeos/extensions/file_manager/private_api_base.cc
+++ b/chrome/browser/chromeos/extensions/file_manager/private_api_base.cc
@@ -22,16 +22,16 @@
} // namespace
-LoggedUIThreadExtensionFunction::LoggedUIThreadExtensionFunction()
+LoggedExtensionFunction::LoggedExtensionFunction()
: log_on_completion_(false),
slow_threshold_(kDefaultSlowOperationThreshold),
very_slow_threshold_(kDefaultVerySlowOperationThreshold) {
start_time_ = base::TimeTicks::Now();
}
-LoggedUIThreadExtensionFunction::~LoggedUIThreadExtensionFunction() = default;
+LoggedExtensionFunction::~LoggedExtensionFunction() = default;
-void LoggedUIThreadExtensionFunction::OnResponded() {
+void LoggedExtensionFunction::OnResponded() {
base::TimeDelta elapsed = base::TimeTicks::Now() - start_time_;
const ChromeExtensionFunctionDetails chrome_details(this);
@@ -61,10 +61,10 @@
"ms)",
name(), request_id(), elapsed.InMilliseconds());
}
- UIThreadExtensionFunction::OnResponded();
+ ExtensionFunction::OnResponded();
}
-void LoggedUIThreadExtensionFunction::SetWarningThresholds(
+void LoggedExtensionFunction::SetWarningThresholds(
base::TimeDelta slow_threshold,
base::TimeDelta very_slow_threshold) {
slow_threshold_ = slow_threshold;
diff --git a/chrome/browser/chromeos/extensions/file_manager/private_api_base.h b/chrome/browser/chromeos/extensions/file_manager/private_api_base.h
index bf5cd6ce..28423ff3 100644
--- a/chrome/browser/chromeos/extensions/file_manager/private_api_base.h
+++ b/chrome/browser/chromeos/extensions/file_manager/private_api_base.h
@@ -12,7 +12,7 @@
namespace extensions {
-// This class adds a logging feature to UIThreadExtensionFunction. Logging is
+// This class adds a logging feature to ExtensionFunction. Logging is
// done when sending the response to JavaScript, using drive::util::Log().
// API functions of fileManagerPrivate should inherit this class.
//
@@ -20,14 +20,14 @@
// set_log_on_completion(true) to enable it, if they want. However, even if
// the logging is turned off, a warning is emitted when a function call is
// very slow. See the implementation of OnResponded() for details.
-class LoggedUIThreadExtensionFunction : public UIThreadExtensionFunction {
+class LoggedExtensionFunction : public ExtensionFunction {
public:
- LoggedUIThreadExtensionFunction();
+ LoggedExtensionFunction();
protected:
- ~LoggedUIThreadExtensionFunction() override;
+ ~LoggedExtensionFunction() override;
- // UIThreadExtensionFunction overrides.
+ // ExtensionFunction overrides.
void OnResponded() override;
void SetWarningThresholds(base::TimeDelta slow_threshold,
diff --git a/chrome/browser/chromeos/extensions/file_manager/private_api_dialog.cc b/chrome/browser/chromeos/extensions/file_manager/private_api_dialog.cc
index 1832a21..712b09d 100644
--- a/chrome/browser/chromeos/extensions/file_manager/private_api_dialog.cc
+++ b/chrome/browser/chromeos/extensions/file_manager/private_api_dialog.cc
@@ -31,7 +31,7 @@
// Computes the routing ID for SelectFileDialogExtension from the |function|.
SelectFileDialogExtension::RoutingID GetFileDialogRoutingID(
- UIThreadExtensionFunction* function) {
+ ExtensionFunction* function) {
return SelectFileDialogExtensionUserData::GetRoutingIdForWebContents(
function->GetSenderWebContents());
}
diff --git a/chrome/browser/chromeos/extensions/file_manager/private_api_dialog.h b/chrome/browser/chromeos/extensions/file_manager/private_api_dialog.h
index 492bb28..6bfcf7a 100644
--- a/chrome/browser/chromeos/extensions/file_manager/private_api_dialog.h
+++ b/chrome/browser/chromeos/extensions/file_manager/private_api_dialog.h
@@ -21,8 +21,7 @@
namespace extensions {
// Cancel file selection Dialog. Closes the dialog window.
-class FileManagerPrivateCancelDialogFunction
- : public LoggedUIThreadExtensionFunction {
+class FileManagerPrivateCancelDialogFunction : public LoggedExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("fileManagerPrivate.cancelDialog",
FILEMANAGERPRIVATE_CANCELDIALOG)
@@ -34,8 +33,7 @@
ResponseAction Run() override;
};
-class FileManagerPrivateSelectFileFunction
- : public LoggedUIThreadExtensionFunction {
+class FileManagerPrivateSelectFileFunction : public LoggedExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("fileManagerPrivate.selectFile",
FILEMANAGERPRIVATE_SELECTFILE)
@@ -55,8 +53,7 @@
};
// Select multiple files. Closes the dialog window.
-class FileManagerPrivateSelectFilesFunction
- : public LoggedUIThreadExtensionFunction {
+class FileManagerPrivateSelectFilesFunction : public LoggedExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("fileManagerPrivate.selectFiles",
FILEMANAGERPRIVATE_SELECTFILES)
@@ -76,7 +73,7 @@
// Get a list of Android picker apps.
class FileManagerPrivateGetAndroidPickerAppsFunction
- : public LoggedUIThreadExtensionFunction {
+ : public LoggedExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("fileManagerPrivate.getAndroidPickerApps",
FILEMANAGERPRIVATE_GETANDROIDPICKERAPPS)
@@ -97,7 +94,7 @@
// Select an Android picker app. Closes the dialog window.
class FileManagerPrivateSelectAndroidPickerAppFunction
- : public LoggedUIThreadExtensionFunction {
+ : public LoggedExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("fileManagerPrivate.selectAndroidPickerApp",
FILEMANAGERPRIVATE_SELECTANDROIDPICKERAPP)
diff --git a/chrome/browser/chromeos/extensions/file_manager/private_api_drive.cc b/chrome/browser/chromeos/extensions/file_manager/private_api_drive.cc
index c65b8493..9da60d8 100644
--- a/chrome/browser/chromeos/extensions/file_manager/private_api_drive.cc
+++ b/chrome/browser/chromeos/extensions/file_manager/private_api_drive.cc
@@ -861,7 +861,7 @@
}
void OnSearchDriveFs(
- scoped_refptr<UIThreadExtensionFunction> function,
+ scoped_refptr<ExtensionFunction> function,
bool filter_dirs,
base::OnceCallback<void(std::unique_ptr<base::ListValue>)> callback,
drive::FileError error,
@@ -911,7 +911,7 @@
}
drivefs::mojom::QueryParameters::QuerySource SearchDriveFs(
- scoped_refptr<UIThreadExtensionFunction> function,
+ scoped_refptr<ExtensionFunction> function,
drivefs::mojom::QueryParametersPtr query,
bool filter_dirs,
base::OnceCallback<void(std::unique_ptr<base::ListValue>)> callback) {
diff --git a/chrome/browser/chromeos/extensions/file_manager/private_api_drive.h b/chrome/browser/chromeos/extensions/file_manager/private_api_drive.h
index 7795a90..65f69753 100644
--- a/chrome/browser/chromeos/extensions/file_manager/private_api_drive.h
+++ b/chrome/browser/chromeos/extensions/file_manager/private_api_drive.h
@@ -39,7 +39,7 @@
// Implements the chrome.fileManagerPrivate.ensureFileDownloaded method.
class FileManagerPrivateInternalEnsureFileDownloadedFunction
- : public LoggedUIThreadExtensionFunction {
+ : public LoggedExtensionFunction {
public:
FileManagerPrivateInternalEnsureFileDownloadedFunction();
@@ -63,7 +63,7 @@
// On error, returns a dictionary with the key "error" set to the error number
// (base::File::Error).
class FileManagerPrivateInternalGetEntryPropertiesFunction
- : public LoggedUIThreadExtensionFunction {
+ : public LoggedExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("fileManagerPrivateInternal.getEntryProperties",
FILEMANAGERPRIVATEINTERNAL_GETENTRYPROPERTIES)
@@ -89,7 +89,7 @@
// Implements the chrome.fileManagerPrivate.pinDriveFile method.
class FileManagerPrivateInternalPinDriveFileFunction
- : public LoggedUIThreadExtensionFunction {
+ : public LoggedExtensionFunction {
public:
FileManagerPrivateInternalPinDriveFileFunction();
@@ -114,7 +114,7 @@
// Implements the chrome.fileManagerPrivate.cancelFileTransfers method.
class FileManagerPrivateInternalCancelFileTransfersFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("fileManagerPrivateInternal.cancelFileTransfers",
FILEMANAGERPRIVATEINTERNAL_CANCELFILETRANSFERS)
@@ -126,8 +126,7 @@
ResponseAction Run() override;
};
-class FileManagerPrivateSearchDriveFunction
- : public LoggedUIThreadExtensionFunction {
+class FileManagerPrivateSearchDriveFunction : public LoggedExtensionFunction {
public:
typedef std::vector<drive::SearchResultInfo> SearchResultInfoList;
@@ -165,7 +164,7 @@
// Similar to FileManagerPrivateSearchDriveFunction but this one is used for
// searching drive metadata which is stored locally.
class FileManagerPrivateSearchDriveMetadataFunction
- : public LoggedUIThreadExtensionFunction {
+ : public LoggedExtensionFunction {
public:
enum class SearchType {
kText,
@@ -207,7 +206,7 @@
// Implements the chrome.fileManagerPrivate.getDriveConnectionState method.
class FileManagerPrivateGetDriveConnectionStateFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("fileManagerPrivate.getDriveConnectionState",
FILEMANAGERPRIVATE_GETDRIVECONNECTIONSTATE)
@@ -220,7 +219,7 @@
// Implements the chrome.fileManagerPrivate.requestAccessToken method.
class FileManagerPrivateRequestAccessTokenFunction
- : public LoggedUIThreadExtensionFunction {
+ : public LoggedExtensionFunction {
public:
FileManagerPrivateRequestAccessTokenFunction();
@@ -240,7 +239,7 @@
// Implements the chrome.fileManagerPrivate.requestDriveShare method.
class FileManagerPrivateInternalRequestDriveShareFunction
- : public LoggedUIThreadExtensionFunction {
+ : public LoggedExtensionFunction {
public:
FileManagerPrivateInternalRequestDriveShareFunction();
@@ -258,7 +257,7 @@
// Implements the chrome.fileManagerPrivate.getDownloadUrl method.
class FileManagerPrivateInternalGetDownloadUrlFunction
- : public LoggedUIThreadExtensionFunction {
+ : public LoggedExtensionFunction {
public:
FileManagerPrivateInternalGetDownloadUrlFunction();
@@ -295,7 +294,7 @@
};
class FileManagerPrivateInternalGetThumbnailFunction
- : public LoggedUIThreadExtensionFunction {
+ : public LoggedExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("fileManagerPrivateInternal.getThumbnail",
FILEMANAGERPRIVATEINTERNAL_GETTHUMBNAIL)
diff --git a/chrome/browser/chromeos/extensions/file_manager/private_api_file_system.h b/chrome/browser/chromeos/extensions/file_manager/private_api_file_system.h
index e03f7f2d..69f82140 100644
--- a/chrome/browser/chromeos/extensions/file_manager/private_api_file_system.h
+++ b/chrome/browser/chromeos/extensions/file_manager/private_api_file_system.h
@@ -51,7 +51,7 @@
// Grant permission to request externalfile scheme. The permission is needed to
// start drag for external file URL.
class FileManagerPrivateEnableExternalFileSchemeFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("fileManagerPrivate.enableExternalFileScheme",
FILEMANAGERPRIVATE_ENABLEEXTERNALFILESCHEME)
@@ -65,7 +65,7 @@
// Grants R/W permissions to profile-specific directories (Drive, Downloads)
// from other profiles.
-class FileManagerPrivateGrantAccessFunction : public UIThreadExtensionFunction {
+class FileManagerPrivateGrantAccessFunction : public ExtensionFunction {
public:
FileManagerPrivateGrantAccessFunction();
@@ -86,7 +86,7 @@
// "FileWatch",
// the class and its sub classes are used only for watching changes in
// directories.
-class FileWatchFunctionBase : public LoggedUIThreadExtensionFunction {
+class FileWatchFunctionBase : public LoggedExtensionFunction {
public:
using ResponseCallback = base::Callback<void(bool success)>;
@@ -167,8 +167,7 @@
};
// Implements the chrome.fileManagerPrivate.getSizeStats method.
-class FileManagerPrivateGetSizeStatsFunction
- : public LoggedUIThreadExtensionFunction {
+class FileManagerPrivateGetSizeStatsFunction : public LoggedExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("fileManagerPrivate.getSizeStats",
FILEMANAGERPRIVATE_GETSIZESTATS)
@@ -193,7 +192,7 @@
// Implements the chrome.fileManagerPrivate.validatePathNameLength method.
class FileManagerPrivateInternalValidatePathNameLengthFunction
- : public LoggedUIThreadExtensionFunction {
+ : public LoggedExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION(
"fileManagerPrivateInternal.validatePathNameLength",
@@ -211,8 +210,7 @@
// Implements the chrome.fileManagerPrivate.formatVolume method.
// Formats Volume given its mount path.
-class FileManagerPrivateFormatVolumeFunction
- : public LoggedUIThreadExtensionFunction {
+class FileManagerPrivateFormatVolumeFunction : public LoggedExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("fileManagerPrivate.formatVolume",
FILEMANAGERPRIVATE_FORMATVOLUME)
@@ -226,8 +224,7 @@
// Implements the chrome.fileManagerPrivate.renameVolume method.
// Renames Volume given its mount path and new Volume name.
-class FileManagerPrivateRenameVolumeFunction
- : public LoggedUIThreadExtensionFunction {
+class FileManagerPrivateRenameVolumeFunction : public LoggedExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("fileManagerPrivate.renameVolume",
FILEMANAGERPRIVATE_RENAMEVOLUME)
@@ -241,7 +238,7 @@
// Implements the chrome.fileManagerPrivate.startCopy method.
class FileManagerPrivateInternalStartCopyFunction
- : public LoggedUIThreadExtensionFunction {
+ : public LoggedExtensionFunction {
public:
FileManagerPrivateInternalStartCopyFunction();
@@ -276,8 +273,7 @@
};
// Implements the chrome.fileManagerPrivate.cancelCopy method.
-class FileManagerPrivateCancelCopyFunction
- : public LoggedUIThreadExtensionFunction {
+class FileManagerPrivateCancelCopyFunction : public LoggedExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("fileManagerPrivate.cancelCopy",
FILEMANAGERPRIVATE_CANCELCOPY)
@@ -292,7 +288,7 @@
// Implements the chrome.fileManagerPrivateInternal.resolveIsolatedEntries
// method.
class FileManagerPrivateInternalResolveIsolatedEntriesFunction
- : public LoggedUIThreadExtensionFunction {
+ : public LoggedExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION(
"fileManagerPrivateInternal.resolveIsolatedEntries",
@@ -302,7 +298,7 @@
~FileManagerPrivateInternalResolveIsolatedEntriesFunction() override =
default;
- // UIThreadExtensionFunction overrides.
+ // ExtensionFunction overrides.
ResponseAction Run() override;
private:
@@ -312,7 +308,7 @@
};
class FileManagerPrivateInternalComputeChecksumFunction
- : public LoggedUIThreadExtensionFunction {
+ : public LoggedExtensionFunction {
public:
FileManagerPrivateInternalComputeChecksumFunction();
@@ -334,7 +330,7 @@
// Implements the chrome.fileManagerPrivate.searchFilesByHashes method.
// TODO(b/883628): Write some tests maybe?
class FileManagerPrivateSearchFilesByHashesFunction
- : public LoggedUIThreadExtensionFunction {
+ : public LoggedExtensionFunction {
public:
FileManagerPrivateSearchFilesByHashesFunction();
@@ -364,8 +360,7 @@
const ChromeExtensionFunctionDetails chrome_details_;
};
-class FileManagerPrivateSearchFilesFunction
- : public LoggedUIThreadExtensionFunction {
+class FileManagerPrivateSearchFilesFunction : public LoggedExtensionFunction {
public:
FileManagerPrivateSearchFilesFunction();
@@ -387,7 +382,7 @@
// Implements the chrome.fileManagerPrivate.setEntryTag method.
class FileManagerPrivateInternalSetEntryTagFunction
- : public LoggedUIThreadExtensionFunction {
+ : public LoggedExtensionFunction {
public:
FileManagerPrivateInternalSetEntryTagFunction();
DECLARE_EXTENSION_FUNCTION("fileManagerPrivateInternal.setEntryTag",
@@ -407,7 +402,7 @@
// Implements the chrome.fileManagerPrivate.getDirectorySize method.
class FileManagerPrivateInternalGetDirectorySizeFunction
- : public LoggedUIThreadExtensionFunction {
+ : public LoggedExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("fileManagerPrivateInternal.getDirectorySize",
FILEMANAGERPRIVATEINTERNAL_GETDIRECTORYSIZE)
diff --git a/chrome/browser/chromeos/extensions/file_manager/private_api_misc.cc b/chrome/browser/chromeos/extensions/file_manager/private_api_misc.cc
index 3fa8f58..2e57b06e 100644
--- a/chrome/browser/chromeos/extensions/file_manager/private_api_misc.cc
+++ b/chrome/browser/chromeos/extensions/file_manager/private_api_misc.cc
@@ -93,7 +93,7 @@
base::TimeDelta::FromSeconds(30);
// Obtains the current app window.
-AppWindow* GetCurrentAppWindow(UIThreadExtensionFunction* function) {
+AppWindow* GetCurrentAppWindow(ExtensionFunction* function) {
content::WebContents* const contents = function->GetSenderWebContents();
return contents
? AppWindowRegistry::Get(function->browser_context())
diff --git a/chrome/browser/chromeos/extensions/file_manager/private_api_misc.h b/chrome/browser/chromeos/extensions/file_manager/private_api_misc.h
index 8ba79a4..42eb24fd5 100644
--- a/chrome/browser/chromeos/extensions/file_manager/private_api_misc.h
+++ b/chrome/browser/chromeos/extensions/file_manager/private_api_misc.h
@@ -46,7 +46,7 @@
// Implements the chrome.fileManagerPrivate.logoutUserForReauthentication
// method.
class FileManagerPrivateLogoutUserForReauthenticationFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("fileManagerPrivate.logoutUserForReauthentication",
FILEMANAGERPRIVATE_LOGOUTUSERFORREAUTHENTICATION)
@@ -60,8 +60,7 @@
// Implements the chrome.fileManagerPrivate.getPreferences method.
// Gets settings for the Files app.
-class FileManagerPrivateGetPreferencesFunction
- : public UIThreadExtensionFunction {
+class FileManagerPrivateGetPreferencesFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("fileManagerPrivate.getPreferences",
FILEMANAGERPRIVATE_GETPREFERENCES)
@@ -74,8 +73,7 @@
// Implements the chrome.fileManagerPrivate.setPreferences method.
// Sets settings for the Files app.
-class FileManagerPrivateSetPreferencesFunction
- : public UIThreadExtensionFunction {
+class FileManagerPrivateSetPreferencesFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("fileManagerPrivate.setPreferences",
FILEMANAGERPRIVATE_SETPREFERENCES)
@@ -90,7 +88,7 @@
// Sets the ARC flag for the Files app and returns what was the state before
// setting.
class FileManagerPrivateSetArcStorageToastShownFlagFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("fileManagerPrivate.setArcStorageToastShownFlag",
FILEMANAGERPRIVATE_SETARCSTORAGETOASTSHOWNFLAG)
@@ -104,7 +102,7 @@
// Implements the chrome.fileManagerPrivate.zipSelection method.
// Creates a zip file for the selected files.
class FileManagerPrivateInternalZipSelectionFunction
- : public LoggedUIThreadExtensionFunction {
+ : public LoggedExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("fileManagerPrivateInternal.zipSelection",
FILEMANAGERPRIVATEINTERNAL_ZIPSELECTION)
@@ -126,7 +124,7 @@
// WebContents.
// TODO(hirono): Remove this function once the zoom level change is supported
// for all apps. crbug.com/227175.
-class FileManagerPrivateZoomFunction : public UIThreadExtensionFunction {
+class FileManagerPrivateZoomFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("fileManagerPrivate.zoom", FILEMANAGERPRIVATE_ZOOM)
@@ -138,7 +136,7 @@
};
class FileManagerPrivateRequestWebStoreAccessTokenFunction
- : public LoggedUIThreadExtensionFunction {
+ : public LoggedExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("fileManagerPrivate.requestWebStoreAccessToken",
FILEMANAGERPRIVATE_REQUESTWEBSTOREACCESSTOKEN)
@@ -159,7 +157,7 @@
const ChromeExtensionFunctionDetails chrome_details_;
};
-class FileManagerPrivateGetProfilesFunction : public UIThreadExtensionFunction {
+class FileManagerPrivateGetProfilesFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("fileManagerPrivate.getProfiles",
FILEMANAGERPRIVATE_GETPROFILES)
@@ -172,8 +170,7 @@
};
// Implements the chrome.fileManagerPrivate.openInspector method.
-class FileManagerPrivateOpenInspectorFunction
- : public UIThreadExtensionFunction {
+class FileManagerPrivateOpenInspectorFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("fileManagerPrivate.openInspector",
FILEMANAGERPRIVATE_OPENINSPECTOR)
@@ -185,8 +182,7 @@
};
// Implements the chrome.fileManagerPrivate.openSettingsSubpage method.
-class FileManagerPrivateOpenSettingsSubpageFunction
- : public UIThreadExtensionFunction {
+class FileManagerPrivateOpenSettingsSubpageFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("fileManagerPrivate.openSettingsSubpage",
FILEMANAGERPRIVATE_OPENSETTINGSSUBPAGE)
@@ -199,7 +195,7 @@
// Implements the chrome.fileManagerPrivate.getMimeType method.
class FileManagerPrivateInternalGetMimeTypeFunction
- : public LoggedUIThreadExtensionFunction {
+ : public LoggedExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("fileManagerPrivateInternal.getMimeType",
FILEMANAGERPRIVATEINTERNAL_GETMIMETYPE)
@@ -216,8 +212,7 @@
};
// Implements the chrome.fileManagerPrivate.isPiexLoaderEnabled method.
-class FileManagerPrivateIsPiexLoaderEnabledFunction
- : public UIThreadExtensionFunction {
+class FileManagerPrivateIsPiexLoaderEnabledFunction : public ExtensionFunction {
public:
FileManagerPrivateIsPiexLoaderEnabledFunction() = default;
DECLARE_EXTENSION_FUNCTION("fileManagerPrivate.isPiexLoaderEnabled",
@@ -231,8 +226,7 @@
};
// Implements the chrome.fileManagerPrivate.getProviders method.
-class FileManagerPrivateGetProvidersFunction
- : public UIThreadExtensionFunction {
+class FileManagerPrivateGetProvidersFunction : public ExtensionFunction {
public:
FileManagerPrivateGetProvidersFunction();
DECLARE_EXTENSION_FUNCTION("fileManagerPrivate.getProviders",
@@ -248,7 +242,7 @@
// Implements the chrome.fileManagerPrivate.addProvidedFileSystem method.
class FileManagerPrivateAddProvidedFileSystemFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
public:
FileManagerPrivateAddProvidedFileSystemFunction();
DECLARE_EXTENSION_FUNCTION("fileManagerPrivate.addProvidedFileSystem",
@@ -264,7 +258,7 @@
// Implements the chrome.fileManagerPrivate.configureVolume method.
class FileManagerPrivateConfigureVolumeFunction
- : public LoggedUIThreadExtensionFunction {
+ : public LoggedExtensionFunction {
public:
FileManagerPrivateConfigureVolumeFunction();
DECLARE_EXTENSION_FUNCTION("fileManagerPrivate.configureVolume",
@@ -282,8 +276,7 @@
// Implements the chrome.fileManagerPrivate.mountCrostini method.
// Starts and mounts crostini container.
-class FileManagerPrivateMountCrostiniFunction
- : public LoggedUIThreadExtensionFunction {
+class FileManagerPrivateMountCrostiniFunction : public LoggedExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("fileManagerPrivate.mountCrostini",
FILEMANAGERPRIVATE_MOUNTCROSTINI)
@@ -304,7 +297,7 @@
// Implements the chrome.fileManagerPrivate.sharePathsWithCrostini
// method. Shares specified paths.
class FileManagerPrivateInternalSharePathsWithCrostiniFunction
- : public LoggedUIThreadExtensionFunction {
+ : public LoggedExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION(
"fileManagerPrivateInternal.sharePathsWithCrostini",
@@ -325,7 +318,7 @@
// Implements the chrome.fileManagerPrivate.unsharePathWithCrostini
// method. Unshares specified path.
class FileManagerPrivateInternalUnsharePathWithCrostiniFunction
- : public LoggedUIThreadExtensionFunction {
+ : public LoggedExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION(
"fileManagerPrivateInternal.unsharePathWithCrostini",
@@ -346,7 +339,7 @@
// Implements the chrome.fileManagerPrivate.getCrostiniSharedPaths
// method. Returns list of file entries.
class FileManagerPrivateInternalGetCrostiniSharedPathsFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION(
"fileManagerPrivateInternal.getCrostiniSharedPaths",
@@ -366,7 +359,7 @@
// Implements the chrome.fileManagerPrivate.getLinuxPackageInfo method.
// Retrieves information about a Linux package.
class FileManagerPrivateInternalGetLinuxPackageInfoFunction
- : public LoggedUIThreadExtensionFunction {
+ : public LoggedExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("fileManagerPrivateInternal.getLinuxPackageInfo",
FILEMANAGERPRIVATEINTERNAL_GETLINUXPACKAGEINFO)
@@ -386,7 +379,7 @@
// Implements the chrome.fileManagerPrivate.installLinuxPackage method.
// Starts installation of a Linux package.
class FileManagerPrivateInternalInstallLinuxPackageFunction
- : public LoggedUIThreadExtensionFunction {
+ : public LoggedExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("fileManagerPrivateInternal.installLinuxPackage",
FILEMANAGERPRIVATEINTERNAL_INSTALLLINUXPACKAGE)
@@ -404,7 +397,7 @@
// Implements the chrome.fileManagerPrivate.getCustomActions method.
class FileManagerPrivateInternalGetCustomActionsFunction
- : public LoggedUIThreadExtensionFunction {
+ : public LoggedExtensionFunction {
public:
FileManagerPrivateInternalGetCustomActionsFunction();
DECLARE_EXTENSION_FUNCTION("fileManagerPrivateInternal.getCustomActions",
@@ -423,7 +416,7 @@
// Implements the chrome.fileManagerPrivate.executeCustomAction method.
class FileManagerPrivateInternalExecuteCustomActionFunction
- : public LoggedUIThreadExtensionFunction {
+ : public LoggedExtensionFunction {
public:
FileManagerPrivateInternalExecuteCustomActionFunction();
DECLARE_EXTENSION_FUNCTION("fileManagerPrivateInternal.executeCustomAction",
@@ -442,7 +435,7 @@
// Implements the chrome.fileManagerPrivateInternal.getRecentFiles method.
class FileManagerPrivateInternalGetRecentFilesFunction
- : public LoggedUIThreadExtensionFunction {
+ : public LoggedExtensionFunction {
public:
FileManagerPrivateInternalGetRecentFilesFunction();
DECLARE_EXTENSION_FUNCTION("fileManagerPrivateInternal.getRecentFiles",
@@ -465,7 +458,7 @@
// Implements the chrome.fileManagerPrivate.detectCharacterEncoding method.
class FileManagerPrivateDetectCharacterEncodingFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("fileManagerPrivate.detectCharacterEncoding",
FILEMANAGERPRIVATE_DETECTCHARACTERENCODING)
diff --git a/chrome/browser/chromeos/extensions/file_manager/private_api_mount.h b/chrome/browser/chromeos/extensions/file_manager/private_api_mount.h
index af49e745..348ebcd 100644
--- a/chrome/browser/chromeos/extensions/file_manager/private_api_mount.h
+++ b/chrome/browser/chromeos/extensions/file_manager/private_api_mount.h
@@ -19,8 +19,7 @@
// Implements chrome.fileManagerPrivate.addMount method.
// Mounts removable devices and archive files.
-class FileManagerPrivateAddMountFunction
- : public LoggedUIThreadExtensionFunction {
+class FileManagerPrivateAddMountFunction : public LoggedExtensionFunction {
public:
FileManagerPrivateAddMountFunction();
@@ -58,8 +57,7 @@
// Implements chrome.fileManagerPrivate.removeMount method.
// Unmounts selected volume. Expects volume id as an argument.
-class FileManagerPrivateRemoveMountFunction
- : public LoggedUIThreadExtensionFunction {
+class FileManagerPrivateRemoveMountFunction : public LoggedExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("fileManagerPrivate.removeMount",
FILEMANAGERPRIVATE_REMOVEMOUNT)
@@ -74,7 +72,7 @@
// Implements chrome.fileManagerPrivate.markCacheAsMounted method.
// Marks a cached file as mounted or unmounted.
class FileManagerPrivateMarkCacheAsMountedFunction
- : public LoggedUIThreadExtensionFunction {
+ : public LoggedExtensionFunction {
public:
FileManagerPrivateMarkCacheAsMountedFunction();
@@ -107,7 +105,7 @@
// Implements chrome.fileManagerPrivate.getVolumeMetadataList method.
class FileManagerPrivateGetVolumeMetadataListFunction
- : public LoggedUIThreadExtensionFunction {
+ : public LoggedExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("fileManagerPrivate.getVolumeMetadataList",
FILEMANAGERPRIVATE_GETVOLUMEMETADATALIST)
diff --git a/chrome/browser/chromeos/extensions/file_manager/private_api_strings.h b/chrome/browser/chromeos/extensions/file_manager/private_api_strings.h
index 95ebdbc..7d2d1f3 100644
--- a/chrome/browser/chromeos/extensions/file_manager/private_api_strings.h
+++ b/chrome/browser/chromeos/extensions/file_manager/private_api_strings.h
@@ -13,7 +13,7 @@
// Implements the chrome.fileManagerPrivate.getStrings method.
// Used to get strings for the file manager from JavaScript.
-class FileManagerPrivateGetStringsFunction : public UIThreadExtensionFunction {
+class FileManagerPrivateGetStringsFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("fileManagerPrivate.getStrings",
FILEMANAGERPRIVATE_GETSTRINGS)
diff --git a/chrome/browser/chromeos/extensions/file_manager/private_api_tasks.h b/chrome/browser/chromeos/extensions/file_manager/private_api_tasks.h
index 1f9e8548..1127fec 100644
--- a/chrome/browser/chromeos/extensions/file_manager/private_api_tasks.h
+++ b/chrome/browser/chromeos/extensions/file_manager/private_api_tasks.h
@@ -29,7 +29,7 @@
// Implements the chrome.fileManagerPrivateInternal.executeTask method.
class FileManagerPrivateInternalExecuteTaskFunction
- : public LoggedUIThreadExtensionFunction {
+ : public LoggedExtensionFunction {
public:
FileManagerPrivateInternalExecuteTaskFunction();
@@ -39,7 +39,7 @@
protected:
~FileManagerPrivateInternalExecuteTaskFunction() override = default;
- // UIThreadExtensionFunction overrides.
+ // ExtensionFunction overrides.
ResponseAction Run() override;
private:
@@ -51,7 +51,7 @@
// Implements the chrome.fileManagerPrivateInternal.getFileTasks method.
class FileManagerPrivateInternalGetFileTasksFunction
- : public LoggedUIThreadExtensionFunction {
+ : public LoggedExtensionFunction {
public:
FileManagerPrivateInternalGetFileTasksFunction();
@@ -61,7 +61,7 @@
protected:
~FileManagerPrivateInternalGetFileTasksFunction() override;
- // UIThreadExtensionFunction overrides.
+ // ExtensionFunction overrides.
ResponseAction Run() override;
private:
@@ -87,7 +87,7 @@
// Implements the chrome.fileManagerPrivateInternal.setDefaultTask method.
class FileManagerPrivateInternalSetDefaultTaskFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("fileManagerPrivateInternal.setDefaultTask",
FILEMANAGERPRIVATEINTERNAL_SETDEFAULTTASK)
diff --git a/chrome/browser/chromeos/extensions/file_system_provider/file_system_provider_api.h b/chrome/browser/chromeos/extensions/file_system_provider/file_system_provider_api.h
index e5aab5e..4004b188 100644
--- a/chrome/browser/chromeos/extensions/file_system_provider/file_system_provider_api.h
+++ b/chrome/browser/chromeos/extensions/file_system_provider/file_system_provider_api.h
@@ -10,7 +10,7 @@
namespace extensions {
-class FileSystemProviderMountFunction : public UIThreadExtensionFunction {
+class FileSystemProviderMountFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("fileSystemProvider.mount",
FILESYSTEMPROVIDER_MOUNT)
@@ -20,7 +20,7 @@
ResponseAction Run() override;
};
-class FileSystemProviderUnmountFunction : public UIThreadExtensionFunction {
+class FileSystemProviderUnmountFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("fileSystemProvider.unmount",
FILESYSTEMPROVIDER_UNMOUNT)
@@ -30,7 +30,7 @@
ResponseAction Run() override;
};
-class FileSystemProviderGetAllFunction : public UIThreadExtensionFunction {
+class FileSystemProviderGetAllFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("fileSystemProvider.getAll",
FILESYSTEMPROVIDER_GETALL)
@@ -40,7 +40,7 @@
ResponseAction Run() override;
};
-class FileSystemProviderGetFunction : public UIThreadExtensionFunction {
+class FileSystemProviderGetFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("fileSystemProvider.get", FILESYSTEMPROVIDER_GET)
diff --git a/chrome/browser/chromeos/extensions/file_system_provider/provider_function.cc b/chrome/browser/chromeos/extensions/file_system_provider/provider_function.cc
index 868ca65..79402b41 100644
--- a/chrome/browser/chromeos/extensions/file_system_provider/provider_function.cc
+++ b/chrome/browser/chromeos/extensions/file_system_provider/provider_function.cc
@@ -148,7 +148,7 @@
}
bool FileSystemProviderInternalFunction::PreRunValidation(std::string* error) {
- if (!UIThreadExtensionFunction::PreRunValidation(error))
+ if (!ExtensionFunction::PreRunValidation(error))
return false;
std::string file_system_id;
diff --git a/chrome/browser/chromeos/extensions/file_system_provider/provider_function.h b/chrome/browser/chromeos/extensions/file_system_provider/provider_function.h
index 14a542a..c7975d8 100644
--- a/chrome/browser/chromeos/extensions/file_system_provider/provider_function.h
+++ b/chrome/browser/chromeos/extensions/file_system_provider/provider_function.h
@@ -46,7 +46,7 @@
// Base class for internal API functions handling request results, either
// a success or a failure.
-class FileSystemProviderInternalFunction : public UIThreadExtensionFunction {
+class FileSystemProviderInternalFunction : public ExtensionFunction {
public:
FileSystemProviderInternalFunction();
diff --git a/chrome/browser/chromeos/extensions/info_private_api.h b/chrome/browser/chromeos/extensions/info_private_api.h
index 990dc86..6031439 100644
--- a/chrome/browser/chromeos/extensions/info_private_api.h
+++ b/chrome/browser/chromeos/extensions/info_private_api.h
@@ -16,14 +16,14 @@
namespace extensions {
-class ChromeosInfoPrivateGetFunction : public UIThreadExtensionFunction {
+class ChromeosInfoPrivateGetFunction : public ExtensionFunction {
public:
ChromeosInfoPrivateGetFunction();
protected:
~ChromeosInfoPrivateGetFunction() override;
- // UIThreadExtensionFunction:
+ // ExtensionFunction:
ResponseAction Run() override;
private:
@@ -33,21 +33,20 @@
DECLARE_EXTENSION_FUNCTION("chromeosInfoPrivate.get", CHROMEOSINFOPRIVATE_GET)
};
-class ChromeosInfoPrivateSetFunction : public UIThreadExtensionFunction {
+class ChromeosInfoPrivateSetFunction : public ExtensionFunction {
public:
ChromeosInfoPrivateSetFunction();
protected:
~ChromeosInfoPrivateSetFunction() override;
- // UIThreadExtensionFunction:
+ // ExtensionFunction:
ResponseAction Run() override;
private:
DECLARE_EXTENSION_FUNCTION("chromeosInfoPrivate.set", CHROMEOSINFOPRIVATE_SET)
};
-
} // namespace extensions
#endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_INFO_PRIVATE_API_H_
diff --git a/chrome/browser/chromeos/extensions/input_method_api.h b/chrome/browser/chromeos/extensions/input_method_api.h
index ac44931..4aa05a3 100644
--- a/chrome/browser/chromeos/extensions/input_method_api.h
+++ b/chrome/browser/chromeos/extensions/input_method_api.h
@@ -24,7 +24,7 @@
// Implements the inputMethodPrivate.getInputMethodConfig method.
class InputMethodPrivateGetInputMethodConfigFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
public:
InputMethodPrivateGetInputMethodConfigFunction() {}
@@ -41,7 +41,7 @@
// Implements the inputMethodPrivate.getCurrentInputMethod method.
class InputMethodPrivateGetCurrentInputMethodFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
public:
InputMethodPrivateGetCurrentInputMethodFunction() {}
@@ -58,7 +58,7 @@
// Implements the inputMethodPrivate.setCurrentInputMethod method.
class InputMethodPrivateSetCurrentInputMethodFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
public:
InputMethodPrivateSetCurrentInputMethodFunction() {}
@@ -74,8 +74,7 @@
};
// Implements the inputMethodPrivate.getInputMethods method.
-class InputMethodPrivateGetInputMethodsFunction
- : public UIThreadExtensionFunction {
+class InputMethodPrivateGetInputMethodsFunction : public ExtensionFunction {
public:
InputMethodPrivateGetInputMethodsFunction() {}
@@ -92,7 +91,7 @@
// Implements the inputMethodPrivate.fetchAllDictionaryWords method.
class InputMethodPrivateFetchAllDictionaryWordsFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
public:
InputMethodPrivateFetchAllDictionaryWordsFunction() {}
@@ -108,8 +107,7 @@
};
// Implements the inputMethodPrivate.addWordToDictionary method.
-class InputMethodPrivateAddWordToDictionaryFunction
- : public UIThreadExtensionFunction {
+class InputMethodPrivateAddWordToDictionaryFunction : public ExtensionFunction {
public:
InputMethodPrivateAddWordToDictionaryFunction() {}
@@ -126,7 +124,7 @@
// Implements the inputMethodPrivate.getEncryptSyncEnabled method.
class InputMethodPrivateGetEncryptSyncEnabledFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
public:
InputMethodPrivateGetEncryptSyncEnabledFunction() {}
@@ -142,8 +140,7 @@
};
// Implements the inputMethodPrivate.setXkbLayout method.
-class InputMethodPrivateSetXkbLayoutFunction
- : public UIThreadExtensionFunction {
+class InputMethodPrivateSetXkbLayoutFunction : public ExtensionFunction {
public:
InputMethodPrivateSetXkbLayoutFunction() {}
@@ -159,8 +156,7 @@
};
// Implements the inputMethodPrivate.showInputView method.
-class InputMethodPrivateShowInputViewFunction
- : public UIThreadExtensionFunction {
+class InputMethodPrivateShowInputViewFunction : public ExtensionFunction {
public:
InputMethodPrivateShowInputViewFunction() {}
@@ -176,8 +172,7 @@
};
// Implements the inputMethodPrivate.openOptionsPage method.
-class InputMethodPrivateOpenOptionsPageFunction
- : public UIThreadExtensionFunction {
+class InputMethodPrivateOpenOptionsPageFunction : public ExtensionFunction {
public:
InputMethodPrivateOpenOptionsPageFunction() {}
@@ -192,8 +187,7 @@
DISALLOW_COPY_AND_ASSIGN(InputMethodPrivateOpenOptionsPageFunction);
};
-class InputMethodPrivateGetSurroundingTextFunction
- : public UIThreadExtensionFunction {
+class InputMethodPrivateGetSurroundingTextFunction : public ExtensionFunction {
public:
InputMethodPrivateGetSurroundingTextFunction() {}
@@ -208,7 +202,7 @@
DISALLOW_COPY_AND_ASSIGN(InputMethodPrivateGetSurroundingTextFunction);
};
-class InputMethodPrivateGetSettingFunction : public UIThreadExtensionFunction {
+class InputMethodPrivateGetSettingFunction : public ExtensionFunction {
public:
InputMethodPrivateGetSettingFunction() = default;
@@ -224,7 +218,7 @@
DISALLOW_COPY_AND_ASSIGN(InputMethodPrivateGetSettingFunction);
};
-class InputMethodPrivateSetSettingFunction : public UIThreadExtensionFunction {
+class InputMethodPrivateSetSettingFunction : public ExtensionFunction {
public:
InputMethodPrivateSetSettingFunction() = default;
@@ -240,8 +234,7 @@
DISALLOW_COPY_AND_ASSIGN(InputMethodPrivateSetSettingFunction);
};
-class InputMethodPrivateSetCompositionRangeFunction
- : public UIThreadExtensionFunction {
+class InputMethodPrivateSetCompositionRangeFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("inputMethodPrivate.setCompositionRange",
INPUTMETHODPRIVATE_SETCOMPOSITIONRANGE)
@@ -249,7 +242,7 @@
protected:
~InputMethodPrivateSetCompositionRangeFunction() override {}
- // UIThreadExtensionFunction:
+ // ExtensionFunction:
ResponseAction Run() override;
};
diff --git a/chrome/browser/chromeos/extensions/launcher_search_provider.h b/chrome/browser/chromeos/extensions/launcher_search_provider.h
index 741d5aab6..40f0d09 100644
--- a/chrome/browser/chromeos/extensions/launcher_search_provider.h
+++ b/chrome/browser/chromeos/extensions/launcher_search_provider.h
@@ -11,7 +11,7 @@
// Implements chrome.launcherSearchProvider.setSearchResults method.
class LauncherSearchProviderSetSearchResultsFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("launcherSearchProvider.setSearchResults",
LAUNCHERSEARCHPROVIDER_SETSEARCHRESULTS)
diff --git a/chrome/browser/chromeos/extensions/login_screen/login/login_api.h b/chrome/browser/chromeos/extensions/login_screen/login/login_api.h
index 20ff168d..c0a65fd5 100644
--- a/chrome/browser/chromeos/extensions/login_screen/login/login_api.h
+++ b/chrome/browser/chromeos/extensions/login_screen/login/login_api.h
@@ -17,8 +17,7 @@
}
-class LoginLaunchManagedGuestSessionFunction
- : public UIThreadExtensionFunction {
+class LoginLaunchManagedGuestSessionFunction : public ExtensionFunction {
public:
LoginLaunchManagedGuestSessionFunction();
@@ -35,7 +34,7 @@
DISALLOW_COPY_AND_ASSIGN(LoginLaunchManagedGuestSessionFunction);
};
-class LoginExitCurrentSessionFunction : public UIThreadExtensionFunction {
+class LoginExitCurrentSessionFunction : public ExtensionFunction {
public:
LoginExitCurrentSessionFunction();
@@ -52,7 +51,7 @@
DISALLOW_COPY_AND_ASSIGN(LoginExitCurrentSessionFunction);
};
-class LoginIsRunningInLoginProfileFunction : public UIThreadExtensionFunction {
+class LoginIsRunningInLoginProfileFunction : public ExtensionFunction {
public:
LoginIsRunningInLoginProfileFunction();
@@ -69,8 +68,7 @@
DISALLOW_COPY_AND_ASSIGN(LoginIsRunningInLoginProfileFunction);
};
-class LoginFetchDataForNextLoginAttemptFunction
- : public UIThreadExtensionFunction {
+class LoginFetchDataForNextLoginAttemptFunction : public ExtensionFunction {
public:
LoginFetchDataForNextLoginAttemptFunction();
diff --git a/chrome/browser/chromeos/extensions/login_screen/login_screen_ui/login_screen_ui_api.h b/chrome/browser/chromeos/extensions/login_screen/login_screen_ui/login_screen_ui_api.h
index 5c9f342..8d5f2cb2 100644
--- a/chrome/browser/chromeos/extensions/login_screen/login_screen_ui/login_screen_ui_api.h
+++ b/chrome/browser/chromeos/extensions/login_screen/login_screen_ui/login_screen_ui_api.h
@@ -9,7 +9,7 @@
namespace extensions {
-class LoginScreenUiShowFunction : public UIThreadExtensionFunction {
+class LoginScreenUiShowFunction : public ExtensionFunction {
public:
LoginScreenUiShowFunction();
@@ -25,7 +25,7 @@
DISALLOW_COPY_AND_ASSIGN(LoginScreenUiShowFunction);
};
-class LoginScreenUiCloseFunction : public UIThreadExtensionFunction {
+class LoginScreenUiCloseFunction : public ExtensionFunction {
public:
LoginScreenUiCloseFunction();
diff --git a/chrome/browser/chromeos/extensions/quick_unlock_private/quick_unlock_private_api.h b/chrome/browser/chromeos/extensions/quick_unlock_private/quick_unlock_private_api.h
index 6df6964..a3e52426 100644
--- a/chrome/browser/chromeos/extensions/quick_unlock_private/quick_unlock_private_api.h
+++ b/chrome/browser/chromeos/extensions/quick_unlock_private/quick_unlock_private_api.h
@@ -22,7 +22,7 @@
namespace extensions {
class QuickUnlockPrivateGetAuthTokenFunction
- : public UIThreadExtensionFunction,
+ : public ExtensionFunction,
public chromeos::AuthStatusConsumer {
public:
using AuthenticatorAllocator =
@@ -67,7 +67,7 @@
};
class QuickUnlockPrivateSetLockScreenEnabledFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
public:
QuickUnlockPrivateSetLockScreenEnabledFunction();
DECLARE_EXTENSION_FUNCTION("quickUnlockPrivate.setLockScreenEnabled",
@@ -85,8 +85,7 @@
DISALLOW_COPY_AND_ASSIGN(QuickUnlockPrivateSetLockScreenEnabledFunction);
};
-class QuickUnlockPrivateGetAvailableModesFunction
- : public UIThreadExtensionFunction {
+class QuickUnlockPrivateGetAvailableModesFunction : public ExtensionFunction {
public:
QuickUnlockPrivateGetAvailableModesFunction();
DECLARE_EXTENSION_FUNCTION("quickUnlockPrivate.getAvailableModes",
@@ -104,8 +103,7 @@
DISALLOW_COPY_AND_ASSIGN(QuickUnlockPrivateGetAvailableModesFunction);
};
-class QuickUnlockPrivateGetActiveModesFunction
- : public UIThreadExtensionFunction {
+class QuickUnlockPrivateGetActiveModesFunction : public ExtensionFunction {
public:
QuickUnlockPrivateGetActiveModesFunction();
DECLARE_EXTENSION_FUNCTION("quickUnlockPrivate.getActiveModes",
@@ -126,8 +124,7 @@
DISALLOW_COPY_AND_ASSIGN(QuickUnlockPrivateGetActiveModesFunction);
};
-class QuickUnlockPrivateCheckCredentialFunction
- : public UIThreadExtensionFunction {
+class QuickUnlockPrivateCheckCredentialFunction : public ExtensionFunction {
public:
QuickUnlockPrivateCheckCredentialFunction();
DECLARE_EXTENSION_FUNCTION("quickUnlockPrivate.checkCredential",
@@ -144,7 +141,7 @@
};
class QuickUnlockPrivateGetCredentialRequirementsFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
public:
QuickUnlockPrivateGetCredentialRequirementsFunction();
DECLARE_EXTENSION_FUNCTION("quickUnlockPrivate.getCredentialRequirements",
@@ -160,7 +157,7 @@
DISALLOW_COPY_AND_ASSIGN(QuickUnlockPrivateGetCredentialRequirementsFunction);
};
-class QuickUnlockPrivateSetModesFunction : public UIThreadExtensionFunction {
+class QuickUnlockPrivateSetModesFunction : public ExtensionFunction {
public:
using QuickUnlockMode =
extensions::api::quick_unlock_private::QuickUnlockMode;
diff --git a/chrome/browser/chromeos/extensions/quick_unlock_private/quick_unlock_private_api_unittest.cc b/chrome/browser/chromeos/extensions/quick_unlock_private/quick_unlock_private_api_unittest.cc
index 9e90689..a9b6e5a 100644
--- a/chrome/browser/chromeos/extensions/quick_unlock_private/quick_unlock_private_api_unittest.cc
+++ b/chrome/browser/chromeos/extensions/quick_unlock_private/quick_unlock_private_api_unittest.cc
@@ -471,7 +471,7 @@
private:
// Runs the given |func| with the given |params|.
std::unique_ptr<base::Value> RunFunction(
- scoped_refptr<UIThreadExtensionFunction> func,
+ scoped_refptr<ExtensionFunction> func,
std::unique_ptr<base::ListValue> params) {
base::RunLoop().RunUntilIdle();
std::unique_ptr<base::Value> result =
@@ -485,7 +485,7 @@
// Runs |func| with |params|. Expects and returns an error result.
std::string RunFunctionAndReturnError(
- scoped_refptr<UIThreadExtensionFunction> func,
+ scoped_refptr<ExtensionFunction> func,
std::unique_ptr<base::ListValue> params) {
base::RunLoop().RunUntilIdle();
std::unique_ptr<ExtensionFunctionDispatcher> dispatcher(
diff --git a/chrome/browser/chromeos/extensions/users_private/users_private_api.h b/chrome/browser/chromeos/extensions/users_private/users_private_api.h
index c38bf86..eedf258 100644
--- a/chrome/browser/chromeos/extensions/users_private/users_private_api.h
+++ b/chrome/browser/chromeos/extensions/users_private/users_private_api.h
@@ -15,8 +15,7 @@
namespace extensions {
// Implements the chrome.usersPrivate.getWhitelistedUsers method.
-class UsersPrivateGetWhitelistedUsersFunction
- : public UIThreadExtensionFunction {
+class UsersPrivateGetWhitelistedUsersFunction : public ExtensionFunction {
public:
UsersPrivateGetWhitelistedUsersFunction();
DECLARE_EXTENSION_FUNCTION("usersPrivate.getWhitelistedUsers",
@@ -35,8 +34,7 @@
};
// Implements the chrome.usersPrivate.addWhitelistedUser method.
-class UsersPrivateAddWhitelistedUserFunction
- : public UIThreadExtensionFunction {
+class UsersPrivateAddWhitelistedUserFunction : public ExtensionFunction {
public:
UsersPrivateAddWhitelistedUserFunction();
DECLARE_EXTENSION_FUNCTION("usersPrivate.addWhitelistedUser",
@@ -45,7 +43,7 @@
protected:
~UsersPrivateAddWhitelistedUserFunction() override;
- // UIThreadExtensionFunction overrides.
+ // ExtensionFunction overrides.
ResponseAction Run() override;
private:
@@ -55,8 +53,7 @@
};
// Implements the chrome.usersPrivate.removeWhitelistedUser method.
-class UsersPrivateRemoveWhitelistedUserFunction
- : public UIThreadExtensionFunction {
+class UsersPrivateRemoveWhitelistedUserFunction : public ExtensionFunction {
public:
UsersPrivateRemoveWhitelistedUserFunction();
DECLARE_EXTENSION_FUNCTION("usersPrivate.removeWhitelistedUser",
@@ -75,8 +72,7 @@
};
// Implements the chrome.usersPrivate.isWhitelistManaged method.
-class UsersPrivateIsWhitelistManagedFunction
- : public UIThreadExtensionFunction {
+class UsersPrivateIsWhitelistManagedFunction : public ExtensionFunction {
public:
UsersPrivateIsWhitelistManagedFunction();
DECLARE_EXTENSION_FUNCTION("usersPrivate.isWhitelistManaged",
@@ -93,7 +89,7 @@
};
// Implements the chrome.usersPrivate.getCurrentUser method.
-class UsersPrivateGetCurrentUserFunction : public UIThreadExtensionFunction {
+class UsersPrivateGetCurrentUserFunction : public ExtensionFunction {
public:
UsersPrivateGetCurrentUserFunction();
DECLARE_EXTENSION_FUNCTION("usersPrivate.getCurrentUser",
@@ -110,7 +106,7 @@
DISALLOW_COPY_AND_ASSIGN(UsersPrivateGetCurrentUserFunction);
};
-class UsersPrivateGetLoginStatusFunction : public UIThreadExtensionFunction {
+class UsersPrivateGetLoginStatusFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("usersPrivate.getLoginStatus",
USERSPRIVATE_GETLOGINSTATUS)
diff --git a/chrome/browser/chromeos/extensions/wallpaper_api.h b/chrome/browser/chromeos/extensions/wallpaper_api.h
index 8a4f75b..adfd7f9 100644
--- a/chrome/browser/chromeos/extensions/wallpaper_api.h
+++ b/chrome/browser/chromeos/extensions/wallpaper_api.h
@@ -30,7 +30,7 @@
protected:
~WallpaperSetWallpaperFunction() override;
- // UIThreadExtensionFunction overrides.
+ // ExtensionFunction overrides.
ResponseAction Run() override;
private:
diff --git a/chrome/browser/chromeos/extensions/wallpaper_function_base.h b/chrome/browser/chromeos/extensions/wallpaper_function_base.h
index c739a9b..13b30d3 100644
--- a/chrome/browser/chromeos/extensions/wallpaper_function_base.h
+++ b/chrome/browser/chromeos/extensions/wallpaper_function_base.h
@@ -33,7 +33,7 @@
// Wallpaper manager function base. It contains a image decoder to decode
// wallpaper data.
-class WallpaperFunctionBase : public UIThreadExtensionFunction {
+class WallpaperFunctionBase : public ExtensionFunction {
public:
static const int kWallpaperThumbnailWidth;
static const int kWallpaperThumbnailHeight;
diff --git a/chrome/browser/chromeos/extensions/wallpaper_private_api.h b/chrome/browser/chromeos/extensions/wallpaper_private_api.h
index e8cfe3c..8696c8f0e 100644
--- a/chrome/browser/chromeos/extensions/wallpaper_private_api.h
+++ b/chrome/browser/chromeos/extensions/wallpaper_private_api.h
@@ -26,7 +26,7 @@
} // namespace backdrop_wallpaper_handlers
// Wallpaper manager strings.
-class WallpaperPrivateGetStringsFunction : public UIThreadExtensionFunction {
+class WallpaperPrivateGetStringsFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("wallpaperPrivate.getStrings",
WALLPAPERPRIVATE_GETSTRINGS)
@@ -39,8 +39,7 @@
};
// Check if sync themes setting is enabled.
-class WallpaperPrivateGetSyncSettingFunction
- : public UIThreadExtensionFunction {
+class WallpaperPrivateGetSyncSettingFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("wallpaperPrivate.getSyncSetting",
WALLPAPERPRIVATE_GETSYNCSETTING)
@@ -60,8 +59,7 @@
int retry_number_ = 0;
};
-class WallpaperPrivateSetWallpaperIfExistsFunction
- : public UIThreadExtensionFunction {
+class WallpaperPrivateSetWallpaperIfExistsFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("wallpaperPrivate.setWallpaperIfExists",
WALLPAPERPRIVATE_SETWALLPAPERIFEXISTS)
@@ -71,7 +69,7 @@
protected:
~WallpaperPrivateSetWallpaperIfExistsFunction() override;
- // UIThreadExtensionFunction overrides.
+ // ExtensionFunction overrides.
ResponseAction Run() override;
private:
@@ -81,7 +79,7 @@
DISALLOW_COPY_AND_ASSIGN(WallpaperPrivateSetWallpaperIfExistsFunction);
};
-class WallpaperPrivateSetWallpaperFunction : public UIThreadExtensionFunction {
+class WallpaperPrivateSetWallpaperFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("wallpaperPrivate.setWallpaper",
WALLPAPERPRIVATE_SETWALLPAPER)
@@ -91,7 +89,7 @@
protected:
~WallpaperPrivateSetWallpaperFunction() override;
- // UIThreadExtensionFunction overrides.
+ // ExtensionFunction overrides.
ResponseAction Run() override;
private:
@@ -101,8 +99,7 @@
DISALLOW_COPY_AND_ASSIGN(WallpaperPrivateSetWallpaperFunction);
};
-class WallpaperPrivateResetWallpaperFunction
- : public UIThreadExtensionFunction {
+class WallpaperPrivateResetWallpaperFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("wallpaperPrivate.resetWallpaper",
WALLPAPERPRIVATE_RESETWALLPAPER)
@@ -112,7 +109,7 @@
protected:
~WallpaperPrivateResetWallpaperFunction() override;
- // UIThreadExtensionFunction overrides.
+ // ExtensionFunction overrides.
ResponseAction Run() override;
};
@@ -127,7 +124,7 @@
protected:
~WallpaperPrivateSetCustomWallpaperFunction() override;
- // UIThreadExtensionFunction overrides.
+ // ExtensionFunction overrides.
ResponseAction Run() override;
private:
@@ -145,7 +142,7 @@
};
class WallpaperPrivateSetCustomWallpaperLayoutFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("wallpaperPrivate.setCustomWallpaperLayout",
WALLPAPERPRIVATE_SETCUSTOMWALLPAPERLAYOUT)
@@ -155,12 +152,12 @@
protected:
~WallpaperPrivateSetCustomWallpaperLayoutFunction() override;
- // UIThreadExtensionFunction overrides.
+ // ExtensionFunction overrides.
ResponseAction Run() override;
};
class WallpaperPrivateMinimizeInactiveWindowsFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("wallpaperPrivate.minimizeInactiveWindows",
WALLPAPERPRIVATE_MINIMIZEINACTIVEWINDOWS)
@@ -173,7 +170,7 @@
};
class WallpaperPrivateRestoreMinimizedWindowsFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("wallpaperPrivate.restoreMinimizedWindows",
WALLPAPERPRIVATE_RESTOREMINIMIZEDWINDOWS)
@@ -185,7 +182,7 @@
ResponseAction Run() override;
};
-class WallpaperPrivateGetThumbnailFunction : public UIThreadExtensionFunction {
+class WallpaperPrivateGetThumbnailFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("wallpaperPrivate.getThumbnail",
WALLPAPERPRIVATE_GETTHUMBNAIL)
@@ -195,7 +192,7 @@
protected:
~WallpaperPrivateGetThumbnailFunction() override;
- // UIThreadExtensionFunction overrides.
+ // ExtensionFunction overrides.
ResponseAction Run() override;
private:
@@ -214,7 +211,7 @@
void Get(const base::FilePath& path);
};
-class WallpaperPrivateSaveThumbnailFunction : public UIThreadExtensionFunction {
+class WallpaperPrivateSaveThumbnailFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("wallpaperPrivate.saveThumbnail",
WALLPAPERPRIVATE_SAVETHUMBNAIL)
@@ -224,7 +221,7 @@
protected:
~WallpaperPrivateSaveThumbnailFunction() override;
- // UIThreadExtensionFunction overrides.
+ // ExtensionFunction overrides.
ResponseAction Run() override;
private:
@@ -239,7 +236,7 @@
};
class WallpaperPrivateGetOfflineWallpaperListFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("wallpaperPrivate.getOfflineWallpaperList",
WALLPAPERPRIVATE_GETOFFLINEWALLPAPERLIST)
@@ -248,7 +245,7 @@
protected:
~WallpaperPrivateGetOfflineWallpaperListFunction() override;
- // UIThreadExtensionFunction overrides.
+ // ExtensionFunction overrides.
ResponseAction Run() override;
private:
@@ -260,8 +257,7 @@
// The wallpaper UMA is recorded when a new wallpaper is set, either by the
// built-in Wallpaper Picker App, or by a third party App.
-class WallpaperPrivateRecordWallpaperUMAFunction
- : public UIThreadExtensionFunction {
+class WallpaperPrivateRecordWallpaperUMAFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("wallpaperPrivate.recordWallpaperUMA",
WALLPAPERPRIVATE_RECORDWALLPAPERUMA)
@@ -273,8 +269,7 @@
ResponseAction Run() override;
};
-class WallpaperPrivateGetCollectionsInfoFunction
- : public UIThreadExtensionFunction {
+class WallpaperPrivateGetCollectionsInfoFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("wallpaperPrivate.getCollectionsInfo",
WALLPAPERPRIVATE_GETCOLLECTIONSINFO)
@@ -283,7 +278,7 @@
protected:
~WallpaperPrivateGetCollectionsInfoFunction() override;
- // UIThreadExtensionFunction:
+ // ExtensionFunction:
ResponseAction Run() override;
private:
@@ -299,7 +294,7 @@
DISALLOW_COPY_AND_ASSIGN(WallpaperPrivateGetCollectionsInfoFunction);
};
-class WallpaperPrivateGetImagesInfoFunction : public UIThreadExtensionFunction {
+class WallpaperPrivateGetImagesInfoFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("wallpaperPrivate.getImagesInfo",
WALLPAPERPRIVATE_GETIMAGESINFO)
@@ -308,7 +303,7 @@
protected:
~WallpaperPrivateGetImagesInfoFunction() override;
- // UIThreadExtensionFunction:
+ // ExtensionFunction:
ResponseAction Run() override;
private:
@@ -324,8 +319,7 @@
DISALLOW_COPY_AND_ASSIGN(WallpaperPrivateGetImagesInfoFunction);
};
-class WallpaperPrivateGetLocalImagePathsFunction
- : public UIThreadExtensionFunction {
+class WallpaperPrivateGetLocalImagePathsFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("wallpaperPrivate.getLocalImagePaths",
WALLPAPERPRIVATE_GETLOCALIMAGEPATHS)
@@ -334,7 +328,7 @@
protected:
~WallpaperPrivateGetLocalImagePathsFunction() override;
- // UIThreadExtensionFunction:
+ // ExtensionFunction:
ResponseAction Run() override;
private:
@@ -344,8 +338,7 @@
DISALLOW_COPY_AND_ASSIGN(WallpaperPrivateGetLocalImagePathsFunction);
};
-class WallpaperPrivateGetLocalImageDataFunction
- : public UIThreadExtensionFunction {
+class WallpaperPrivateGetLocalImageDataFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("wallpaperPrivate.getLocalImageData",
WALLPAPERPRIVATE_GETLOCALIMAGEDATA)
@@ -354,7 +347,7 @@
protected:
~WallpaperPrivateGetLocalImageDataFunction() override;
- // UIThreadExtensionFunction:
+ // ExtensionFunction:
ResponseAction Run() override;
private:
@@ -366,7 +359,7 @@
};
class WallpaperPrivateConfirmPreviewWallpaperFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("wallpaperPrivate.confirmPreviewWallpaper",
WALLPAPERPRIVATE_CONFIRMPREVIEWWALLPAPER)
@@ -375,7 +368,7 @@
protected:
~WallpaperPrivateConfirmPreviewWallpaperFunction() override;
- // UIThreadExtensionFunction:
+ // ExtensionFunction:
ResponseAction Run() override;
private:
@@ -383,7 +376,7 @@
};
class WallpaperPrivateCancelPreviewWallpaperFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("wallpaperPrivate.cancelPreviewWallpaper",
WALLPAPERPRIVATE_CANCELPREVIEWWALLPAPER)
@@ -392,7 +385,7 @@
protected:
~WallpaperPrivateCancelPreviewWallpaperFunction() override;
- // UIThreadExtensionFunction:
+ // ExtensionFunction:
ResponseAction Run() override;
private:
@@ -409,7 +402,7 @@
protected:
~WallpaperPrivateGetCurrentWallpaperThumbnailFunction() override;
- // UIThreadExtensionFunction:
+ // ExtensionFunction:
ResponseAction Run() override;
private:
@@ -420,8 +413,7 @@
WallpaperPrivateGetCurrentWallpaperThumbnailFunction);
};
-class WallpaperPrivateGetSurpriseMeImageFunction
- : public UIThreadExtensionFunction {
+class WallpaperPrivateGetSurpriseMeImageFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("wallpaperPrivate.getSurpriseMeImage",
WALLPAPERPRIVATE_GETSURPRISEMEIMAGE)
@@ -430,7 +422,7 @@
protected:
~WallpaperPrivateGetSurpriseMeImageFunction() override;
- // UIThreadExtensionFunction:
+ // ExtensionFunction:
ResponseAction Run() override;
private:
diff --git a/chrome/browser/extensions/api/activity_log_private/activity_log_private_api.h b/chrome/browser/extensions/api/activity_log_private/activity_log_private_api.h
index d900d64..afee1976 100644
--- a/chrome/browser/extensions/api/activity_log_private/activity_log_private_api.h
+++ b/chrome/browser/extensions/api/activity_log_private/activity_log_private_api.h
@@ -82,8 +82,7 @@
};
// The implementation of activityLogPrivate.deleteActivities
-class ActivityLogPrivateDeleteActivitiesFunction
- : public UIThreadExtensionFunction {
+class ActivityLogPrivateDeleteActivitiesFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("activityLogPrivate.deleteActivities",
ACTIVITYLOGPRIVATE_DELETEACTIVITIES)
@@ -97,7 +96,7 @@
// The implementation of activityLogPrivate.deleteActivitiesByExtension
class ActivityLogPrivateDeleteActivitiesByExtensionFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("activityLogPrivate.deleteActivitiesByExtension",
ACTIVITYLOGPRIVATE_DELETEACTIVITIESBYEXTENSION)
@@ -110,8 +109,7 @@
};
// The implementation of activityLogPrivate.deleteDatabase
-class ActivityLogPrivateDeleteDatabaseFunction
- : public UIThreadExtensionFunction {
+class ActivityLogPrivateDeleteDatabaseFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("activityLogPrivate.deleteDatabase",
ACTIVITYLOGPRIVATE_DELETEDATABASE)
@@ -124,7 +122,7 @@
};
// The implementation of activityLogPrivate.deleteUrls
-class ActivityLogPrivateDeleteUrlsFunction : public UIThreadExtensionFunction {
+class ActivityLogPrivateDeleteUrlsFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("activityLogPrivate.deleteUrls",
ACTIVITYLOGPRIVATE_DELETEURLS)
diff --git a/chrome/browser/extensions/api/autofill_private/autofill_private_api.h b/chrome/browser/extensions/api/autofill_private/autofill_private_api.h
index 20a4924..5b42cd4 100644
--- a/chrome/browser/extensions/api/autofill_private/autofill_private_api.h
+++ b/chrome/browser/extensions/api/autofill_private/autofill_private_api.h
@@ -13,7 +13,7 @@
namespace extensions {
-class AutofillPrivateSaveAddressFunction : public UIThreadExtensionFunction {
+class AutofillPrivateSaveAddressFunction : public ExtensionFunction {
public:
AutofillPrivateSaveAddressFunction();
DECLARE_EXTENSION_FUNCTION("autofillPrivate.saveAddress",
@@ -31,7 +31,7 @@
DISALLOW_COPY_AND_ASSIGN(AutofillPrivateSaveAddressFunction);
};
-class AutofillPrivateGetCountryListFunction : public UIThreadExtensionFunction {
+class AutofillPrivateGetCountryListFunction : public ExtensionFunction {
public:
AutofillPrivateGetCountryListFunction();
DECLARE_EXTENSION_FUNCTION("autofillPrivate.getCountryList",
@@ -49,8 +49,7 @@
DISALLOW_COPY_AND_ASSIGN(AutofillPrivateGetCountryListFunction);
};
-class AutofillPrivateGetAddressComponentsFunction :
- public UIThreadExtensionFunction {
+class AutofillPrivateGetAddressComponentsFunction : public ExtensionFunction {
public:
AutofillPrivateGetAddressComponentsFunction() {}
DECLARE_EXTENSION_FUNCTION("autofillPrivate.getAddressComponents",
@@ -66,7 +65,7 @@
DISALLOW_COPY_AND_ASSIGN(AutofillPrivateGetAddressComponentsFunction);
};
-class AutofillPrivateGetAddressListFunction : public UIThreadExtensionFunction {
+class AutofillPrivateGetAddressListFunction : public ExtensionFunction {
public:
AutofillPrivateGetAddressListFunction();
DECLARE_EXTENSION_FUNCTION("autofillPrivate.getAddressList",
@@ -84,7 +83,7 @@
DISALLOW_COPY_AND_ASSIGN(AutofillPrivateGetAddressListFunction);
};
-class AutofillPrivateSaveCreditCardFunction : public UIThreadExtensionFunction {
+class AutofillPrivateSaveCreditCardFunction : public ExtensionFunction {
public:
AutofillPrivateSaveCreditCardFunction();
DECLARE_EXTENSION_FUNCTION("autofillPrivate.saveCreditCard",
@@ -102,7 +101,7 @@
DISALLOW_COPY_AND_ASSIGN(AutofillPrivateSaveCreditCardFunction);
};
-class AutofillPrivateRemoveEntryFunction : public UIThreadExtensionFunction {
+class AutofillPrivateRemoveEntryFunction : public ExtensionFunction {
public:
AutofillPrivateRemoveEntryFunction();
DECLARE_EXTENSION_FUNCTION("autofillPrivate.removeEntry",
@@ -120,8 +119,7 @@
DISALLOW_COPY_AND_ASSIGN(AutofillPrivateRemoveEntryFunction);
};
-class AutofillPrivateValidatePhoneNumbersFunction :
- public UIThreadExtensionFunction {
+class AutofillPrivateValidatePhoneNumbersFunction : public ExtensionFunction {
public:
AutofillPrivateValidatePhoneNumbersFunction() {}
DECLARE_EXTENSION_FUNCTION("autofillPrivate.validatePhoneNumbers",
@@ -137,7 +135,7 @@
DISALLOW_COPY_AND_ASSIGN(AutofillPrivateValidatePhoneNumbersFunction);
};
-class AutofillPrivateMaskCreditCardFunction : public UIThreadExtensionFunction {
+class AutofillPrivateMaskCreditCardFunction : public ExtensionFunction {
public:
AutofillPrivateMaskCreditCardFunction();
DECLARE_EXTENSION_FUNCTION("autofillPrivate.maskCreditCard",
@@ -155,8 +153,7 @@
DISALLOW_COPY_AND_ASSIGN(AutofillPrivateMaskCreditCardFunction);
};
-class AutofillPrivateGetCreditCardListFunction
- : public UIThreadExtensionFunction {
+class AutofillPrivateGetCreditCardListFunction : public ExtensionFunction {
public:
AutofillPrivateGetCreditCardListFunction();
DECLARE_EXTENSION_FUNCTION("autofillPrivate.getCreditCardList",
@@ -174,8 +171,7 @@
DISALLOW_COPY_AND_ASSIGN(AutofillPrivateGetCreditCardListFunction);
};
-class AutofillPrivateMigrateCreditCardsFunction
- : public UIThreadExtensionFunction {
+class AutofillPrivateMigrateCreditCardsFunction : public ExtensionFunction {
public:
AutofillPrivateMigrateCreditCardsFunction();
DECLARE_EXTENSION_FUNCTION("autofillPrivate.migrateCreditCards",
@@ -194,7 +190,7 @@
};
class AutofillPrivateLogServerCardLinkClickedFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
public:
AutofillPrivateLogServerCardLinkClickedFunction();
DECLARE_EXTENSION_FUNCTION("autofillPrivate.logServerCardLinkClicked",
diff --git a/chrome/browser/extensions/api/automation_internal/chrome_automation_internal_api_delegate.cc b/chrome/browser/extensions/api/automation_internal/chrome_automation_internal_api_delegate.cc
index ea3db0a..f233313 100644
--- a/chrome/browser/extensions/api/automation_internal/chrome_automation_internal_api_delegate.cc
+++ b/chrome/browser/extensions/api/automation_internal/chrome_automation_internal_api_delegate.cc
@@ -66,7 +66,7 @@
}
content::WebContents* ChromeAutomationInternalApiDelegate::GetActiveWebContents(
- UIThreadExtensionFunction* function) {
+ ExtensionFunction* function) {
return ChromeExtensionFunctionDetails(function)
.GetCurrentBrowser()
->tab_strip_model()
diff --git a/chrome/browser/extensions/api/automation_internal/chrome_automation_internal_api_delegate.h b/chrome/browser/extensions/api/automation_internal/chrome_automation_internal_api_delegate.h
index 474b575d..f2bdc73 100644
--- a/chrome/browser/extensions/api/automation_internal/chrome_automation_internal_api_delegate.h
+++ b/chrome/browser/extensions/api/automation_internal/chrome_automation_internal_api_delegate.h
@@ -26,7 +26,7 @@
std::string* error_msg) override;
int GetTabId(content::WebContents* contents) override;
content::WebContents* GetActiveWebContents(
- UIThreadExtensionFunction* function) override;
+ ExtensionFunction* function) override;
void EnableDesktop() override;
ui::AXTreeID GetAXTreeID() override;
void SetEventBundleSink(ui::AXEventBundleSink* sink) override;
diff --git a/chrome/browser/extensions/api/braille_display_private/braille_display_private_api.h b/chrome/browser/extensions/api/braille_display_private/braille_display_private_api.h
index d6a88e0..2684e50 100644
--- a/chrome/browser/extensions/api/braille_display_private/braille_display_private_api.h
+++ b/chrome/browser/extensions/api/braille_display_private/braille_display_private_api.h
@@ -107,7 +107,7 @@
};
class BrailleDisplayPrivateUpdateBluetoothBrailleDisplayAddressFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
~BrailleDisplayPrivateUpdateBluetoothBrailleDisplayAddressFunction()
override {}
ResponseAction Run() override;
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 d5a9a0c..2a588cf 100644
--- a/chrome/browser/extensions/api/browsing_data/browsing_data_api.h
+++ b/chrome/browser/extensions/api/browsing_data/browsing_data_api.h
@@ -61,7 +61,7 @@
} // namespace extension_browsing_data_api_constants
-class BrowsingDataSettingsFunction : public UIThreadExtensionFunction {
+class BrowsingDataSettingsFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("browsingData.settings", BROWSINGDATA_SETTINGS)
diff --git a/chrome/browser/extensions/api/certificate_provider/certificate_provider_api.h b/chrome/browser/extensions/api/certificate_provider/certificate_provider_api.h
index 67b8ee0..b61e947 100644
--- a/chrome/browser/extensions/api/certificate_provider/certificate_provider_api.h
+++ b/chrome/browser/extensions/api/certificate_provider/certificate_provider_api.h
@@ -28,9 +28,9 @@
}
class CertificateProviderInternalReportCertificatesFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
private:
- // UIThreadExtensionFunction:
+ // ExtensionFunction:
~CertificateProviderInternalReportCertificatesFunction() override;
ResponseAction Run() override;
@@ -43,9 +43,9 @@
};
class CertificateProviderInternalReportSignatureFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
private:
- // UIThreadExtensionFunction:
+ // ExtensionFunction:
~CertificateProviderInternalReportSignatureFunction() override;
ResponseAction Run() override;
@@ -53,9 +53,9 @@
CERTIFICATEPROVIDERINTERNAL_REPORTSIGNATURE)
};
-class CertificateProviderRequestPinFunction : public UIThreadExtensionFunction {
+class CertificateProviderRequestPinFunction : public ExtensionFunction {
private:
- // UIThreadExtensionFunction:
+ // ExtensionFunction:
~CertificateProviderRequestPinFunction() override;
ResponseAction Run() override;
bool ShouldSkipQuotaLimiting() const override;
@@ -68,10 +68,9 @@
CERTIFICATEPROVIDER_REQUESTPIN)
};
-class CertificateProviderStopPinRequestFunction
- : public UIThreadExtensionFunction {
+class CertificateProviderStopPinRequestFunction : public ExtensionFunction {
private:
- // UIThreadExtensionFunction:
+ // ExtensionFunction:
~CertificateProviderStopPinRequestFunction() override;
ResponseAction Run() override;
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 eb7494ec..35900ac 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
@@ -48,8 +48,7 @@
virtual std::vector<std::string> GetPrinters() = 0;
};
-class CloudPrintPrivateSetupConnectorFunction
- : public UIThreadExtensionFunction {
+class CloudPrintPrivateSetupConnectorFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("cloudPrintPrivate.setupConnector",
CLOUDPRINTPRIVATE_SETUPCONNECTOR)
@@ -63,7 +62,7 @@
ResponseAction Run() override;
};
-class CloudPrintPrivateGetHostNameFunction : public UIThreadExtensionFunction {
+class CloudPrintPrivateGetHostNameFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("cloudPrintPrivate.getHostName",
CLOUDPRINTPRIVATE_GETHOSTNAME)
@@ -77,7 +76,7 @@
ResponseAction Run() override;
};
-class CloudPrintPrivateGetPrintersFunction : public UIThreadExtensionFunction {
+class CloudPrintPrivateGetPrintersFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("cloudPrintPrivate.getPrinters",
CLOUDPRINTPRIVATE_GETPRINTERS)
@@ -94,7 +93,7 @@
ResponseAction Run() override;
};
-class CloudPrintPrivateGetClientIdFunction : public UIThreadExtensionFunction {
+class CloudPrintPrivateGetClientIdFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("cloudPrintPrivate.getClientId",
CLOUDPRINTPRIVATE_GETCLIENTID)
diff --git a/chrome/browser/extensions/api/command_line_private/command_line_private_api.h b/chrome/browser/extensions/api/command_line_private/command_line_private_api.h
index 4ab0dd1..56841a47 100644
--- a/chrome/browser/extensions/api/command_line_private/command_line_private_api.h
+++ b/chrome/browser/extensions/api/command_line_private/command_line_private_api.h
@@ -9,7 +9,7 @@
namespace extensions {
-class CommandLinePrivateHasSwitchFunction : public UIThreadExtensionFunction {
+class CommandLinePrivateHasSwitchFunction : public ExtensionFunction {
DECLARE_EXTENSION_FUNCTION("commandLinePrivate.hasSwitch",
COMMANDLINEPRIVATE_HASSWITCH)
protected:
diff --git a/chrome/browser/extensions/api/commands/commands.h b/chrome/browser/extensions/api/commands/commands.h
index 16b940f..433bdd1 100644
--- a/chrome/browser/extensions/api/commands/commands.h
+++ b/chrome/browser/extensions/api/commands/commands.h
@@ -7,7 +7,7 @@
#include "extensions/browser/extension_function.h"
-class GetAllCommandsFunction : public UIThreadExtensionFunction {
+class GetAllCommandsFunction : public ExtensionFunction {
~GetAllCommandsFunction() override {}
ResponseAction Run() override;
DECLARE_EXTENSION_FUNCTION("commands.getAll", COMMANDS_GETALL)
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 fa0fb0c..be5d320 100644
--- a/chrome/browser/extensions/api/content_settings/content_settings_api.h
+++ b/chrome/browser/extensions/api/content_settings/content_settings_api.h
@@ -14,8 +14,7 @@
namespace extensions {
-class ContentSettingsContentSettingClearFunction
- : public UIThreadExtensionFunction {
+class ContentSettingsContentSettingClearFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("contentSettings.clear", CONTENTSETTINGS_CLEAR)
@@ -26,8 +25,7 @@
ResponseAction Run() override;
};
-class ContentSettingsContentSettingGetFunction
- : public UIThreadExtensionFunction {
+class ContentSettingsContentSettingGetFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("contentSettings.get", CONTENTSETTINGS_GET)
@@ -38,8 +36,7 @@
ResponseAction Run() override;
};
-class ContentSettingsContentSettingSetFunction
- : public UIThreadExtensionFunction {
+class ContentSettingsContentSettingSetFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("contentSettings.set", CONTENTSETTINGS_SET)
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 78e00b7..4dc9f201 100644
--- a/chrome/browser/extensions/api/context_menus/context_menus_api.h
+++ b/chrome/browser/extensions/api/context_menus/context_menus_api.h
@@ -9,7 +9,7 @@
namespace extensions {
-class ContextMenusCreateFunction : public UIThreadExtensionFunction {
+class ContextMenusCreateFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("contextMenus.create", CONTEXTMENUS_CREATE)
@@ -20,7 +20,7 @@
ResponseAction Run() override;
};
-class ContextMenusUpdateFunction : public UIThreadExtensionFunction {
+class ContextMenusUpdateFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("contextMenus.update", CONTEXTMENUS_UPDATE)
@@ -31,7 +31,7 @@
ResponseAction Run() override;
};
-class ContextMenusRemoveFunction : public UIThreadExtensionFunction {
+class ContextMenusRemoveFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("contextMenus.remove", CONTEXTMENUS_REMOVE)
@@ -42,7 +42,7 @@
ResponseAction Run() override;
};
-class ContextMenusRemoveAllFunction : public UIThreadExtensionFunction {
+class ContextMenusRemoveAllFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("contextMenus.removeAll", CONTEXTMENUS_REMOVEALL)
diff --git a/chrome/browser/extensions/api/cookies/cookies_api.h b/chrome/browser/extensions/api/cookies/cookies_api.h
index fbd37d6..1ac9de5 100644
--- a/chrome/browser/extensions/api/cookies/cookies_api.h
+++ b/chrome/browser/extensions/api/cookies/cookies_api.h
@@ -91,7 +91,7 @@
};
// Implements the cookies.get() extension function.
-class CookiesGetFunction : public UIThreadExtensionFunction {
+class CookiesGetFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("cookies.get", COOKIES_GET)
@@ -113,7 +113,7 @@
};
// Implements the cookies.getAll() extension function.
-class CookiesGetAllFunction : public UIThreadExtensionFunction {
+class CookiesGetAllFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("cookies.getAll", COOKIES_GETALL)
@@ -135,7 +135,7 @@
};
// Implements the cookies.set() extension function.
-class CookiesSetFunction : public UIThreadExtensionFunction {
+class CookiesSetFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("cookies.set", COOKIES_SET)
@@ -159,7 +159,7 @@
};
// Implements the cookies.remove() extension function.
-class CookiesRemoveFunction : public UIThreadExtensionFunction {
+class CookiesRemoveFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("cookies.remove", COOKIES_REMOVE)
@@ -180,7 +180,7 @@
};
// Implements the cookies.getAllCookieStores() extension function.
-class CookiesGetAllCookieStoresFunction : public UIThreadExtensionFunction {
+class CookiesGetAllCookieStoresFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("cookies.getAllCookieStores",
COOKIES_GETALLCOOKIESTORES)
diff --git a/chrome/browser/extensions/api/cryptotoken_private/cryptotoken_private_api.h b/chrome/browser/extensions/api/cryptotoken_private/cryptotoken_private_api.h
index 7c92493..9ac938c8 100644
--- a/chrome/browser/extensions/api/cryptotoken_private/cryptotoken_private_api.h
+++ b/chrome/browser/extensions/api/cryptotoken_private/cryptotoken_private_api.h
@@ -27,18 +27,18 @@
user_prefs::PrefRegistrySyncable* registry);
class CryptotokenPrivateCanOriginAssertAppIdFunction
- : public UIThreadExtensionFunction {
- public:
- CryptotokenPrivateCanOriginAssertAppIdFunction();
- DECLARE_EXTENSION_FUNCTION("cryptotokenPrivate.canOriginAssertAppId",
- CRYPTOTOKENPRIVATE_CANORIGINASSERTAPPID)
- protected:
- ~CryptotokenPrivateCanOriginAssertAppIdFunction() override {}
- ResponseAction Run() override;
+ : public ExtensionFunction {
+ public:
+ CryptotokenPrivateCanOriginAssertAppIdFunction();
+ DECLARE_EXTENSION_FUNCTION("cryptotokenPrivate.canOriginAssertAppId",
+ CRYPTOTOKENPRIVATE_CANORIGINASSERTAPPID)
+ protected:
+ ~CryptotokenPrivateCanOriginAssertAppIdFunction() override {}
+ ResponseAction Run() override;
};
class CryptotokenPrivateIsAppIdHashInEnterpriseContextFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
public:
CryptotokenPrivateIsAppIdHashInEnterpriseContextFunction();
DECLARE_EXTENSION_FUNCTION(
@@ -51,7 +51,7 @@
};
class CryptotokenPrivateCanAppIdGetAttestationFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
public:
CryptotokenPrivateCanAppIdGetAttestationFunction();
DECLARE_EXTENSION_FUNCTION("cryptotokenPrivate.canAppIdGetAttestation",
diff --git a/chrome/browser/extensions/api/cryptotoken_private/cryptotoken_private_api_unittest.cc b/chrome/browser/extensions/api/cryptotoken_private/cryptotoken_private_api_unittest.cc
index 0500f7e..4ed224a 100644
--- a/chrome/browser/extensions/api/cryptotoken_private/cryptotoken_private_api_unittest.cc
+++ b/chrome/browser/extensions/api/cryptotoken_private/cryptotoken_private_api_unittest.cc
@@ -31,7 +31,7 @@
using namespace api::cryptotoken_private;
-bool GetSingleBooleanResult(UIThreadExtensionFunction* function, bool* result) {
+bool GetSingleBooleanResult(ExtensionFunction* function, bool* result) {
const base::ListValue* result_list = function->GetResultList();
if (!result_list) {
ADD_FAILURE() << "Function has no result list.";
diff --git a/chrome/browser/extensions/api/dashboard_private/dashboard_private_api.h b/chrome/browser/extensions/api/dashboard_private/dashboard_private_api.h
index 66697ef..93a75ad 100644
--- a/chrome/browser/extensions/api/dashboard_private/dashboard_private_api.h
+++ b/chrome/browser/extensions/api/dashboard_private/dashboard_private_api.h
@@ -23,7 +23,7 @@
class Extension;
class DashboardPrivateShowPermissionPromptForDelegatedInstallFunction
- : public UIThreadExtensionFunction,
+ : public ExtensionFunction,
public WebstoreInstallHelper::Delegate {
public:
DECLARE_EXTENSION_FUNCTION(
diff --git a/chrome/browser/extensions/api/data_reduction_proxy/data_reduction_proxy_api.h b/chrome/browser/extensions/api/data_reduction_proxy/data_reduction_proxy_api.h
index 8af53d7..0730691 100644
--- a/chrome/browser/extensions/api/data_reduction_proxy/data_reduction_proxy_api.h
+++ b/chrome/browser/extensions/api/data_reduction_proxy/data_reduction_proxy_api.h
@@ -15,8 +15,7 @@
namespace extensions {
-class DataReductionProxyClearDataSavingsFunction
- : public UIThreadExtensionFunction {
+class DataReductionProxyClearDataSavingsFunction : public ExtensionFunction {
private:
~DataReductionProxyClearDataSavingsFunction() override {}
@@ -26,8 +25,7 @@
ResponseAction Run() override;
};
-class DataReductionProxyGetDataUsageFunction
- : public UIThreadExtensionFunction {
+class DataReductionProxyGetDataUsageFunction : public ExtensionFunction {
private:
~DataReductionProxyGetDataUsageFunction() override {}
diff --git a/chrome/browser/extensions/api/desktop_capture/desktop_capture_base.h b/chrome/browser/extensions/api/desktop_capture/desktop_capture_base.h
index 595a331..798348f 100644
--- a/chrome/browser/extensions/api/desktop_capture/desktop_capture_base.h
+++ b/chrome/browser/extensions/api/desktop_capture/desktop_capture_base.h
@@ -67,7 +67,7 @@
};
class DesktopCaptureCancelChooseDesktopMediaFunctionBase
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
public:
DesktopCaptureCancelChooseDesktopMediaFunctionBase();
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 4113d20..639cf9e 100644
--- a/chrome/browser/extensions/api/developer_private/developer_private_api.h
+++ b/chrome/browser/extensions/api/developer_private/developer_private_api.h
@@ -294,7 +294,7 @@
namespace api {
-class DeveloperPrivateAPIFunction : public UIThreadExtensionFunction {
+class DeveloperPrivateAPIFunction : public ExtensionFunction {
protected:
~DeveloperPrivateAPIFunction() override;
@@ -488,7 +488,7 @@
DISALLOW_COPY_AND_ASSIGN(DeveloperPrivateShowPermissionsDialogFunction);
};
-class DeveloperPrivateChooseEntryFunction : public UIThreadExtensionFunction,
+class DeveloperPrivateChooseEntryFunction : public ExtensionFunction,
public EntryPickerClient {
protected:
~DeveloperPrivateChooseEntryFunction() override;
@@ -498,7 +498,6 @@
int file_type_index);
};
-
class DeveloperPrivateLoadUnpackedFunction
: public DeveloperPrivateChooseEntryFunction {
public:
@@ -611,8 +610,7 @@
std::string key_path_str_;
};
-class DeveloperPrivateIsProfileManagedFunction
- : public UIThreadExtensionFunction {
+class DeveloperPrivateIsProfileManagedFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("developerPrivate.isProfileManaged",
DEVELOPERPRIVATE_ISPROFILEMANAGED)
diff --git a/chrome/browser/extensions/api/developer_private/developer_private_api_unittest.cc b/chrome/browser/extensions/api/developer_private/developer_private_api_unittest.cc
index d4de3f8..91bb48ea2 100644
--- a/chrome/browser/extensions/api/developer_private/developer_private_api_unittest.cc
+++ b/chrome/browser/extensions/api/developer_private/developer_private_api_unittest.cc
@@ -126,7 +126,7 @@
// A wrapper around extension_function_test_utils::RunFunction that runs with
// the associated browser, no flags, and can take stack-allocated arguments.
- bool RunFunction(const scoped_refptr<UIThreadExtensionFunction>& function,
+ bool RunFunction(const scoped_refptr<ExtensionFunction>& function,
const base::ListValue& args);
// Loads an unpacked extension that is backed by a real directory, allowing
@@ -184,7 +184,7 @@
};
bool DeveloperPrivateApiUnitTest::RunFunction(
- const scoped_refptr<UIThreadExtensionFunction>& function,
+ const scoped_refptr<ExtensionFunction>& function,
const base::ListValue& args) {
return extension_function_test_utils::RunFunction(
function.get(), args.CreateDeepCopy(), browser(), api_test_utils::NONE);
@@ -234,7 +234,7 @@
const base::Callback<bool()>& has_pref,
const std::string& key,
const std::string& extension_id) {
- scoped_refptr<UIThreadExtensionFunction> function(
+ scoped_refptr<ExtensionFunction> function(
new api::DeveloperPrivateUpdateExtensionConfigurationFunction());
EXPECT_FALSE(has_pref.Run()) << key;
@@ -279,7 +279,7 @@
const base::ListValue& args,
api::developer_private::PackStatus expected_status,
int expected_flags) {
- scoped_refptr<UIThreadExtensionFunction> function(
+ scoped_refptr<ExtensionFunction> function(
new api::DeveloperPrivatePackDirectoryFunction());
if (!RunFunction(function, args))
return testing::AssertionFailure() << "Could not run function.";
@@ -308,7 +308,7 @@
void DeveloperPrivateApiUnitTest::UpdateProfileConfigurationDevMode(
bool dev_mode) {
- scoped_refptr<UIThreadExtensionFunction> function(
+ scoped_refptr<ExtensionFunction> function(
new api::DeveloperPrivateUpdateProfileConfigurationFunction());
std::unique_ptr<base::ListValue> args =
ListBuilder()
@@ -319,7 +319,7 @@
void DeveloperPrivateApiUnitTest::GetProfileConfiguration(
std::unique_ptr<api::developer_private::ProfileInfo>* profile_info) {
- scoped_refptr<UIThreadExtensionFunction> function(
+ scoped_refptr<ExtensionFunction> function(
new api::DeveloperPrivateGetProfileConfigurationFunction());
base::ListValue args;
EXPECT_TRUE(RunFunction(function, args)) << function->GetError();
@@ -337,7 +337,7 @@
base::StringPiece new_access) {
SCOPED_TRACE(new_access);
ExtensionFunction::ScopedUserGestureForTests scoped_user_gesture;
- scoped_refptr<UIThreadExtensionFunction> function = base::MakeRefCounted<
+ scoped_refptr<ExtensionFunction> function = base::MakeRefCounted<
api::DeveloperPrivateUpdateExtensionConfigurationFunction>();
std::string args =
base::StringPrintf(R"([{"extensionId": "%s", "hostAccess": "%s"}])",
@@ -405,7 +405,7 @@
TEST_F(DeveloperPrivateApiUnitTest, DeveloperPrivateReload) {
const Extension* extension = LoadUnpackedExtension();
std::string extension_id = extension->id();
- scoped_refptr<UIThreadExtensionFunction> function(
+ scoped_refptr<ExtensionFunction> function(
new api::DeveloperPrivateReloadFunction());
base::ListValue reload_args;
reload_args.AppendString(extension_id);
@@ -486,7 +486,7 @@
base::ListValue choose_args;
choose_args.AppendString("FOLDER");
choose_args.AppendString("LOAD");
- scoped_refptr<UIThreadExtensionFunction> function(
+ scoped_refptr<ExtensionFunction> function(
new api::DeveloperPrivateChoosePathFunction());
function->SetRenderFrameHost(web_contents->GetMainFrame());
EXPECT_TRUE(RunFunction(function, choose_args)) << function->GetError();
@@ -527,7 +527,7 @@
// Try loading a good extension (it should succeed, and the extension should
// be added).
- scoped_refptr<UIThreadExtensionFunction> function(
+ scoped_refptr<ExtensionFunction> function(
new api::DeveloperPrivateLoadUnpackedFunction());
function->SetRenderFrameHost(web_contents->GetMainFrame());
ExtensionIdSet current_ids = registry()->enabled_extensions().GetIDs();
@@ -577,7 +577,7 @@
base::FilePath path = dir.UnpackedPath();
api::EntryPicker::SkipPickerAndAlwaysSelectPathForTest(&path);
- scoped_refptr<UIThreadExtensionFunction> function(
+ scoped_refptr<ExtensionFunction> function(
new api::DeveloperPrivateLoadUnpackedFunction());
function->SetRenderFrameHost(web_contents->GetMainFrame());
std::unique_ptr<base::Value> result =
@@ -604,7 +604,7 @@
base::FilePath path = dir.UnpackedPath();
api::EntryPicker::SkipPickerAndAlwaysSelectPathForTest(&path);
- scoped_refptr<UIThreadExtensionFunction> function(
+ scoped_refptr<ExtensionFunction> function(
new api::DeveloperPrivateLoadUnpackedFunction());
function->SetRenderFrameHost(web_contents->GetMainFrame());
std::unique_ptr<base::Value> result =
@@ -636,7 +636,7 @@
base::FilePath path = dir.UnpackedPath();
api::EntryPicker::SkipPickerAndAlwaysSelectPathForTest(&path);
- scoped_refptr<UIThreadExtensionFunction> function(
+ scoped_refptr<ExtensionFunction> function(
new api::DeveloperPrivateLoadUnpackedFunction());
function->SetRenderFrameHost(web_contents->GetMainFrame());
std::unique_ptr<base::Value> result =
@@ -669,7 +669,7 @@
{
// Trying to load the extension should result in a load error with the
// retry id populated.
- scoped_refptr<UIThreadExtensionFunction> function(
+ scoped_refptr<ExtensionFunction> function(
new api::DeveloperPrivateLoadUnpackedFunction());
function->SetRenderFrameHost(web_contents->GetMainFrame());
std::unique_ptr<base::Value> result =
@@ -689,7 +689,7 @@
// same retry id. This is somewhat an implementation detail, but is
// important to ensure we don't allocate crazy numbers of ids if the user
// just retries continuously.
- scoped_refptr<UIThreadExtensionFunction> function(
+ scoped_refptr<ExtensionFunction> function(
new api::DeveloperPrivateLoadUnpackedFunction());
function->SetRenderFrameHost(web_contents->GetMainFrame());
std::unique_ptr<base::Value> result =
@@ -718,7 +718,7 @@
base::FilePath second_path = second_dir.UnpackedPath();
api::EntryPicker::SkipPickerAndAlwaysSelectPathForTest(&second_path);
- scoped_refptr<UIThreadExtensionFunction> function(
+ scoped_refptr<ExtensionFunction> function(
new api::DeveloperPrivateLoadUnpackedFunction());
function->SetRenderFrameHost(web_contents->GetMainFrame());
std::unique_ptr<base::Value> result =
@@ -749,7 +749,7 @@
{
// Try reloading the extension by supplying the retry id. It should succeed.
- scoped_refptr<UIThreadExtensionFunction> function(
+ scoped_refptr<ExtensionFunction> function(
new api::DeveloperPrivateLoadUnpackedFunction());
function->SetRenderFrameHost(web_contents->GetMainFrame());
TestExtensionRegistryObserver observer(registry());
@@ -766,7 +766,7 @@
{
// Try supplying an invalid retry id. It should fail with an error.
- scoped_refptr<UIThreadExtensionFunction> function(
+ scoped_refptr<ExtensionFunction> function(
new api::DeveloperPrivateLoadUnpackedFunction());
function->SetRenderFrameHost(web_contents->GetMainFrame());
std::string error = api_test_utils::RunFunctionAndReturnError(
@@ -995,7 +995,7 @@
properties.message = kErrorMessage;
properties.manifest_key.reset(new std::string("name"));
- scoped_refptr<UIThreadExtensionFunction> function(
+ scoped_refptr<ExtensionFunction> function(
new api::DeveloperPrivateRequestFileSourceFunction());
base::ListValue file_source_args;
file_source_args.Append(properties.ToValue());
@@ -1021,7 +1021,7 @@
// ExtensionInfoGenerator's unittest), but rather just to make sure we can
// serialize/deserialize the result - which implicity tests that everything
// has a sane value.
- scoped_refptr<UIThreadExtensionFunction> function(
+ scoped_refptr<ExtensionFunction> function(
new api::DeveloperPrivateGetExtensionsInfoFunction());
EXPECT_TRUE(RunFunction(function, base::ListValue())) << function->GetError();
const base::ListValue* results = function->GetResultList();
@@ -1080,7 +1080,7 @@
.Set("type", type_string)
.Build())
.Build();
- scoped_refptr<UIThreadExtensionFunction> function =
+ scoped_refptr<ExtensionFunction> function =
new api::DeveloperPrivateDeleteExtensionErrorsFunction();
EXPECT_TRUE(RunFunction(function, *args)) << function->GetError();
// Two errors should remain.
@@ -1123,7 +1123,7 @@
// Attempt to repair the good extension, expect failure.
std::unique_ptr<base::ListValue> args =
ListBuilder().Append(extension->id()).Build();
- scoped_refptr<UIThreadExtensionFunction> function =
+ scoped_refptr<ExtensionFunction> function =
new api::DeveloperPrivateRepairExtensionFunction();
EXPECT_FALSE(RunFunction(function, *args));
EXPECT_EQ("Cannot repair a healthy extension.", function->GetError());
@@ -1154,7 +1154,7 @@
// Attempt to repair the good extension, expect failure.
std::unique_ptr<base::ListValue> args =
ListBuilder().Append(extension_id).Build();
- scoped_refptr<UIThreadExtensionFunction> function =
+ scoped_refptr<ExtensionFunction> function =
new api::DeveloperPrivateRepairExtensionFunction();
EXPECT_FALSE(RunFunction(function, *args));
EXPECT_EQ("Cannot repair a healthy extension.", function->GetError());
@@ -1219,7 +1219,7 @@
PrefService* prefs = profile()->GetPrefs();
prefs->SetBoolean(prefs::kExtensionsUIDeveloperMode, false);
- scoped_refptr<UIThreadExtensionFunction> function =
+ scoped_refptr<ExtensionFunction> function =
base::MakeRefCounted<api::DeveloperPrivateLoadUnpackedFunction>();
function->SetRenderFrameHost(web_contents->GetMainFrame());
std::string error = extension_function_test_utils::RunFunctionAndReturnError(
@@ -1252,7 +1252,7 @@
EXPECT_FALSE(info->can_load_unpacked);
- scoped_refptr<UIThreadExtensionFunction> function =
+ scoped_refptr<ExtensionFunction> function =
base::MakeRefCounted<api::DeveloperPrivateLoadUnpackedFunction>();
function->SetRenderFrameHost(web_contents->GetMainFrame());
std::string error = extension_function_test_utils::RunFunctionAndReturnError(
@@ -1295,7 +1295,7 @@
std::unique_ptr<content::WebContents> web_contents(
content::WebContentsTester::CreateTestWebContents(profile(), nullptr));
- scoped_refptr<UIThreadExtensionFunction> function =
+ scoped_refptr<ExtensionFunction> function =
base::MakeRefCounted<api::DeveloperPrivateInstallDroppedFileFunction>();
function->SetRenderFrameHost(web_contents->GetMainFrame());
@@ -1321,7 +1321,7 @@
DeveloperPrivateAPI::Get(profile())->SetDraggedPath(web_contents.get(),
crx_path);
- scoped_refptr<UIThreadExtensionFunction> function =
+ scoped_refptr<ExtensionFunction> function =
base::MakeRefCounted<api::DeveloperPrivateInstallDroppedFileFunction>();
function->SetRenderFrameHost(web_contents->GetMainFrame());
@@ -1344,7 +1344,7 @@
DeveloperPrivateAPI::Get(profile())->SetDraggedPath(web_contents.get(),
script_path);
- scoped_refptr<UIThreadExtensionFunction> function =
+ scoped_refptr<ExtensionFunction> function =
base::MakeRefCounted<api::DeveloperPrivateInstallDroppedFileFunction>();
function->SetRenderFrameHost(web_contents->GetMainFrame());
@@ -1368,7 +1368,7 @@
bool should_succeed,
const char* expected_error) {
SCOPED_TRACE(host);
- scoped_refptr<UIThreadExtensionFunction> function =
+ scoped_refptr<ExtensionFunction> function =
base::MakeRefCounted<api::DeveloperPrivateAddHostPermissionFunction>();
std::string args = base::StringPrintf(R"(["%s", "%s"])",
@@ -1425,7 +1425,7 @@
bool should_succeed,
const char* expected_error) {
SCOPED_TRACE(host);
- scoped_refptr<UIThreadExtensionFunction> function = base::MakeRefCounted<
+ scoped_refptr<ExtensionFunction> function = base::MakeRefCounted<
api::DeveloperPrivateRemoveHostPermissionFunction>();
std::string args = base::StringPrintf(R"(["%s", "%s"])",
extension->id().c_str(), host.data());
@@ -1579,7 +1579,7 @@
*extension_prefs->GetRuntimeGrantedPermissions(extension->id()));
{
- scoped_refptr<UIThreadExtensionFunction> function =
+ scoped_refptr<ExtensionFunction> function =
base::MakeRefCounted<api::DeveloperPrivateAddHostPermissionFunction>();
std::string args = base::StringPrintf(
R"(["%s", "%s"])", extension->id().c_str(), "*://chromium.org/*");
@@ -1610,7 +1610,7 @@
*extension_prefs->GetRuntimeGrantedPermissions(extension->id()));
{
- scoped_refptr<UIThreadExtensionFunction> function = base::MakeRefCounted<
+ scoped_refptr<ExtensionFunction> function = base::MakeRefCounted<
api::DeveloperPrivateRemoveHostPermissionFunction>();
std::string args = base::StringPrintf(
R"(["%s", "%s"])", extension->id().c_str(), "*://chromium.org/*");
@@ -1730,7 +1730,7 @@
DeveloperPrivateAPI::Get(profile())->SetDraggedPath(web_contents.get(),
zip_path);
- scoped_refptr<UIThreadExtensionFunction> function =
+ scoped_refptr<ExtensionFunction> function =
base::MakeRefCounted<api::DeveloperPrivateInstallDroppedFileFunction>();
function->SetRenderFrameHost(web_contents->GetMainFrame());
@@ -1765,7 +1765,7 @@
ASSERT_TRUE(profile()->IsSupervised());
- scoped_refptr<UIThreadExtensionFunction> function =
+ scoped_refptr<ExtensionFunction> function =
base::MakeRefCounted<api::DeveloperPrivateLoadUnpackedFunction>();
function->SetRenderFrameHost(web_contents->GetMainFrame());
std::string error = extension_function_test_utils::RunFunctionAndReturnError(
diff --git a/chrome/browser/extensions/api/developer_private/developer_private_apitest.cc b/chrome/browser/extensions/api/developer_private/developer_private_apitest.cc
index 570844d..f4cb2836 100644
--- a/chrome/browser/extensions/api/developer_private/developer_private_apitest.cc
+++ b/chrome/browser/extensions/api/developer_private/developer_private_apitest.cc
@@ -43,7 +43,7 @@
const Extension* app = LoadAndLaunchApp(dir);
// Get the info about the app, including the inspectable views.
- scoped_refptr<UIThreadExtensionFunction> function(
+ scoped_refptr<ExtensionFunction> function(
new api::DeveloperPrivateGetExtensionInfoFunction());
std::unique_ptr<base::Value> result(
extension_function_test_utils::RunFunctionAndReturnSingleResult(
@@ -97,7 +97,7 @@
WaitForExtensionNotIdle(extension->id());
// Get the info about the extension, including the inspectable views.
- scoped_refptr<UIThreadExtensionFunction> function(
+ scoped_refptr<ExtensionFunction> function(
new api::DeveloperPrivateGetExtensionInfoFunction());
std::unique_ptr<base::Value> result(
extension_function_test_utils::RunFunctionAndReturnSingleResult(
diff --git a/chrome/browser/extensions/api/downloads/downloads_api.h b/chrome/browser/extensions/api/downloads/downloads_api.h
index 7a44733..81d3cc6 100644
--- a/chrome/browser/extensions/api/downloads/downloads_api.h
+++ b/chrome/browser/extensions/api/downloads/downloads_api.h
@@ -107,7 +107,7 @@
DISALLOW_COPY_AND_ASSIGN(DownloadsDownloadFunction);
};
-class DownloadsSearchFunction : public UIThreadExtensionFunction {
+class DownloadsSearchFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("downloads.search", DOWNLOADS_SEARCH)
DownloadsSearchFunction();
@@ -120,7 +120,7 @@
DISALLOW_COPY_AND_ASSIGN(DownloadsSearchFunction);
};
-class DownloadsPauseFunction : public UIThreadExtensionFunction {
+class DownloadsPauseFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("downloads.pause", DOWNLOADS_PAUSE)
DownloadsPauseFunction();
@@ -133,7 +133,7 @@
DISALLOW_COPY_AND_ASSIGN(DownloadsPauseFunction);
};
-class DownloadsResumeFunction : public UIThreadExtensionFunction {
+class DownloadsResumeFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("downloads.resume", DOWNLOADS_RESUME)
DownloadsResumeFunction();
@@ -146,7 +146,7 @@
DISALLOW_COPY_AND_ASSIGN(DownloadsResumeFunction);
};
-class DownloadsCancelFunction : public UIThreadExtensionFunction {
+class DownloadsCancelFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("downloads.cancel", DOWNLOADS_CANCEL)
DownloadsCancelFunction();
@@ -159,7 +159,7 @@
DISALLOW_COPY_AND_ASSIGN(DownloadsCancelFunction);
};
-class DownloadsEraseFunction : public UIThreadExtensionFunction {
+class DownloadsEraseFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("downloads.erase", DOWNLOADS_ERASE)
DownloadsEraseFunction();
@@ -211,7 +211,7 @@
DISALLOW_COPY_AND_ASSIGN(DownloadsAcceptDangerFunction);
};
-class DownloadsShowFunction : public UIThreadExtensionFunction {
+class DownloadsShowFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("downloads.show", DOWNLOADS_SHOW)
DownloadsShowFunction();
@@ -224,7 +224,7 @@
DISALLOW_COPY_AND_ASSIGN(DownloadsShowFunction);
};
-class DownloadsShowDefaultFolderFunction : public UIThreadExtensionFunction {
+class DownloadsShowDefaultFolderFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION(
"downloads.showDefaultFolder", DOWNLOADS_SHOWDEFAULTFOLDER)
@@ -238,7 +238,7 @@
DISALLOW_COPY_AND_ASSIGN(DownloadsShowDefaultFolderFunction);
};
-class DownloadsOpenFunction : public UIThreadExtensionFunction {
+class DownloadsOpenFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("downloads.open", DOWNLOADS_OPEN)
DownloadsOpenFunction();
@@ -261,7 +261,7 @@
DISALLOW_COPY_AND_ASSIGN(DownloadsOpenFunction);
};
-class DownloadsSetShelfEnabledFunction : public UIThreadExtensionFunction {
+class DownloadsSetShelfEnabledFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("downloads.setShelfEnabled",
DOWNLOADS_SETSHELFENABLED)
@@ -275,7 +275,7 @@
DISALLOW_COPY_AND_ASSIGN(DownloadsSetShelfEnabledFunction);
};
-class DownloadsDragFunction : public UIThreadExtensionFunction {
+class DownloadsDragFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("downloads.drag", DOWNLOADS_DRAG)
DownloadsDragFunction();
diff --git a/chrome/browser/extensions/api/downloads/downloads_api_browsertest.cc b/chrome/browser/extensions/api/downloads/downloads_api_browsertest.cc
index fec35ae..2575f45 100644
--- a/chrome/browser/extensions/api/downloads/downloads_api_browsertest.cc
+++ b/chrome/browser/extensions/api/downloads/downloads_api_browsertest.cc
@@ -599,9 +599,8 @@
GetCurrentManager(), download_count);
}
- bool RunFunction(UIThreadExtensionFunction* function,
- const std::string& args) {
- scoped_refptr<UIThreadExtensionFunction> delete_function(function);
+ bool RunFunction(ExtensionFunction* function, const std::string& args) {
+ scoped_refptr<ExtensionFunction> delete_function(function);
SetUpExtensionFunction(function);
bool result = extension_function_test_utils::RunFunction(
function, args, current_browser(), GetFlags());
@@ -622,7 +621,7 @@
// on-record profile to match real-life behavior.
base::Value* RunFunctionAndReturnResult(
- scoped_refptr<UIThreadExtensionFunction> function,
+ scoped_refptr<ExtensionFunction> function,
const std::string& args) {
SetUpExtensionFunction(function.get());
return extension_function_test_utils::RunFunctionAndReturnSingleResult(
@@ -630,17 +629,16 @@
}
std::string RunFunctionAndReturnError(
- scoped_refptr<UIThreadExtensionFunction> function,
+ scoped_refptr<ExtensionFunction> function,
const std::string& args) {
SetUpExtensionFunction(function.get());
return extension_function_test_utils::RunFunctionAndReturnError(
function.get(), args, current_browser(), GetFlags());
}
- bool RunFunctionAndReturnString(
- scoped_refptr<UIThreadExtensionFunction> function,
- const std::string& args,
- std::string* result_string) {
+ bool RunFunctionAndReturnString(scoped_refptr<ExtensionFunction> function,
+ const std::string& args,
+ std::string* result_string) {
SetUpExtensionFunction(function.get());
std::unique_ptr<base::Value> result(
RunFunctionAndReturnResult(function, args));
@@ -661,7 +659,7 @@
const Extension* extension() { return extension_; }
private:
- void SetUpExtensionFunction(UIThreadExtensionFunction* function) {
+ void SetUpExtensionFunction(ExtensionFunction* function) {
if (extension_) {
const GURL url = current_browser_ == incognito_browser_ &&
!IncognitoInfo::IsSplitMode(extension_)
@@ -1044,7 +1042,7 @@
EXPECT_EQ(id, element);
}
-scoped_refptr<UIThreadExtensionFunction> MockedGetFileIconFunction(
+scoped_refptr<ExtensionFunction> MockedGetFileIconFunction(
const base::FilePath& expected_path,
IconLoader::IconSize icon_size,
const std::string& response) {
diff --git a/chrome/browser/extensions/api/downloads_internal/downloads_internal_api.h b/chrome/browser/extensions/api/downloads_internal/downloads_internal_api.h
index 639906d..490c94e 100644
--- a/chrome/browser/extensions/api/downloads_internal/downloads_internal_api.h
+++ b/chrome/browser/extensions/api/downloads_internal/downloads_internal_api.h
@@ -10,8 +10,7 @@
namespace extensions {
-class DownloadsInternalDetermineFilenameFunction
- : public UIThreadExtensionFunction {
+class DownloadsInternalDetermineFilenameFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("downloadsInternal.determineFilename",
DOWNLOADSINTERNAL_DETERMINEFILENAME)
diff --git a/chrome/browser/extensions/api/enterprise_device_attributes/enterprise_device_attributes_api.h b/chrome/browser/extensions/api/enterprise_device_attributes/enterprise_device_attributes_api.h
index 0f87921..5c6a57c 100644
--- a/chrome/browser/extensions/api/enterprise_device_attributes/enterprise_device_attributes_api.h
+++ b/chrome/browser/extensions/api/enterprise_device_attributes/enterprise_device_attributes_api.h
@@ -10,7 +10,7 @@
namespace extensions {
class EnterpriseDeviceAttributesGetDirectoryDeviceIdFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
public:
EnterpriseDeviceAttributesGetDirectoryDeviceIdFunction();
@@ -25,7 +25,7 @@
};
class EnterpriseDeviceAttributesGetDeviceSerialNumberFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
public:
EnterpriseDeviceAttributesGetDeviceSerialNumberFunction();
@@ -41,7 +41,7 @@
};
class EnterpriseDeviceAttributesGetDeviceAssetIdFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
public:
EnterpriseDeviceAttributesGetDeviceAssetIdFunction();
@@ -56,7 +56,7 @@
};
class EnterpriseDeviceAttributesGetDeviceAnnotatedLocationFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
public:
EnterpriseDeviceAttributesGetDeviceAnnotatedLocationFunction();
diff --git a/chrome/browser/extensions/api/enterprise_hardware_platform/enterprise_hardware_platform_api.h b/chrome/browser/extensions/api/enterprise_hardware_platform/enterprise_hardware_platform_api.h
index 1600ac5..0d69118 100644
--- a/chrome/browser/extensions/api/enterprise_hardware_platform/enterprise_hardware_platform_api.h
+++ b/chrome/browser/extensions/api/enterprise_hardware_platform/enterprise_hardware_platform_api.h
@@ -12,7 +12,7 @@
namespace extensions {
class EnterpriseHardwarePlatformGetHardwarePlatformInfoFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
public:
EnterpriseHardwarePlatformGetHardwarePlatformInfoFunction();
diff --git a/chrome/browser/extensions/api/enterprise_platform_keys/enterprise_platform_keys_api.cc b/chrome/browser/extensions/api/enterprise_platform_keys/enterprise_platform_keys_api.cc
index 78b8bb0..cc48d23d 100644
--- a/chrome/browser/extensions/api/enterprise_platform_keys/enterprise_platform_keys_api.cc
+++ b/chrome/browser/extensions/api/enterprise_platform_keys/enterprise_platform_keys_api.cc
@@ -283,7 +283,7 @@
// |callback| holds a reference to |this|.
base::Closure task =
base::Bind(&EPKPChallengeMachineKey::Run, base::Unretained(impl_),
- scoped_refptr<UIThreadExtensionFunction>(this), callback,
+ scoped_refptr<ExtensionFunction>(this), callback,
StringFromVector(params->challenge),
params->register_key ? *params->register_key : false);
base::PostTaskWithTraits(FROM_HERE, {content::BrowserThread::UI}, task);
@@ -324,7 +324,7 @@
// |callback| holds a reference to |this|.
base::Closure task =
base::Bind(&EPKPChallengeUserKey::Run, base::Unretained(impl_),
- scoped_refptr<UIThreadExtensionFunction>(this), callback,
+ scoped_refptr<ExtensionFunction>(this), callback,
StringFromVector(params->challenge), params->register_key);
base::PostTaskWithTraits(FROM_HERE, {content::BrowserThread::UI}, task);
return RespondLater();
diff --git a/chrome/browser/extensions/api/enterprise_platform_keys/enterprise_platform_keys_api.h b/chrome/browser/extensions/api/enterprise_platform_keys/enterprise_platform_keys_api.h
index 6900eb2..9ec384a2 100644
--- a/chrome/browser/extensions/api/enterprise_platform_keys/enterprise_platform_keys_api.h
+++ b/chrome/browser/extensions/api/enterprise_platform_keys/enterprise_platform_keys_api.h
@@ -21,7 +21,7 @@
namespace extensions {
class EnterprisePlatformKeysInternalGenerateKeyFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
private:
~EnterprisePlatformKeysInternalGenerateKeyFunction() override;
ResponseAction Run() override;
@@ -35,8 +35,7 @@
ENTERPRISE_PLATFORMKEYSINTERNAL_GENERATEKEY)
};
-class EnterprisePlatformKeysGetCertificatesFunction
- : public UIThreadExtensionFunction {
+class EnterprisePlatformKeysGetCertificatesFunction : public ExtensionFunction {
private:
~EnterprisePlatformKeysGetCertificatesFunction() override;
ResponseAction Run() override;
@@ -51,7 +50,7 @@
};
class EnterprisePlatformKeysImportCertificateFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
private:
~EnterprisePlatformKeysImportCertificateFunction() override;
ResponseAction Run() override;
@@ -65,7 +64,7 @@
};
class EnterprisePlatformKeysRemoveCertificateFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
private:
~EnterprisePlatformKeysRemoveCertificateFunction() override;
ResponseAction Run() override;
@@ -79,7 +78,7 @@
};
class EnterprisePlatformKeysInternalGetTokensFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
private:
~EnterprisePlatformKeysInternalGetTokensFunction() override;
ResponseAction Run() override;
@@ -94,7 +93,7 @@
};
class EnterprisePlatformKeysChallengeMachineKeyFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
public:
EnterprisePlatformKeysChallengeMachineKeyFunction();
explicit EnterprisePlatformKeysChallengeMachineKeyFunction(
@@ -117,7 +116,7 @@
};
class EnterprisePlatformKeysChallengeUserKeyFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
public:
EnterprisePlatformKeysChallengeUserKeyFunction();
explicit EnterprisePlatformKeysChallengeUserKeyFunction(
diff --git a/chrome/browser/extensions/api/enterprise_platform_keys/enterprise_platform_keys_api_unittest.cc b/chrome/browser/extensions/api/enterprise_platform_keys/enterprise_platform_keys_api_unittest.cc
index 5fa0fffc2..ba3cd7e1 100644
--- a/chrome/browser/extensions/api/enterprise_platform_keys/enterprise_platform_keys_api_unittest.cc
+++ b/chrome/browser/extensions/api/enterprise_platform_keys/enterprise_platform_keys_api_unittest.cc
@@ -181,7 +181,7 @@
// Like extension_function_test_utils::RunFunctionAndReturnError but with an
// explicit ListValue.
- std::string RunFunctionAndReturnError(UIThreadExtensionFunction* function,
+ std::string RunFunctionAndReturnError(ExtensionFunction* function,
std::unique_ptr<base::ListValue> args,
Browser* browser) {
utils::RunFunction(function, std::move(args), browser,
@@ -193,7 +193,7 @@
// Like extension_function_test_utils::RunFunctionAndReturnSingleResult but
// with an explicit ListValue.
base::Value* RunFunctionAndReturnSingleResult(
- UIThreadExtensionFunction* function,
+ ExtensionFunction* function,
std::unique_ptr<base::ListValue> args,
Browser* browser) {
scoped_refptr<ExtensionFunction> function_owner(function);
diff --git a/chrome/browser/extensions/api/enterprise_platform_keys_private/enterprise_platform_keys_private_api.cc b/chrome/browser/extensions/api/enterprise_platform_keys_private/enterprise_platform_keys_private_api.cc
index 14affe2..514a9e0 100644
--- a/chrome/browser/extensions/api/enterprise_platform_keys_private/enterprise_platform_keys_private_api.cc
+++ b/chrome/browser/extensions/api/enterprise_platform_keys_private/enterprise_platform_keys_private_api.cc
@@ -337,11 +337,10 @@
EPKPChallengeMachineKey::~EPKPChallengeMachineKey() {
}
-void EPKPChallengeMachineKey::Run(
- scoped_refptr<UIThreadExtensionFunction> caller,
- const ChallengeKeyCallback& callback,
- const std::string& challenge,
- bool register_key) {
+void EPKPChallengeMachineKey::Run(scoped_refptr<ExtensionFunction> caller,
+ const ChallengeKeyCallback& callback,
+ const std::string& challenge,
+ bool register_key) {
callback_ = callback;
profile_ = ChromeExtensionFunctionDetails(caller.get()).GetProfile();
extension_ = scoped_refptr<const Extension>(caller->extension());
@@ -372,7 +371,7 @@
}
void EPKPChallengeMachineKey::DecodeAndRun(
- scoped_refptr<UIThreadExtensionFunction> caller,
+ scoped_refptr<ExtensionFunction> caller,
const ChallengeKeyCallback& callback,
const std::string& encoded_challenge,
bool register_key) {
@@ -489,7 +488,7 @@
registry->RegisterListPref(prefs::kAttestationExtensionWhitelist);
}
-void EPKPChallengeUserKey::Run(scoped_refptr<UIThreadExtensionFunction> caller,
+void EPKPChallengeUserKey::Run(scoped_refptr<ExtensionFunction> caller,
const ChallengeKeyCallback& callback,
const std::string& challenge,
bool register_key) {
@@ -535,11 +534,10 @@
}
}
-void EPKPChallengeUserKey::DecodeAndRun(
- scoped_refptr<UIThreadExtensionFunction> caller,
- const ChallengeKeyCallback& callback,
- const std::string& encoded_challenge,
- bool register_key) {
+void EPKPChallengeUserKey::DecodeAndRun(scoped_refptr<ExtensionFunction> caller,
+ const ChallengeKeyCallback& callback,
+ const std::string& encoded_challenge,
+ bool register_key) {
std::string challenge;
if (!base::Base64Decode(encoded_challenge, &challenge)) {
callback.Run(false, kChallengeBadBase64Error);
@@ -645,10 +643,10 @@
this);
// base::Unretained is safe on impl_ since its life-cycle matches |this| and
// |callback| holds a reference to |this|.
- base::Closure task = base::Bind(
- &EPKPChallengeMachineKey::DecodeAndRun, base::Unretained(impl_),
- scoped_refptr<UIThreadExtensionFunction>(this), callback,
- params->challenge, false);
+ base::Closure task = base::Bind(&EPKPChallengeMachineKey::DecodeAndRun,
+ base::Unretained(impl_),
+ scoped_refptr<ExtensionFunction>(this),
+ callback, params->challenge, false);
base::PostTaskWithTraits(FROM_HERE, {content::BrowserThread::UI}, task);
return RespondLater();
}
@@ -690,7 +688,7 @@
// |callback| holds a reference to |this|.
base::Closure task =
base::Bind(&EPKPChallengeUserKey::DecodeAndRun, base::Unretained(impl_),
- scoped_refptr<UIThreadExtensionFunction>(this), callback,
+ scoped_refptr<ExtensionFunction>(this), callback,
params->challenge, params->register_key);
base::PostTaskWithTraits(FROM_HERE, {content::BrowserThread::UI}, task);
return RespondLater();
diff --git a/chrome/browser/extensions/api/enterprise_platform_keys_private/enterprise_platform_keys_private_api.h b/chrome/browser/extensions/api/enterprise_platform_keys_private/enterprise_platform_keys_private_api.h
index 66cb475..460ed7b 100644
--- a/chrome/browser/extensions/api/enterprise_platform_keys_private/enterprise_platform_keys_private_api.h
+++ b/chrome/browser/extensions/api/enterprise_platform_keys_private/enterprise_platform_keys_private_api.h
@@ -176,13 +176,13 @@
// Asynchronously run the flow to challenge a machine key in the |caller|
// context.
- void Run(scoped_refptr<UIThreadExtensionFunction> caller,
+ void Run(scoped_refptr<ExtensionFunction> caller,
const ChallengeKeyCallback& callback,
const std::string& encoded_challenge,
bool register_key);
// Like |Run| but expects a Base64 |encoded_challenge|.
- void DecodeAndRun(scoped_refptr<UIThreadExtensionFunction> caller,
+ void DecodeAndRun(scoped_refptr<ExtensionFunction> caller,
const ChallengeKeyCallback& callback,
const std::string& encoded_challenge,
bool register_key);
@@ -223,13 +223,13 @@
// Asynchronously run the flow to challenge a user key in the |caller|
// context.
- void Run(scoped_refptr<UIThreadExtensionFunction> caller,
+ void Run(scoped_refptr<ExtensionFunction> caller,
const ChallengeKeyCallback& callback,
const std::string& challenge,
bool register_key);
// Like |Run| but expects a Base64 |encoded_challenge|.
- void DecodeAndRun(scoped_refptr<UIThreadExtensionFunction> caller,
+ void DecodeAndRun(scoped_refptr<ExtensionFunction> caller,
const ChallengeKeyCallback& callback,
const std::string& encoded_challenge,
bool register_key);
@@ -255,7 +255,7 @@
};
class EnterprisePlatformKeysPrivateChallengeMachineKeyFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
public:
EnterprisePlatformKeysPrivateChallengeMachineKeyFunction();
explicit EnterprisePlatformKeysPrivateChallengeMachineKeyFunction(
@@ -279,7 +279,7 @@
};
class EnterprisePlatformKeysPrivateChallengeUserKeyFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
public:
EnterprisePlatformKeysPrivateChallengeUserKeyFunction();
explicit EnterprisePlatformKeysPrivateChallengeUserKeyFunction(
diff --git a/chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.h b/chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.h
index c6ebd8fa..ec772107 100644
--- a/chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.h
+++ b/chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.h
@@ -27,7 +27,7 @@
} // namespace enterprise_reporting
class EnterpriseReportingPrivateUploadChromeDesktopReportFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION(
"enterprise.reportingPrivate.uploadChromeDesktopReport",
@@ -65,8 +65,7 @@
EnterpriseReportingPrivateUploadChromeDesktopReportFunction);
};
-class EnterpriseReportingPrivateGetDeviceIdFunction
- : public UIThreadExtensionFunction {
+class EnterpriseReportingPrivateGetDeviceIdFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("enterprise.reportingPrivate.getDeviceId",
ENTERPRISEREPORTINGPRIVATE_GETDEVICEID)
diff --git a/chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_unittest.cc b/chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_unittest.cc
index bca47a1..344b323 100644
--- a/chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_unittest.cc
+++ b/chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_unittest.cc
@@ -34,7 +34,7 @@
public:
EnterpriseReportingPrivateUploadChromeDesktopReportTest() {}
- UIThreadExtensionFunction* CreateChromeDesktopReportingFunction(
+ ExtensionFunction* CreateChromeDesktopReportingFunction(
const std::string& dm_token) {
EnterpriseReportingPrivateUploadChromeDesktopReportFunction* function =
EnterpriseReportingPrivateUploadChromeDesktopReportFunction::
@@ -85,7 +85,7 @@
}
TEST_F(EnterpriseReportingPrivateUploadChromeDesktopReportTest, UploadFailed) {
- UIThreadExtensionFunction* function =
+ ExtensionFunction* function =
CreateChromeDesktopReportingFunction(kFakeDMToken);
EXPECT_CALL(*client_, SetupRegistration(kFakeDMToken, kFakeClientId, _))
.Times(1);
@@ -99,7 +99,7 @@
TEST_F(EnterpriseReportingPrivateUploadChromeDesktopReportTest,
UploadSucceeded) {
- UIThreadExtensionFunction* function =
+ ExtensionFunction* function =
CreateChromeDesktopReportingFunction(kFakeDMToken);
EXPECT_CALL(*client_, SetupRegistration(kFakeDMToken, kFakeClientId, _))
.Times(1);
diff --git a/chrome/browser/extensions/api/extension_action/extension_action_api.h b/chrome/browser/extensions/api/extension_action/extension_action_api.h
index a5910ca..6ae7ffb 100644
--- a/chrome/browser/extensions/api/extension_action/extension_action_api.h
+++ b/chrome/browser/extensions/api/extension_action/extension_action_api.h
@@ -126,7 +126,7 @@
// tabIds while browserAction's are optional, they have different internal
// browser notification requirements, and not all functions are defined for all
// APIs).
-class ExtensionActionFunction : public UIThreadExtensionFunction {
+class ExtensionActionFunction : public ExtensionFunction {
public:
static bool ParseCSSColorString(const std::string& color_string,
SkColor* result);
@@ -442,7 +442,7 @@
~BrowserActionDisableFunction() override {}
};
-class BrowserActionOpenPopupFunction : public UIThreadExtensionFunction,
+class BrowserActionOpenPopupFunction : public ExtensionFunction,
public content::NotificationObserver {
public:
DECLARE_EXTENSION_FUNCTION("browserAction.openPopup",
diff --git a/chrome/browser/extensions/api/file_system/chrome_file_system_delegate.cc b/chrome/browser/extensions/api/file_system/chrome_file_system_delegate.cc
index b440c80..c5c066e 100644
--- a/chrome/browser/extensions/api/file_system/chrome_file_system_delegate.cc
+++ b/chrome/browser/extensions/api/file_system/chrome_file_system_delegate.cc
@@ -106,7 +106,7 @@
// Callback called when consent is granted or denied.
void OnConsentReceived(
content::BrowserContext* browser_context,
- scoped_refptr<UIThreadExtensionFunction> requester,
+ scoped_refptr<ExtensionFunction> requester,
const FileSystemDelegate::FileSystemCallback& success_callback,
const FileSystemDelegate::ErrorCallback& error_callback,
const std::string& extension_id,
@@ -252,7 +252,7 @@
}
bool ChromeFileSystemDelegate::ShowSelectFileDialog(
- scoped_refptr<UIThreadExtensionFunction> extension_function,
+ scoped_refptr<ExtensionFunction> extension_function,
ui::SelectFileDialog::Type type,
const base::FilePath& default_path,
const ui::SelectFileDialog::FileTypeInfo* file_types,
@@ -282,7 +282,7 @@
return false;
}
- // The file picker will hold a reference to the UIThreadExtensionFunction
+ // The file picker will hold a reference to the ExtensionFunction
// instance, preventing its destruction (and subsequent sending of the
// function response) until the user has selected a file or cancelled the
// picker. At that point, the picker will delete itself, which will also free
@@ -330,7 +330,7 @@
void ChromeFileSystemDelegate::RequestFileSystem(
content::BrowserContext* browser_context,
- scoped_refptr<UIThreadExtensionFunction> requester,
+ scoped_refptr<ExtensionFunction> requester,
const Extension& extension,
std::string volume_id,
bool writable,
diff --git a/chrome/browser/extensions/api/file_system/chrome_file_system_delegate.h b/chrome/browser/extensions/api/file_system/chrome_file_system_delegate.h
index 9dd8784b..a127639 100644
--- a/chrome/browser/extensions/api/file_system/chrome_file_system_delegate.h
+++ b/chrome/browser/extensions/api/file_system/chrome_file_system_delegate.h
@@ -32,7 +32,7 @@
// FileSystemDelegate:
base::FilePath GetDefaultDirectory() override;
bool ShowSelectFileDialog(
- scoped_refptr<UIThreadExtensionFunction> extension_function,
+ scoped_refptr<ExtensionFunction> extension_function,
ui::SelectFileDialog::Type type,
const base::FilePath& default_path,
const ui::SelectFileDialog::FileTypeInfo* file_types,
@@ -50,7 +50,7 @@
content::RenderFrameHost* render_frame_host,
const Extension& extension) override;
void RequestFileSystem(content::BrowserContext* browser_context,
- scoped_refptr<UIThreadExtensionFunction> requester,
+ scoped_refptr<ExtensionFunction> requester,
const Extension& extension,
std::string volume_id,
bool writable,
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 880218a..6b206d4 100644
--- a/chrome/browser/extensions/api/font_settings/font_settings_api.h
+++ b/chrome/browser/extensions/api/font_settings/font_settings_api.h
@@ -101,7 +101,7 @@
};
// fontSettings.clearFont API function.
-class FontSettingsClearFontFunction : public UIThreadExtensionFunction {
+class FontSettingsClearFontFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("fontSettings.clearFont", FONTSETTINGS_CLEARFONT)
@@ -115,7 +115,7 @@
};
// fontSettings.getFont API function.
-class FontSettingsGetFontFunction : public UIThreadExtensionFunction {
+class FontSettingsGetFontFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("fontSettings.getFont", FONTSETTINGS_GETFONT)
@@ -127,7 +127,7 @@
};
// fontSettings.setFont API function.
-class FontSettingsSetFontFunction : public UIThreadExtensionFunction {
+class FontSettingsSetFontFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("fontSettings.setFont", FONTSETTINGS_SETFONT)
@@ -156,7 +156,7 @@
};
// Base class for extension API functions that clear a browser font pref.
-class ClearFontPrefExtensionFunction : public UIThreadExtensionFunction {
+class ClearFontPrefExtensionFunction : public ExtensionFunction {
protected:
~ClearFontPrefExtensionFunction() override {}
@@ -169,7 +169,7 @@
};
// Base class for extension API functions that get a browser font pref.
-class GetFontPrefExtensionFunction : public UIThreadExtensionFunction {
+class GetFontPrefExtensionFunction : public ExtensionFunction {
protected:
~GetFontPrefExtensionFunction() override {}
@@ -186,7 +186,7 @@
};
// Base class for extension API functions that set a browser font pref.
-class SetFontPrefExtensionFunction : public UIThreadExtensionFunction {
+class SetFontPrefExtensionFunction : public ExtensionFunction {
protected:
~SetFontPrefExtensionFunction() override {}
diff --git a/chrome/browser/extensions/api/gcm/gcm_api.h b/chrome/browser/extensions/api/gcm/gcm_api.h
index 40bbd1b..8e538f66 100644
--- a/chrome/browser/extensions/api/gcm/gcm_api.h
+++ b/chrome/browser/extensions/api/gcm/gcm_api.h
@@ -17,7 +17,7 @@
namespace extensions {
-class GcmApiFunction : public UIThreadExtensionFunction {
+class GcmApiFunction : public ExtensionFunction {
public:
GcmApiFunction() {}
@@ -42,7 +42,7 @@
protected:
~GcmRegisterFunction() override;
- // UIThreadExtensionFunction:
+ // ExtensionFunction:
ResponseAction Run() final;
private:
@@ -59,7 +59,7 @@
protected:
~GcmUnregisterFunction() override;
- // UIThreadExtensionFunction:
+ // ExtensionFunction:
ResponseAction Run() final;
private:
@@ -75,7 +75,7 @@
protected:
~GcmSendFunction() override;
- // UIThreadExtensionFunction:
+ // ExtensionFunction:
ResponseAction Run() final;
private:
diff --git a/chrome/browser/extensions/api/history/history_api.h b/chrome/browser/extensions/api/history/history_api.h
index 9a0433db..5349fca 100644
--- a/chrome/browser/extensions/api/history/history_api.h
+++ b/chrome/browser/extensions/api/history/history_api.h
@@ -93,7 +93,7 @@
void BrowserContextKeyedAPIFactory<HistoryAPI>::DeclareFactoryDependencies();
// Base class for history function APIs.
-class HistoryFunction : public UIThreadExtensionFunction {
+class HistoryFunction : public ExtensionFunction {
protected:
~HistoryFunction() override {}
diff --git a/chrome/browser/extensions/api/i18n/i18n_api.h b/chrome/browser/extensions/api/i18n/i18n_api.h
index 5576a363..88ed709 100644
--- a/chrome/browser/extensions/api/i18n/i18n_api.h
+++ b/chrome/browser/extensions/api/i18n/i18n_api.h
@@ -9,7 +9,7 @@
namespace extensions {
-class I18nGetAcceptLanguagesFunction : public UIThreadExtensionFunction {
+class I18nGetAcceptLanguagesFunction : public ExtensionFunction {
~I18nGetAcceptLanguagesFunction() override {}
ResponseAction Run() override;
DECLARE_EXTENSION_FUNCTION("i18n.getAcceptLanguages", I18N_GETACCEPTLANGUAGES)
diff --git a/chrome/browser/extensions/api/identity/identity_apitest.cc b/chrome/browser/extensions/api/identity/identity_apitest.cc
index 99e6d39..ef79b4e6 100644
--- a/chrome/browser/extensions/api/identity/identity_apitest.cc
+++ b/chrome/browser/extensions/api/identity/identity_apitest.cc
@@ -89,7 +89,7 @@
// after the call happens.
class AsyncFunctionRunner {
public:
- void RunFunctionAsync(UIThreadExtensionFunction* function,
+ void RunFunctionAsync(ExtensionFunction* function,
const std::string& args,
content::BrowserContext* browser_context) {
response_delegate_.reset(new api_test_utils::SendResponseHelper(function));
@@ -109,14 +109,14 @@
function->RunWithValidation()->Execute();
}
- std::string WaitForError(UIThreadExtensionFunction* function) {
+ std::string WaitForError(ExtensionFunction* function) {
RunMessageLoopUntilResponse();
CHECK(function->response_type());
EXPECT_EQ(ExtensionFunction::FAILED, *function->response_type());
return function->GetError();
}
- base::Value* WaitForSingleResult(UIThreadExtensionFunction* function) {
+ base::Value* WaitForSingleResult(ExtensionFunction* function) {
RunMessageLoopUntilResponse();
EXPECT_TRUE(function->GetError().empty())
<< "Unexpected error: " << function->GetError();
@@ -140,18 +140,17 @@
class AsyncExtensionBrowserTest : public ExtensionBrowserTest {
protected:
// Provide wrappers of AsynchronousFunctionRunner for convenience.
- void RunFunctionAsync(UIThreadExtensionFunction* function,
- const std::string& args) {
+ void RunFunctionAsync(ExtensionFunction* function, const std::string& args) {
async_function_runner_ = std::make_unique<AsyncFunctionRunner>();
async_function_runner_->RunFunctionAsync(function, args,
browser()->profile());
}
- std::string WaitForError(UIThreadExtensionFunction* function) {
+ std::string WaitForError(ExtensionFunction* function) {
return async_function_runner_->WaitForError(function);
}
- base::Value* WaitForSingleResult(UIThreadExtensionFunction* function) {
+ base::Value* WaitForSingleResult(ExtensionFunction* function) {
return async_function_runner_->WaitForSingleResult(function);
}
diff --git a/chrome/browser/extensions/api/identity/identity_get_accounts_function.h b/chrome/browser/extensions/api/identity/identity_get_accounts_function.h
index a123670..1b8c765 100644
--- a/chrome/browser/extensions/api/identity/identity_get_accounts_function.h
+++ b/chrome/browser/extensions/api/identity/identity_get_accounts_function.h
@@ -10,7 +10,7 @@
namespace extensions {
-class IdentityGetAccountsFunction : public UIThreadExtensionFunction {
+class IdentityGetAccountsFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("identity.getAccounts", IDENTITY_GETACCOUNTS)
@@ -19,7 +19,7 @@
private:
~IdentityGetAccountsFunction() override;
- // UIThreadExtensionFunction implementation.
+ // ExtensionFunction implementation.
ExtensionFunction::ResponseAction Run() override;
};
diff --git a/chrome/browser/extensions/api/identity/identity_get_profile_user_info_function.h b/chrome/browser/extensions/api/identity/identity_get_profile_user_info_function.h
index f68ecc9..84edc0d 100644
--- a/chrome/browser/extensions/api/identity/identity_get_profile_user_info_function.h
+++ b/chrome/browser/extensions/api/identity/identity_get_profile_user_info_function.h
@@ -10,7 +10,7 @@
namespace extensions {
-class IdentityGetProfileUserInfoFunction : public UIThreadExtensionFunction {
+class IdentityGetProfileUserInfoFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("identity.getProfileUserInfo",
IDENTITY_GETPROFILEUSERINFO)
@@ -20,7 +20,7 @@
private:
~IdentityGetProfileUserInfoFunction() override;
- // UIThreadExtensionFunction implementation.
+ // ExtensionFunction implementation.
ExtensionFunction::ResponseAction Run() override;
};
diff --git a/chrome/browser/extensions/api/identity/identity_remove_cached_auth_token_function.h b/chrome/browser/extensions/api/identity/identity_remove_cached_auth_token_function.h
index 710c2eef..e99b464 100644
--- a/chrome/browser/extensions/api/identity/identity_remove_cached_auth_token_function.h
+++ b/chrome/browser/extensions/api/identity/identity_remove_cached_auth_token_function.h
@@ -10,7 +10,7 @@
namespace extensions {
-class IdentityRemoveCachedAuthTokenFunction : public UIThreadExtensionFunction {
+class IdentityRemoveCachedAuthTokenFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("identity.removeCachedAuthToken",
EXPERIMENTAL_IDENTITY_REMOVECACHEDAUTHTOKEN)
diff --git a/chrome/browser/extensions/api/idltest/idltest_api.h b/chrome/browser/extensions/api/idltest/idltest_api.h
index 48b5e9d..5219e3e 100644
--- a/chrome/browser/extensions/api/idltest/idltest_api.h
+++ b/chrome/browser/extensions/api/idltest/idltest_api.h
@@ -7,7 +7,7 @@
#include "extensions/browser/extension_function.h"
-class IdltestSendArrayBufferFunction : public UIThreadExtensionFunction {
+class IdltestSendArrayBufferFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("idltest.sendArrayBuffer", IDLTEST_SENDARRAYBUFFER)
@@ -16,7 +16,7 @@
ResponseAction Run() override;
};
-class IdltestSendArrayBufferViewFunction : public UIThreadExtensionFunction {
+class IdltestSendArrayBufferViewFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("idltest.sendArrayBufferView",
IDLTEST_SENDARRAYBUFFERVIEW)
@@ -26,7 +26,7 @@
ResponseAction Run() override;
};
-class IdltestGetArrayBufferFunction : public UIThreadExtensionFunction {
+class IdltestGetArrayBufferFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("idltest.getArrayBuffer", IDLTEST_GETARRAYBUFFER)
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 78e9fce74..c3fc3b3 100644
--- a/chrome/browser/extensions/api/input_ime/input_ime_api.h
+++ b/chrome/browser/extensions/api/input_ime/input_ime_api.h
@@ -128,7 +128,7 @@
DISALLOW_COPY_AND_ASSIGN(InputImeEventRouterFactory);
};
-class InputImeKeyEventHandledFunction : public UIThreadExtensionFunction {
+class InputImeKeyEventHandledFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("input.ime.keyEventHandled",
INPUT_IME_KEYEVENTHANDLED)
@@ -136,11 +136,11 @@
protected:
~InputImeKeyEventHandledFunction() override {}
- // UIThreadExtensionFunction:
+ // ExtensionFunction:
ResponseAction Run() override;
};
-class InputImeSetCompositionFunction : public UIThreadExtensionFunction {
+class InputImeSetCompositionFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("input.ime.setComposition",
INPUT_IME_SETCOMPOSITION)
@@ -148,29 +148,29 @@
protected:
~InputImeSetCompositionFunction() override {}
- // UIThreadExtensionFunction:
+ // ExtensionFunction:
ResponseAction Run() override;
};
-class InputImeCommitTextFunction : public UIThreadExtensionFunction {
+class InputImeCommitTextFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("input.ime.commitText", INPUT_IME_COMMITTEXT)
protected:
~InputImeCommitTextFunction() override {}
- // UIThreadExtensionFunction:
+ // ExtensionFunction:
ResponseAction Run() override;
};
-class InputImeSendKeyEventsFunction : public UIThreadExtensionFunction {
+class InputImeSendKeyEventsFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("input.ime.sendKeyEvents", INPUT_IME_SENDKEYEVENTS)
protected:
~InputImeSendKeyEventsFunction() override {}
- // UIThreadExtensionFunction:
+ // ExtensionFunction:
ResponseAction Run() override;
};
diff --git a/chrome/browser/extensions/api/input_ime/input_ime_api_chromeos.h b/chrome/browser/extensions/api/input_ime/input_ime_api_chromeos.h
index 20a1830..c07e7259 100644
--- a/chrome/browser/extensions/api/input_ime/input_ime_api_chromeos.h
+++ b/chrome/browser/extensions/api/input_ime/input_ime_api_chromeos.h
@@ -21,7 +21,7 @@
namespace extensions {
-class InputImeClearCompositionFunction : public UIThreadExtensionFunction {
+class InputImeClearCompositionFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("input.ime.clearComposition",
INPUT_IME_CLEARCOMPOSITION)
@@ -33,8 +33,7 @@
ResponseAction Run() override;
};
-class InputImeSetCandidateWindowPropertiesFunction
- : public UIThreadExtensionFunction {
+class InputImeSetCandidateWindowPropertiesFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("input.ime.setCandidateWindowProperties",
INPUT_IME_SETCANDIDATEWINDOWPROPERTIES)
@@ -46,7 +45,7 @@
ResponseAction Run() override;
};
-class InputImeSetCandidatesFunction : public UIThreadExtensionFunction {
+class InputImeSetCandidatesFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("input.ime.setCandidates", INPUT_IME_SETCANDIDATES)
@@ -57,7 +56,7 @@
ResponseAction Run() override;
};
-class InputImeSetCursorPositionFunction : public UIThreadExtensionFunction {
+class InputImeSetCursorPositionFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("input.ime.setCursorPosition",
INPUT_IME_SETCURSORPOSITION)
@@ -69,7 +68,7 @@
ResponseAction Run() override;
};
-class InputImeSetMenuItemsFunction : public UIThreadExtensionFunction {
+class InputImeSetMenuItemsFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("input.ime.setMenuItems", INPUT_IME_SETMENUITEMS)
@@ -80,7 +79,7 @@
ResponseAction Run() override;
};
-class InputImeUpdateMenuItemsFunction : public UIThreadExtensionFunction {
+class InputImeUpdateMenuItemsFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("input.ime.updateMenuItems",
INPUT_IME_UPDATEMENUITEMS)
@@ -92,7 +91,7 @@
ResponseAction Run() override;
};
-class InputImeDeleteSurroundingTextFunction : public UIThreadExtensionFunction {
+class InputImeDeleteSurroundingTextFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("input.ime.deleteSurroundingText",
INPUT_IME_DELETESURROUNDINGTEXT)
@@ -103,7 +102,7 @@
ResponseAction Run() override;
};
-class InputImeHideInputViewFunction : public UIThreadExtensionFunction {
+class InputImeHideInputViewFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("input.ime.hideInputView",
INPUT_IME_HIDEINPUTVIEW)
@@ -111,19 +110,19 @@
protected:
~InputImeHideInputViewFunction() override {}
- // UIThreadExtensionFunction:
+ // ExtensionFunction:
ResponseAction Run() override;
};
class InputMethodPrivateNotifyImeMenuItemActivatedFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
public:
InputMethodPrivateNotifyImeMenuItemActivatedFunction() {}
protected:
~InputMethodPrivateNotifyImeMenuItemActivatedFunction() override {}
- // UIThreadExtensionFunction:
+ // ExtensionFunction:
ResponseAction Run() override;
private:
@@ -134,7 +133,7 @@
};
class InputMethodPrivateGetCompositionBoundsFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("inputMethodPrivate.getCompositionBounds",
INPUTMETHODPRIVATE_GETCOMPOSITIONBOUNDS)
diff --git a/chrome/browser/extensions/api/input_ime/input_ime_api_nonchromeos.h b/chrome/browser/extensions/api/input_ime/input_ime_api_nonchromeos.h
index 84f39eb..68e06c5 100644
--- a/chrome/browser/extensions/api/input_ime/input_ime_api_nonchromeos.h
+++ b/chrome/browser/extensions/api/input_ime/input_ime_api_nonchromeos.h
@@ -55,7 +55,7 @@
DISALLOW_COPY_AND_ASSIGN(InputImeEventRouter);
};
-class InputImeCreateWindowFunction : public UIThreadExtensionFunction {
+class InputImeCreateWindowFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("input.ime.createWindow", INPUT_IME_CREATEWINDOW)
@@ -66,7 +66,7 @@
ExtensionFunction::ResponseAction Run() override;
};
-class InputImeShowWindowFunction : public UIThreadExtensionFunction {
+class InputImeShowWindowFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("input.ime.showWindow", INPUT_IME_SHOWWINDOW)
@@ -77,7 +77,7 @@
ExtensionFunction::ResponseAction Run() override;
};
-class InputImeHideWindowFunction : public UIThreadExtensionFunction {
+class InputImeHideWindowFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("input.ime.hideWindow", INPUT_IME_HIDEWINDOW)
@@ -88,7 +88,7 @@
ExtensionFunction::ResponseAction Run() override;
};
-class InputImeActivateFunction : public UIThreadExtensionFunction {
+class InputImeActivateFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("input.ime.activate", INPUT_IME_ACTIVATE)
@@ -99,7 +99,7 @@
protected:
~InputImeActivateFunction() override {}
- // UIThreadExtensionFunction:
+ // ExtensionFunction:
ResponseAction Run() override;
private:
@@ -109,14 +109,14 @@
void OnPermissionBubbleFinished(ImeWarningBubblePermissionStatus status);
};
-class InputImeDeactivateFunction : public UIThreadExtensionFunction {
+class InputImeDeactivateFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("input.ime.deactivate", INPUT_IME_DEACTIVATE)
protected:
~InputImeDeactivateFunction() override {}
- // UIThreadExtensionFunction:
+ // ExtensionFunction:
ResponseAction Run() override;
};
diff --git a/chrome/browser/extensions/api/instance_id/instance_id_api.h b/chrome/browser/extensions/api/instance_id/instance_id_api.h
index ffd49612..33a0bb0 100644
--- a/chrome/browser/extensions/api/instance_id/instance_id_api.h
+++ b/chrome/browser/extensions/api/instance_id/instance_id_api.h
@@ -11,7 +11,7 @@
namespace extensions {
-class InstanceIDApiFunction : public UIThreadExtensionFunction {
+class InstanceIDApiFunction : public ExtensionFunction {
public:
InstanceIDApiFunction();
diff --git a/chrome/browser/extensions/api/language_settings_private/language_settings_private_api.h b/chrome/browser/extensions/api/language_settings_private/language_settings_private_api.h
index 951f544..2e745eb 100644
--- a/chrome/browser/extensions/api/language_settings_private/language_settings_private_api.h
+++ b/chrome/browser/extensions/api/language_settings_private/language_settings_private_api.h
@@ -14,7 +14,7 @@
// Implements the languageSettingsPrivate.getLanguageList method.
class LanguageSettingsPrivateGetLanguageListFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
public:
LanguageSettingsPrivateGetLanguageListFunction();
DECLARE_EXTENSION_FUNCTION("languageSettingsPrivate.getLanguageList",
@@ -33,8 +33,7 @@
};
// Implements the languageSettingsPrivate.enableLanguage method.
-class LanguageSettingsPrivateEnableLanguageFunction
- : public UIThreadExtensionFunction {
+class LanguageSettingsPrivateEnableLanguageFunction : public ExtensionFunction {
public:
LanguageSettingsPrivateEnableLanguageFunction();
DECLARE_EXTENSION_FUNCTION("languageSettingsPrivate.enableLanguage",
@@ -54,7 +53,7 @@
// Implements the languageSettingsPrivate.disableLanguage method.
class LanguageSettingsPrivateDisableLanguageFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
public:
LanguageSettingsPrivateDisableLanguageFunction();
DECLARE_EXTENSION_FUNCTION("languageSettingsPrivate.disableLanguage",
@@ -75,7 +74,7 @@
// Implements the languageSettingsPrivate.setEnableTranslationForLanguage
// method.
class LanguageSettingsPrivateSetEnableTranslationForLanguageFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
public:
LanguageSettingsPrivateSetEnableTranslationForLanguageFunction();
DECLARE_EXTENSION_FUNCTION(
@@ -95,8 +94,7 @@
};
// Implements the languageSettingsPrivate.moveLanguage method.
-class LanguageSettingsPrivateMoveLanguageFunction
- : public UIThreadExtensionFunction {
+class LanguageSettingsPrivateMoveLanguageFunction : public ExtensionFunction {
public:
LanguageSettingsPrivateMoveLanguageFunction();
DECLARE_EXTENSION_FUNCTION("languageSettingsPrivate.moveLanguage",
@@ -116,7 +114,7 @@
// Implements the languageSettingsPrivate.getSpellcheckDictionaryStatuses
// method.
class LanguageSettingsPrivateGetSpellcheckDictionaryStatusesFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
public:
LanguageSettingsPrivateGetSpellcheckDictionaryStatusesFunction();
DECLARE_EXTENSION_FUNCTION(
@@ -136,7 +134,7 @@
// Implements the languageSettingsPrivate.getSpellcheckWords method.
class LanguageSettingsPrivateGetSpellcheckWordsFunction
- : public UIThreadExtensionFunction,
+ : public ExtensionFunction,
public SpellcheckCustomDictionary::Observer {
public:
LanguageSettingsPrivateGetSpellcheckWordsFunction();
@@ -163,7 +161,7 @@
// Implements the languageSettingsPrivate.addSpellcheckWord method.
class LanguageSettingsPrivateAddSpellcheckWordFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
public:
LanguageSettingsPrivateAddSpellcheckWordFunction();
DECLARE_EXTENSION_FUNCTION("languageSettingsPrivate.addSpellcheckWord",
@@ -181,7 +179,7 @@
// Implements the languageSettingsPrivate.removeSpellcheckWord method.
class LanguageSettingsPrivateRemoveSpellcheckWordFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
public:
LanguageSettingsPrivateRemoveSpellcheckWordFunction();
DECLARE_EXTENSION_FUNCTION("languageSettingsPrivate.removeSpellcheckWord",
@@ -199,7 +197,7 @@
// Implements the languageSettingsPrivate.getTranslateTargetLanguage method.
class LanguageSettingsPrivateGetTranslateTargetLanguageFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
public:
LanguageSettingsPrivateGetTranslateTargetLanguageFunction();
DECLARE_EXTENSION_FUNCTION(
@@ -221,7 +219,7 @@
// Implements the languageSettingsPrivate.getInputMethodLists method.
class LanguageSettingsPrivateGetInputMethodListsFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
public:
LanguageSettingsPrivateGetInputMethodListsFunction();
DECLARE_EXTENSION_FUNCTION("languageSettingsPrivate.getInputMethodLists",
@@ -238,8 +236,7 @@
};
// Implements the languageSettingsPrivate.addInputMethod method.
-class LanguageSettingsPrivateAddInputMethodFunction
- : public UIThreadExtensionFunction {
+class LanguageSettingsPrivateAddInputMethodFunction : public ExtensionFunction {
public:
LanguageSettingsPrivateAddInputMethodFunction();
DECLARE_EXTENSION_FUNCTION("languageSettingsPrivate.addInputMethod",
@@ -259,7 +256,7 @@
// Implements the languageSettingsPrivate.removeInputMethod method.
class LanguageSettingsPrivateRemoveInputMethodFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
public:
LanguageSettingsPrivateRemoveInputMethodFunction();
DECLARE_EXTENSION_FUNCTION("languageSettingsPrivate.removeInputMethod",
@@ -279,7 +276,7 @@
// Implements the languageSettingsPrivate.retryDownloadDictionary method.
class LanguageSettingsPrivateRetryDownloadDictionaryFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
public:
LanguageSettingsPrivateRetryDownloadDictionaryFunction();
DECLARE_EXTENSION_FUNCTION("languageSettingsPrivate.retryDownloadDictionary",
diff --git a/chrome/browser/extensions/api/management/management_api_unittest.cc b/chrome/browser/extensions/api/management/management_api_unittest.cc
index 9b7ea704..aa72733 100644
--- a/chrome/browser/extensions/api/management/management_api_unittest.cc
+++ b/chrome/browser/extensions/api/management/management_api_unittest.cc
@@ -62,7 +62,7 @@
// A wrapper around extension_function_test_utils::RunFunction that runs with
// the associated browser, no flags, and can take stack-allocated arguments.
- bool RunFunction(const scoped_refptr<UIThreadExtensionFunction>& function,
+ bool RunFunction(const scoped_refptr<ExtensionFunction>& function,
const base::ListValue& args);
Browser* browser() { return browser_.get(); }
@@ -80,7 +80,7 @@
};
bool ManagementApiUnitTest::RunFunction(
- const scoped_refptr<UIThreadExtensionFunction>& function,
+ const scoped_refptr<ExtensionFunction>& function,
const base::ListValue& args) {
return extension_function_test_utils::RunFunction(
function.get(), base::WrapUnique(args.DeepCopy()), browser(),
@@ -271,7 +271,7 @@
ScopedTestDialogAutoConfirm::ACCEPT);
// Uninstall requires a user gesture, so this should fail.
- scoped_refptr<UIThreadExtensionFunction> function(
+ scoped_refptr<ExtensionFunction> function(
new ManagementUninstallFunction());
EXPECT_FALSE(RunFunction(function, uninstall_args));
EXPECT_EQ(std::string(constants::kGestureNeededForUninstallError),
@@ -295,7 +295,7 @@
ExtensionFunction::ScopedUserGestureForTests scoped_user_gesture;
service()->AddExtension(extension.get());
- scoped_refptr<UIThreadExtensionFunction> function =
+ scoped_refptr<ExtensionFunction> function =
new ManagementUninstallFunction();
EXPECT_TRUE(registry()->enabled_extensions().Contains(extension_id));
EXPECT_FALSE(RunFunction(function, uninstall_args));
@@ -347,7 +347,7 @@
ScopedTestDialogAutoConfirm::CANCEL);
ExtensionFunction::ScopedUserGestureForTests scoped_user_gesture;
- scoped_refptr<UIThreadExtensionFunction> function(
+ scoped_refptr<ExtensionFunction> function(
new ManagementUninstallFunction());
function->set_extension(triggering_extension);
EXPECT_TRUE(registry()->enabled_extensions().Contains(extension_id));
@@ -360,7 +360,7 @@
}
{
- scoped_refptr<UIThreadExtensionFunction> function(
+ scoped_refptr<ExtensionFunction> function(
new ManagementUninstallFunction());
function->set_extension(triggering_extension);
@@ -397,7 +397,7 @@
base::ListValue uninstall_args;
uninstall_args.AppendString(extension->id());
{
- scoped_refptr<UIThreadExtensionFunction> function(
+ scoped_refptr<ExtensionFunction> function(
new ManagementUninstallFunction());
function->set_extension(triggering_extension);
@@ -435,8 +435,7 @@
ScopedTestDialogAutoConfirm auto_confirm(ScopedTestDialogAutoConfirm::ACCEPT);
ExtensionFunction::ScopedUserGestureForTests scoped_user_gesture;
- scoped_refptr<UIThreadExtensionFunction> function(
- new ManagementUninstallFunction());
+ scoped_refptr<ExtensionFunction> function(new ManagementUninstallFunction());
base::ListValue uninstall_args;
uninstall_args.AppendString(id);
EXPECT_TRUE(RunFunction(function, uninstall_args)) << function->GetError();
@@ -452,7 +451,7 @@
service()->BlacklistExtensionForTest(id);
EXPECT_NE(nullptr, registry()->GetInstalledExtension(id));
- scoped_refptr<UIThreadExtensionFunction> function;
+ scoped_refptr<ExtensionFunction> function;
// Test enabling it.
{
@@ -486,7 +485,7 @@
const std::string args =
base::StringPrintf("[\"%s\"]", extension->id().c_str());
- scoped_refptr<UIThreadExtensionFunction> function;
+ scoped_refptr<ExtensionFunction> function;
// Initially the extension should show as enabled.
EXPECT_TRUE(registry()->enabled_extensions().Contains(extension->id()));
diff --git a/chrome/browser/extensions/api/mdns/mdns_api.h b/chrome/browser/extensions/api/mdns/mdns_api.h
index 19464a2e..dbfe3b4 100644
--- a/chrome/browser/extensions/api/mdns/mdns_api.h
+++ b/chrome/browser/extensions/api/mdns/mdns_api.h
@@ -118,7 +118,7 @@
DISALLOW_COPY_AND_ASSIGN(MDnsAPI);
};
-class MdnsForceDiscoveryFunction : public UIThreadExtensionFunction {
+class MdnsForceDiscoveryFunction : public ExtensionFunction {
public:
MdnsForceDiscoveryFunction();
@@ -126,7 +126,7 @@
~MdnsForceDiscoveryFunction() override;
private:
- // UIThreadExtensionFunction override.
+ // ExtensionFunction override.
ResponseAction Run() override;
DECLARE_EXTENSION_FUNCTION("mdns.forceDiscovery", MDNS_FORCEDISCOVERY)
diff --git a/chrome/browser/extensions/api/module/module.h b/chrome/browser/extensions/api/module/module.h
index de81de0d..cbdde20 100644
--- a/chrome/browser/extensions/api/module/module.h
+++ b/chrome/browser/extensions/api/module/module.h
@@ -16,7 +16,7 @@
const std::string& extension_id);
} // namespace extension
-class ExtensionSetUpdateUrlDataFunction : public UIThreadExtensionFunction {
+class ExtensionSetUpdateUrlDataFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("extension.setUpdateUrlData",
EXTENSION_SETUPDATEURLDATA)
@@ -28,8 +28,7 @@
ResponseAction Run() override;
};
-class ExtensionIsAllowedIncognitoAccessFunction
- : public UIThreadExtensionFunction {
+class ExtensionIsAllowedIncognitoAccessFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("extension.isAllowedIncognitoAccess",
EXTENSION_ISALLOWEDINCOGNITOACCESS)
@@ -41,8 +40,7 @@
ResponseAction Run() override;
};
-class ExtensionIsAllowedFileSchemeAccessFunction
- : public UIThreadExtensionFunction {
+class ExtensionIsAllowedFileSchemeAccessFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("extension.isAllowedFileSchemeAccess",
EXTENSION_ISALLOWEDFILESCHEMEACCESS)
diff --git a/chrome/browser/extensions/api/networking_cast_private/networking_cast_private_api.h b/chrome/browser/extensions/api/networking_cast_private/networking_cast_private_api.h
index 4f12d14..daf23fba 100644
--- a/chrome/browser/extensions/api/networking_cast_private/networking_cast_private_api.h
+++ b/chrome/browser/extensions/api/networking_cast_private/networking_cast_private_api.h
@@ -18,7 +18,7 @@
namespace extensions {
class NetworkingCastPrivateVerifyDestinationFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
public:
NetworkingCastPrivateVerifyDestinationFunction() {}
DECLARE_EXTENSION_FUNCTION("networking.castPrivate.verifyDestination",
@@ -38,7 +38,7 @@
};
class NetworkingCastPrivateVerifyAndEncryptDataFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
public:
NetworkingCastPrivateVerifyAndEncryptDataFunction() {}
DECLARE_EXTENSION_FUNCTION("networking.castPrivate.verifyAndEncryptData",
@@ -58,7 +58,7 @@
};
class NetworkingCastPrivateSetWifiTDLSEnabledStateFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
public:
NetworkingCastPrivateSetWifiTDLSEnabledStateFunction() {}
DECLARE_EXTENSION_FUNCTION("networking.castPrivate.setWifiTDLSEnabledState",
@@ -82,7 +82,7 @@
};
class NetworkingCastPrivateGetWifiTDLSStatusFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
public:
NetworkingCastPrivateGetWifiTDLSStatusFunction() {}
DECLARE_EXTENSION_FUNCTION("networking.castPrivate.getWifiTDLSStatus",
diff --git a/chrome/browser/extensions/api/omnibox/omnibox_api.h b/chrome/browser/extensions/api/omnibox/omnibox_api.h
index 27c7981..435ea64 100644
--- a/chrome/browser/extensions/api/omnibox/omnibox_api.h
+++ b/chrome/browser/extensions/api/omnibox/omnibox_api.h
@@ -74,7 +74,7 @@
DISALLOW_COPY_AND_ASSIGN(ExtensionOmniboxEventRouter);
};
-class OmniboxSendSuggestionsFunction : public UIThreadExtensionFunction {
+class OmniboxSendSuggestionsFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("omnibox.sendSuggestions", OMNIBOX_SENDSUGGESTIONS)
@@ -147,7 +147,7 @@
template <>
void BrowserContextKeyedAPIFactory<OmniboxAPI>::DeclareFactoryDependencies();
-class OmniboxSetDefaultSuggestionFunction : public UIThreadExtensionFunction {
+class OmniboxSetDefaultSuggestionFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("omnibox.setDefaultSuggestion",
OMNIBOX_SETDEFAULTSUGGESTION)
diff --git a/chrome/browser/extensions/api/passwords_private/passwords_private_api.h b/chrome/browser/extensions/api/passwords_private/passwords_private_api.h
index 5b94478..b9521497 100644
--- a/chrome/browser/extensions/api/passwords_private/passwords_private_api.h
+++ b/chrome/browser/extensions/api/passwords_private/passwords_private_api.h
@@ -17,7 +17,7 @@
namespace extensions {
class PasswordsPrivateRecordPasswordsPageAccessInSettingsFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
public:
PasswordsPrivateRecordPasswordsPageAccessInSettingsFunction() {}
DECLARE_EXTENSION_FUNCTION(
@@ -35,8 +35,7 @@
PasswordsPrivateRecordPasswordsPageAccessInSettingsFunction);
};
-class PasswordsPrivateChangeSavedPasswordFunction
- : public UIThreadExtensionFunction {
+class PasswordsPrivateChangeSavedPasswordFunction : public ExtensionFunction {
public:
PasswordsPrivateChangeSavedPasswordFunction() {}
DECLARE_EXTENSION_FUNCTION("passwordsPrivate.changeSavedPassword",
@@ -52,8 +51,7 @@
DISALLOW_COPY_AND_ASSIGN(PasswordsPrivateChangeSavedPasswordFunction);
};
-class PasswordsPrivateRemoveSavedPasswordFunction :
- public UIThreadExtensionFunction {
+class PasswordsPrivateRemoveSavedPasswordFunction : public ExtensionFunction {
public:
PasswordsPrivateRemoveSavedPasswordFunction() {}
DECLARE_EXTENSION_FUNCTION("passwordsPrivate.removeSavedPassword",
@@ -69,8 +67,8 @@
DISALLOW_COPY_AND_ASSIGN(PasswordsPrivateRemoveSavedPasswordFunction);
};
-class PasswordsPrivateRemovePasswordExceptionFunction :
- public UIThreadExtensionFunction {
+class PasswordsPrivateRemovePasswordExceptionFunction
+ : public ExtensionFunction {
public:
PasswordsPrivateRemovePasswordExceptionFunction() {}
DECLARE_EXTENSION_FUNCTION("passwordsPrivate.removePasswordException",
@@ -87,7 +85,7 @@
};
class PasswordsPrivateUndoRemoveSavedPasswordOrExceptionFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
public:
PasswordsPrivateUndoRemoveSavedPasswordOrExceptionFunction() {}
DECLARE_EXTENSION_FUNCTION(
@@ -105,8 +103,8 @@
PasswordsPrivateUndoRemoveSavedPasswordOrExceptionFunction);
};
-class PasswordsPrivateRequestPlaintextPasswordFunction :
- public UIThreadExtensionFunction {
+class PasswordsPrivateRequestPlaintextPasswordFunction
+ : public ExtensionFunction {
public:
PasswordsPrivateRequestPlaintextPasswordFunction() {}
DECLARE_EXTENSION_FUNCTION("passwordsPrivate.requestPlaintextPassword",
@@ -124,8 +122,7 @@
DISALLOW_COPY_AND_ASSIGN(PasswordsPrivateRequestPlaintextPasswordFunction);
};
-class PasswordsPrivateGetSavedPasswordListFunction
- : public UIThreadExtensionFunction {
+class PasswordsPrivateGetSavedPasswordListFunction : public ExtensionFunction {
public:
PasswordsPrivateGetSavedPasswordListFunction() {}
DECLARE_EXTENSION_FUNCTION("passwordsPrivate.getSavedPasswordList",
@@ -145,7 +142,7 @@
};
class PasswordsPrivateGetPasswordExceptionListFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
public:
PasswordsPrivateGetPasswordExceptionListFunction() {}
DECLARE_EXTENSION_FUNCTION("passwordsPrivate.getPasswordExceptionList",
@@ -164,8 +161,7 @@
DISALLOW_COPY_AND_ASSIGN(PasswordsPrivateGetPasswordExceptionListFunction);
};
-class PasswordsPrivateImportPasswordsFunction
- : public UIThreadExtensionFunction {
+class PasswordsPrivateImportPasswordsFunction : public ExtensionFunction {
public:
PasswordsPrivateImportPasswordsFunction() {}
DECLARE_EXTENSION_FUNCTION("passwordsPrivate.importPasswords",
@@ -181,8 +177,7 @@
DISALLOW_COPY_AND_ASSIGN(PasswordsPrivateImportPasswordsFunction);
};
-class PasswordsPrivateExportPasswordsFunction
- : public UIThreadExtensionFunction {
+class PasswordsPrivateExportPasswordsFunction : public ExtensionFunction {
public:
PasswordsPrivateExportPasswordsFunction() {}
DECLARE_EXTENSION_FUNCTION("passwordsPrivate.exportPasswords",
@@ -200,8 +195,7 @@
DISALLOW_COPY_AND_ASSIGN(PasswordsPrivateExportPasswordsFunction);
};
-class PasswordsPrivateCancelExportPasswordsFunction
- : public UIThreadExtensionFunction {
+class PasswordsPrivateCancelExportPasswordsFunction : public ExtensionFunction {
public:
PasswordsPrivateCancelExportPasswordsFunction() {}
DECLARE_EXTENSION_FUNCTION("passwordsPrivate.cancelExportPasswords",
@@ -218,7 +212,7 @@
};
class PasswordsPrivateRequestExportProgressStatusFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
public:
PasswordsPrivateRequestExportProgressStatusFunction() {}
DECLARE_EXTENSION_FUNCTION("passwordsPrivate.requestExportProgressStatus",
diff --git a/chrome/browser/extensions/api/permissions/permissions_api.h b/chrome/browser/extensions/api/permissions/permissions_api.h
index 87c04d9..e25d14c 100644
--- a/chrome/browser/extensions/api/permissions/permissions_api.h
+++ b/chrome/browser/extensions/api/permissions/permissions_api.h
@@ -16,7 +16,7 @@
namespace extensions {
// chrome.permissions.contains
-class PermissionsContainsFunction : public UIThreadExtensionFunction {
+class PermissionsContainsFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("permissions.contains", PERMISSIONS_CONTAINS)
@@ -28,7 +28,7 @@
};
// chrome.permissions.getAll
-class PermissionsGetAllFunction : public UIThreadExtensionFunction {
+class PermissionsGetAllFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("permissions.getAll", PERMISSIONS_GETALL)
@@ -40,7 +40,7 @@
};
// chrome.permissions.remove
-class PermissionsRemoveFunction : public UIThreadExtensionFunction {
+class PermissionsRemoveFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("permissions.remove", PERMISSIONS_REMOVE)
@@ -52,7 +52,7 @@
};
// chrome.permissions.request
-class PermissionsRequestFunction : public UIThreadExtensionFunction {
+class PermissionsRequestFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("permissions.request", PERMISSIONS_REQUEST)
diff --git a/chrome/browser/extensions/api/platform_keys/platform_keys_api.h b/chrome/browser/extensions/api/platform_keys/platform_keys_api.h
index b632e4e..4d1ece03 100644
--- a/chrome/browser/extensions/api/platform_keys/platform_keys_api.h
+++ b/chrome/browser/extensions/api/platform_keys/platform_keys_api.h
@@ -33,7 +33,7 @@
} // namespace platform_keys
class PlatformKeysInternalSelectClientCertificatesFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
private:
~PlatformKeysInternalSelectClientCertificatesFunction() override;
ResponseAction Run() override;
@@ -47,8 +47,7 @@
PLATFORMKEYSINTERNAL_SELECTCLIENTCERTIFICATES)
};
-class PlatformKeysInternalGetPublicKeyFunction
- : public UIThreadExtensionFunction {
+class PlatformKeysInternalGetPublicKeyFunction : public ExtensionFunction {
private:
~PlatformKeysInternalGetPublicKeyFunction() override;
ResponseAction Run() override;
@@ -57,7 +56,7 @@
PLATFORMKEYSINTERNAL_GETPUBLICKEY)
};
-class PlatformKeysInternalSignFunction : public UIThreadExtensionFunction {
+class PlatformKeysInternalSignFunction : public ExtensionFunction {
private:
~PlatformKeysInternalSignFunction() override;
ResponseAction Run() override;
@@ -71,7 +70,7 @@
};
class PlatformKeysVerifyTLSServerCertificateFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
private:
~PlatformKeysVerifyTLSServerCertificateFunction() override;
ResponseAction Run() override;
diff --git a/chrome/browser/extensions/api/preference/preference_api.h b/chrome/browser/extensions/api/preference/preference_api.h
index 80d27cc..086434a 100644
--- a/chrome/browser/extensions/api/preference/preference_api.h
+++ b/chrome/browser/extensions/api/preference/preference_api.h
@@ -175,7 +175,7 @@
// A base class to provide functionality common to the other *PreferenceFunction
// classes.
-class PreferenceFunction : public UIThreadExtensionFunction {
+class PreferenceFunction : public ExtensionFunction {
protected:
enum PermissionType { PERMISSION_TYPE_READ, PERMISSION_TYPE_WRITE };
diff --git a/chrome/browser/extensions/api/processes/processes_api.h b/chrome/browser/extensions/api/processes/processes_api.h
index f1ef0d68..f72d0525 100644
--- a/chrome/browser/extensions/api/processes/processes_api.h
+++ b/chrome/browser/extensions/api/processes/processes_api.h
@@ -110,9 +110,9 @@
////////////////////////////////////////////////////////////////////////////////
// This extension function returns the Process object for the renderer process
// currently in use by the specified Tab.
-class ProcessesGetProcessIdForTabFunction : public UIThreadExtensionFunction {
+class ProcessesGetProcessIdForTabFunction : public ExtensionFunction {
public:
- // UIThreadExtensionFunction:
+ // ExtensionFunction:
ExtensionFunction::ResponseAction Run() override;
DECLARE_EXTENSION_FUNCTION("processes.getProcessIdForTab",
@@ -128,9 +128,9 @@
// Using unique IDs instead of OS process IDs allows two advantages:
// * guaranteed uniqueness, since OS process IDs can be reused.
// * guards against killing non-Chrome processes.
-class ProcessesTerminateFunction : public UIThreadExtensionFunction {
+class ProcessesTerminateFunction : public ExtensionFunction {
public:
- // UIThreadExtensionFunction:
+ // ExtensionFunction:
ExtensionFunction::ResponseAction Run() override;
DECLARE_EXTENSION_FUNCTION("processes.terminate", PROCESSES_TERMINATE)
@@ -157,13 +157,13 @@
////////////////////////////////////////////////////////////////////////////////
// Extension function which returns a set of Process objects, containing the
// details corresponding to the process IDs supplied as input.
-class ProcessesGetProcessInfoFunction :
- public UIThreadExtensionFunction,
- public task_manager::TaskManagerObserver {
+class ProcessesGetProcessInfoFunction
+ : public ExtensionFunction,
+ public task_manager::TaskManagerObserver {
public:
ProcessesGetProcessInfoFunction();
- // UIThreadExtensionFunction:
+ // ExtensionFunction:
ExtensionFunction::ResponseAction Run() override;
// task_manager::TaskManagerObserver:
diff --git a/chrome/browser/extensions/api/resources_private/resources_private_api.h b/chrome/browser/extensions/api/resources_private/resources_private_api.h
index ce37f9dc..4440d65 100644
--- a/chrome/browser/extensions/api/resources_private/resources_private_api.h
+++ b/chrome/browser/extensions/api/resources_private/resources_private_api.h
@@ -10,7 +10,7 @@
namespace extensions {
-class ResourcesPrivateGetStringsFunction : public UIThreadExtensionFunction {
+class ResourcesPrivateGetStringsFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("resourcesPrivate.getStrings",
RESOURCESPRIVATE_GETSTRINGS)
diff --git a/chrome/browser/extensions/api/safe_browsing_private/safe_browsing_private_api.h b/chrome/browser/extensions/api/safe_browsing_private/safe_browsing_private_api.h
index d28ce05..13980a7 100644
--- a/chrome/browser/extensions/api/safe_browsing_private/safe_browsing_private_api.h
+++ b/chrome/browser/extensions/api/safe_browsing_private/safe_browsing_private_api.h
@@ -9,8 +9,7 @@
namespace extensions {
-class SafeBrowsingPrivateGetReferrerChainFunction
- : public UIThreadExtensionFunction {
+class SafeBrowsingPrivateGetReferrerChainFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("safeBrowsingPrivate.getReferrerChain",
SAFEBROWSINGPRIVATE_GETREFERRERCHAIN)
diff --git a/chrome/browser/extensions/api/sessions/sessions_api.h b/chrome/browser/extensions/api/sessions/sessions_api.h
index d859f64..6d177c1 100644
--- a/chrome/browser/extensions/api/sessions/sessions_api.h
+++ b/chrome/browser/extensions/api/sessions/sessions_api.h
@@ -27,7 +27,7 @@
class SessionId;
-class SessionsGetRecentlyClosedFunction : public UIThreadExtensionFunction {
+class SessionsGetRecentlyClosedFunction : public ExtensionFunction {
protected:
~SessionsGetRecentlyClosedFunction() override {}
ResponseAction Run() override;
@@ -43,7 +43,7 @@
const sessions::TabRestoreService::Entry& entry);
};
-class SessionsGetDevicesFunction : public UIThreadExtensionFunction {
+class SessionsGetDevicesFunction : public ExtensionFunction {
protected:
~SessionsGetDevicesFunction() override {}
ResponseAction Run() override;
@@ -64,7 +64,7 @@
const sync_sessions::SyncedSession* session);
};
-class SessionsRestoreFunction : public UIThreadExtensionFunction {
+class SessionsRestoreFunction : public ExtensionFunction {
protected:
~SessionsRestoreFunction() override {}
ResponseAction Run() override;
diff --git a/chrome/browser/extensions/api/settings_private/settings_private_api.h b/chrome/browser/extensions/api/settings_private/settings_private_api.h
index f9a377d..ec333f2 100644
--- a/chrome/browser/extensions/api/settings_private/settings_private_api.h
+++ b/chrome/browser/extensions/api/settings_private/settings_private_api.h
@@ -13,7 +13,7 @@
namespace extensions {
// Implements the chrome.settingsPrivate.setPref method.
-class SettingsPrivateSetPrefFunction : public UIThreadExtensionFunction {
+class SettingsPrivateSetPrefFunction : public ExtensionFunction {
public:
SettingsPrivateSetPrefFunction() {}
DECLARE_EXTENSION_FUNCTION("settingsPrivate.setPref", SETTINGSPRIVATE_SETPREF)
@@ -21,14 +21,14 @@
protected:
~SettingsPrivateSetPrefFunction() override;
- // UIThreadExtensionFunction overrides.
+ // ExtensionFunction overrides.
ResponseAction Run() override;
DISALLOW_COPY_AND_ASSIGN(SettingsPrivateSetPrefFunction);
};
// Implements the chrome.settingsPrivate.getAllPrefs method.
-class SettingsPrivateGetAllPrefsFunction : public UIThreadExtensionFunction {
+class SettingsPrivateGetAllPrefsFunction : public ExtensionFunction {
public:
SettingsPrivateGetAllPrefsFunction() {}
DECLARE_EXTENSION_FUNCTION("settingsPrivate.getAllPrefs",
@@ -37,14 +37,14 @@
protected:
~SettingsPrivateGetAllPrefsFunction() override;
- // UIThreadExtensionFunction overrides.
+ // ExtensionFunction overrides.
ResponseAction Run() override;
DISALLOW_COPY_AND_ASSIGN(SettingsPrivateGetAllPrefsFunction);
};
// Implements the chrome.settingsPrivate.getPref method.
-class SettingsPrivateGetPrefFunction : public UIThreadExtensionFunction {
+class SettingsPrivateGetPrefFunction : public ExtensionFunction {
public:
SettingsPrivateGetPrefFunction() {}
DECLARE_EXTENSION_FUNCTION("settingsPrivate.getPref", SETTINGSPRIVATE_GETPREF)
@@ -52,15 +52,14 @@
protected:
~SettingsPrivateGetPrefFunction() override;
- // UIThreadExtensionFunction overrides.
+ // ExtensionFunction overrides.
ResponseAction Run() override;
DISALLOW_COPY_AND_ASSIGN(SettingsPrivateGetPrefFunction);
};
// Implements the chrome.settingsPrivate.getDefaultZoom method.
-class SettingsPrivateGetDefaultZoomFunction
- : public UIThreadExtensionFunction {
+class SettingsPrivateGetDefaultZoomFunction : public ExtensionFunction {
public:
SettingsPrivateGetDefaultZoomFunction() {}
DECLARE_EXTENSION_FUNCTION("settingsPrivate.getDefaultZoom",
@@ -69,15 +68,14 @@
protected:
~SettingsPrivateGetDefaultZoomFunction() override;
- // UIThreadExtensionFunction overrides.
+ // ExtensionFunction overrides.
ResponseAction Run() override;
DISALLOW_COPY_AND_ASSIGN(SettingsPrivateGetDefaultZoomFunction);
};
// Implements the chrome.settingsPrivate.setDefaultZoom method.
-class SettingsPrivateSetDefaultZoomFunction
- : public UIThreadExtensionFunction {
+class SettingsPrivateSetDefaultZoomFunction : public ExtensionFunction {
public:
SettingsPrivateSetDefaultZoomFunction() {}
DECLARE_EXTENSION_FUNCTION("settingsPrivate.setDefaultZoom",
@@ -86,7 +84,7 @@
protected:
~SettingsPrivateSetDefaultZoomFunction() override;
- // UIThreadExtensionFunction overrides.
+ // ExtensionFunction overrides.
ResponseAction Run() override;
DISALLOW_COPY_AND_ASSIGN(SettingsPrivateSetDefaultZoomFunction);
diff --git a/chrome/browser/extensions/api/signed_in_devices/signed_in_devices_api.h b/chrome/browser/extensions/api/signed_in_devices/signed_in_devices_api.h
index b24066b..c46442ec 100644
--- a/chrome/browser/extensions/api/signed_in_devices/signed_in_devices_api.h
+++ b/chrome/browser/extensions/api/signed_in_devices/signed_in_devices_api.h
@@ -37,7 +37,7 @@
syncer::DeviceInfoTracker* device_tracker,
ExtensionPrefs* extension_prefs);
-class SignedInDevicesGetFunction : public UIThreadExtensionFunction {
+class SignedInDevicesGetFunction : public ExtensionFunction {
protected:
~SignedInDevicesGetFunction() override {}
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 b0bd25e..5b3ca7b 100644
--- a/chrome/browser/extensions/api/system_indicator/system_indicator_api.h
+++ b/chrome/browser/extensions/api/system_indicator/system_indicator_api.h
@@ -9,7 +9,7 @@
namespace extensions {
-class SystemIndicatorSetIconFunction : public UIThreadExtensionFunction {
+class SystemIndicatorSetIconFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("systemIndicator.setIcon", SYSTEMINDICATOR_SETICON)
@@ -19,7 +19,7 @@
~SystemIndicatorSetIconFunction() override {}
};
-class SystemIndicatorEnableFunction : public UIThreadExtensionFunction {
+class SystemIndicatorEnableFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("systemIndicator.enable", SYSTEMINDICATOR_ENABLE)
@@ -29,7 +29,7 @@
~SystemIndicatorEnableFunction() override {}
};
-class SystemIndicatorDisableFunction : public UIThreadExtensionFunction {
+class SystemIndicatorDisableFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("systemIndicator.disable", SYSTEMINDICATOR_DISABLE)
diff --git a/chrome/browser/extensions/api/system_private/system_private_api.h b/chrome/browser/extensions/api/system_private/system_private_api.h
index 5d6fb2bc..9c912f0 100644
--- a/chrome/browser/extensions/api/system_private/system_private_api.h
+++ b/chrome/browser/extensions/api/system_private/system_private_api.h
@@ -13,7 +13,7 @@
namespace extensions {
class SystemPrivateGetIncognitoModeAvailabilityFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("systemPrivate.getIncognitoModeAvailability",
SYSTEMPRIVATE_GETINCOGNITOMODEAVAILABILITY)
@@ -26,7 +26,7 @@
};
// API function which returns the status of system update.
-class SystemPrivateGetUpdateStatusFunction : public UIThreadExtensionFunction {
+class SystemPrivateGetUpdateStatusFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("systemPrivate.getUpdateStatus",
SYSTEMPRIVATE_GETUPDATESTATUS)
@@ -39,7 +39,7 @@
};
// API function which returns the Google API key.
-class SystemPrivateGetApiKeyFunction : public UIThreadExtensionFunction {
+class SystemPrivateGetApiKeyFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("systemPrivate.getApiKey", SYSTEMPRIVATE_GETAPIKEY)
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 2f3979b..15c0827e 100644
--- a/chrome/browser/extensions/api/tab_capture/tab_capture_api.h
+++ b/chrome/browser/extensions/api/tab_capture/tab_capture_api.h
@@ -22,7 +22,7 @@
// Extension ids for the chromecast.
extern const char* const kChromecastExtensionIds[6];
-class TabCaptureCaptureFunction : public UIThreadExtensionFunction {
+class TabCaptureCaptureFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("tabCapture.capture", TABCAPTURE_CAPTURE)
@@ -33,7 +33,7 @@
ResponseAction Run() final;
};
-class TabCaptureGetCapturedTabsFunction : public UIThreadExtensionFunction {
+class TabCaptureGetCapturedTabsFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("tabCapture.getCapturedTabs",
TABCAPTURE_GETCAPTUREDTABS)
@@ -45,7 +45,7 @@
ResponseAction Run() final;
};
-class TabCaptureCaptureOffscreenTabFunction : public UIThreadExtensionFunction {
+class TabCaptureCaptureOffscreenTabFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("tabCapture.captureOffscreenTab",
TABCAPTURE_CAPTUREOFFSCREENTAB)
@@ -62,7 +62,7 @@
ResponseAction Run() final;
};
-class TabCaptureGetMediaStreamIdFunction : public UIThreadExtensionFunction {
+class TabCaptureGetMediaStreamIdFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("tabCapture.getMediaStreamId",
TABCAPTURE_GETMEDIASTREAMID)
diff --git a/chrome/browser/extensions/api/tabs/tabs_api.cc b/chrome/browser/extensions/api/tabs/tabs_api.cc
index 03306fa..1e8ca806 100644
--- a/chrome/browser/extensions/api/tabs/tabs_api.cc
+++ b/chrome/browser/extensions/api/tabs/tabs_api.cc
@@ -148,7 +148,7 @@
return true;
}
-bool GetBrowserFromWindowID(UIThreadExtensionFunction* function,
+bool GetBrowserFromWindowID(ExtensionFunction* function,
int window_id,
Browser** browser,
std::string* error) {
@@ -182,10 +182,9 @@
// Gets the WebContents for |tab_id| if it is specified. Otherwise get the
// WebContents for the active tab in the |function|'s current window.
// Returns nullptr and fills |error| if failed.
-content::WebContents* GetTabsAPIDefaultWebContents(
- UIThreadExtensionFunction* function,
- int tab_id,
- std::string* error) {
+content::WebContents* GetTabsAPIDefaultWebContents(ExtensionFunction* function,
+ int tab_id,
+ std::string* error) {
content::WebContents* web_contents = nullptr;
if (tab_id != -1) {
// We assume this call leaves web_contents unchanged if it is unsuccessful.
diff --git a/chrome/browser/extensions/api/tabs/tabs_api.h b/chrome/browser/extensions/api/tabs/tabs_api.h
index 37c2da5..ed3aa53 100644
--- a/chrome/browser/extensions/api/tabs/tabs_api.h
+++ b/chrome/browser/extensions/api/tabs/tabs_api.h
@@ -44,27 +44,27 @@
api::tabs::ZoomSettings* zoom_settings);
// Windows
-class WindowsGetFunction : public UIThreadExtensionFunction {
+class WindowsGetFunction : public ExtensionFunction {
~WindowsGetFunction() override {}
ResponseAction Run() override;
DECLARE_EXTENSION_FUNCTION("windows.get", WINDOWS_GET)
};
-class WindowsGetCurrentFunction : public UIThreadExtensionFunction {
+class WindowsGetCurrentFunction : public ExtensionFunction {
~WindowsGetCurrentFunction() override {}
ResponseAction Run() override;
DECLARE_EXTENSION_FUNCTION("windows.getCurrent", WINDOWS_GETCURRENT)
};
-class WindowsGetLastFocusedFunction : public UIThreadExtensionFunction {
+class WindowsGetLastFocusedFunction : public ExtensionFunction {
~WindowsGetLastFocusedFunction() override {}
ResponseAction Run() override;
DECLARE_EXTENSION_FUNCTION("windows.getLastFocused", WINDOWS_GETLASTFOCUSED)
};
-class WindowsGetAllFunction : public UIThreadExtensionFunction {
+class WindowsGetAllFunction : public ExtensionFunction {
~WindowsGetAllFunction() override {}
ResponseAction Run() override;
DECLARE_EXTENSION_FUNCTION("windows.getAll", WINDOWS_GETALL)
};
-class WindowsCreateFunction : public UIThreadExtensionFunction {
+class WindowsCreateFunction : public ExtensionFunction {
~WindowsCreateFunction() override {}
ResponseAction Run() override;
// Returns whether the window should be created in incognito mode.
@@ -80,54 +80,54 @@
std::string* error);
DECLARE_EXTENSION_FUNCTION("windows.create", WINDOWS_CREATE)
};
-class WindowsUpdateFunction : public UIThreadExtensionFunction {
+class WindowsUpdateFunction : public ExtensionFunction {
~WindowsUpdateFunction() override {}
ResponseAction Run() override;
DECLARE_EXTENSION_FUNCTION("windows.update", WINDOWS_UPDATE)
};
-class WindowsRemoveFunction : public UIThreadExtensionFunction {
+class WindowsRemoveFunction : public ExtensionFunction {
~WindowsRemoveFunction() override {}
ResponseAction Run() override;
DECLARE_EXTENSION_FUNCTION("windows.remove", WINDOWS_REMOVE)
};
// Tabs
-class TabsGetFunction : public UIThreadExtensionFunction {
+class TabsGetFunction : public ExtensionFunction {
~TabsGetFunction() override {}
ResponseAction Run() override;
DECLARE_EXTENSION_FUNCTION("tabs.get", TABS_GET)
};
-class TabsGetCurrentFunction : public UIThreadExtensionFunction {
+class TabsGetCurrentFunction : public ExtensionFunction {
~TabsGetCurrentFunction() override {}
ResponseAction Run() override;
DECLARE_EXTENSION_FUNCTION("tabs.getCurrent", TABS_GETCURRENT)
};
-class TabsGetSelectedFunction : public UIThreadExtensionFunction {
+class TabsGetSelectedFunction : public ExtensionFunction {
~TabsGetSelectedFunction() override {}
ResponseAction Run() override;
DECLARE_EXTENSION_FUNCTION("tabs.getSelected", TABS_GETSELECTED)
};
-class TabsGetAllInWindowFunction : public UIThreadExtensionFunction {
+class TabsGetAllInWindowFunction : public ExtensionFunction {
~TabsGetAllInWindowFunction() override {}
ResponseAction Run() override;
DECLARE_EXTENSION_FUNCTION("tabs.getAllInWindow", TABS_GETALLINWINDOW)
};
-class TabsQueryFunction : public UIThreadExtensionFunction {
+class TabsQueryFunction : public ExtensionFunction {
~TabsQueryFunction() override {}
ResponseAction Run() override;
DECLARE_EXTENSION_FUNCTION("tabs.query", TABS_QUERY)
};
-class TabsCreateFunction : public UIThreadExtensionFunction {
+class TabsCreateFunction : public ExtensionFunction {
~TabsCreateFunction() override {}
ResponseAction Run() override;
DECLARE_EXTENSION_FUNCTION("tabs.create", TABS_CREATE)
};
-class TabsDuplicateFunction : public UIThreadExtensionFunction {
+class TabsDuplicateFunction : public ExtensionFunction {
~TabsDuplicateFunction() override {}
ResponseAction Run() override;
DECLARE_EXTENSION_FUNCTION("tabs.duplicate", TABS_DUPLICATE)
};
-class TabsHighlightFunction : public UIThreadExtensionFunction {
+class TabsHighlightFunction : public ExtensionFunction {
~TabsHighlightFunction() override {}
ResponseAction Run() override;
bool HighlightTab(TabStripModel* tabstrip,
@@ -137,7 +137,7 @@
std::string* error);
DECLARE_EXTENSION_FUNCTION("tabs.highlight", TABS_HIGHLIGHT)
};
-class TabsUpdateFunction : public UIThreadExtensionFunction {
+class TabsUpdateFunction : public ExtensionFunction {
public:
TabsUpdateFunction();
@@ -158,7 +158,7 @@
DECLARE_EXTENSION_FUNCTION("tabs.update", TABS_UPDATE)
};
-class TabsMoveFunction : public UIThreadExtensionFunction {
+class TabsMoveFunction : public ExtensionFunction {
~TabsMoveFunction() override {}
ResponseAction Run() override;
bool MoveTab(int tab_id,
@@ -169,19 +169,19 @@
std::string* error);
DECLARE_EXTENSION_FUNCTION("tabs.move", TABS_MOVE)
};
-class TabsReloadFunction : public UIThreadExtensionFunction {
+class TabsReloadFunction : public ExtensionFunction {
~TabsReloadFunction() override {}
ResponseAction Run() override;
DECLARE_EXTENSION_FUNCTION("tabs.reload", TABS_RELOAD)
};
-class TabsRemoveFunction : public UIThreadExtensionFunction {
+class TabsRemoveFunction : public ExtensionFunction {
~TabsRemoveFunction() override {}
ResponseAction Run() override;
bool RemoveTab(int tab_id, std::string* error);
DECLARE_EXTENSION_FUNCTION("tabs.remove", TABS_REMOVE)
};
class TabsDetectLanguageFunction
- : public UIThreadExtensionFunction,
+ : public ExtensionFunction,
public content::WebContentsObserver,
public translate::ContentTranslateDriver::Observer {
private:
@@ -209,7 +209,7 @@
class TabsCaptureVisibleTabFunction
: public extensions::WebContentsCaptureClient,
- public UIThreadExtensionFunction {
+ public ExtensionFunction {
public:
TabsCaptureVisibleTabFunction();
static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
@@ -280,7 +280,7 @@
DECLARE_EXTENSION_FUNCTION("tabs.insertCSS", TABS_INSERTCSS)
};
-class TabsSetZoomFunction : public UIThreadExtensionFunction {
+class TabsSetZoomFunction : public ExtensionFunction {
private:
~TabsSetZoomFunction() override {}
@@ -289,7 +289,7 @@
DECLARE_EXTENSION_FUNCTION("tabs.setZoom", TABS_SETZOOM)
};
-class TabsGetZoomFunction : public UIThreadExtensionFunction {
+class TabsGetZoomFunction : public ExtensionFunction {
private:
~TabsGetZoomFunction() override {}
@@ -298,7 +298,7 @@
DECLARE_EXTENSION_FUNCTION("tabs.getZoom", TABS_GETZOOM)
};
-class TabsSetZoomSettingsFunction : public UIThreadExtensionFunction {
+class TabsSetZoomSettingsFunction : public ExtensionFunction {
private:
~TabsSetZoomSettingsFunction() override {}
@@ -307,7 +307,7 @@
DECLARE_EXTENSION_FUNCTION("tabs.setZoomSettings", TABS_SETZOOMSETTINGS)
};
-class TabsGetZoomSettingsFunction : public UIThreadExtensionFunction {
+class TabsGetZoomSettingsFunction : public ExtensionFunction {
private:
~TabsGetZoomSettingsFunction() override {}
@@ -316,7 +316,7 @@
DECLARE_EXTENSION_FUNCTION("tabs.getZoomSettings", TABS_GETZOOMSETTINGS)
};
-class TabsDiscardFunction : public UIThreadExtensionFunction {
+class TabsDiscardFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("tabs.discard", TABS_DISCARD)
@@ -331,7 +331,7 @@
DISALLOW_COPY_AND_ASSIGN(TabsDiscardFunction);
};
-class TabsGoForwardFunction : public UIThreadExtensionFunction {
+class TabsGoForwardFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("tabs.goForward", TABS_GOFORWARD)
@@ -346,7 +346,7 @@
DISALLOW_COPY_AND_ASSIGN(TabsGoForwardFunction);
};
-class TabsGoBackFunction : public UIThreadExtensionFunction {
+class TabsGoBackFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("tabs.goBack", TABS_GOBACK)
diff --git a/chrome/browser/extensions/api/tabs/tabs_test.cc b/chrome/browser/extensions/api/tabs/tabs_test.cc
index b6f0fe9f28..f5fb1424 100644
--- a/chrome/browser/extensions/api/tabs/tabs_test.cc
+++ b/chrome/browser/extensions/api/tabs/tabs_test.cc
@@ -795,7 +795,7 @@
int GetTabId(const base::DictionaryValue* value) const;
- base::Value* RunFunction(UIThreadExtensionFunction* function,
+ base::Value* RunFunction(ExtensionFunction* function,
const std::string& params);
const Extension* extension() { return extension_.get(); }
@@ -880,7 +880,7 @@
}
base::Value* ExtensionWindowLastFocusedTest::RunFunction(
- UIThreadExtensionFunction* function,
+ ExtensionFunction* function,
const std::string& params) {
function->set_extension(extension_.get());
return utils::RunFunctionAndReturnSingleResult(function, params, browser());
diff --git a/chrome/browser/extensions/api/tabs/windows_util.cc b/chrome/browser/extensions/api/tabs/windows_util.cc
index 684183d..ae70d40 100644
--- a/chrome/browser/extensions/api/tabs/windows_util.cc
+++ b/chrome/browser/extensions/api/tabs/windows_util.cc
@@ -23,7 +23,7 @@
namespace windows_util {
-bool GetBrowserFromWindowID(UIThreadExtensionFunction* function,
+bool GetBrowserFromWindowID(ExtensionFunction* function,
int window_id,
extensions::WindowController::TypeFilter filter,
Browser** browser,
@@ -68,7 +68,7 @@
return true;
}
-bool CanOperateOnWindow(const UIThreadExtensionFunction* function,
+bool CanOperateOnWindow(const ExtensionFunction* function,
const extensions::WindowController* controller,
extensions::WindowController::TypeFilter filter) {
if (filter && !controller->MatchesFilter(filter))
diff --git a/chrome/browser/extensions/api/tabs/windows_util.h b/chrome/browser/extensions/api/tabs/windows_util.h
index f080d06..551e1bbbb 100644
--- a/chrome/browser/extensions/api/tabs/windows_util.h
+++ b/chrome/browser/extensions/api/tabs/windows_util.h
@@ -9,7 +9,7 @@
#include "chrome/browser/extensions/window_controller_list.h"
-class UIThreadExtensionFunction;
+class ExtensionFunction;
namespace extensions {
class WindowController;
@@ -19,7 +19,7 @@
// Populates |browser| for given |window_id|. If the window is not found,
// returns false and sets |error|.
-bool GetBrowserFromWindowID(UIThreadExtensionFunction* function,
+bool GetBrowserFromWindowID(ExtensionFunction* function,
int window_id,
extensions::WindowController::TypeFilter filter,
Browser** browser,
@@ -31,7 +31,7 @@
// kind of window (including app and devtools), otherwise it will
// return true only for normal browser windows as well as windows
// created by the extension.
-bool CanOperateOnWindow(const UIThreadExtensionFunction* function,
+bool CanOperateOnWindow(const ExtensionFunction* function,
const extensions::WindowController* controller,
extensions::WindowController::TypeFilter filter);
diff --git a/chrome/browser/extensions/api/terminal/terminal_private_api.h b/chrome/browser/extensions/api/terminal/terminal_private_api.h
index 601c34e..caf14dc1 100644
--- a/chrome/browser/extensions/api/terminal/terminal_private_api.h
+++ b/chrome/browser/extensions/api/terminal/terminal_private_api.h
@@ -13,8 +13,7 @@
namespace extensions {
// Opens new terminal process. Returns the new terminal id.
-class TerminalPrivateOpenTerminalProcessFunction
- : public UIThreadExtensionFunction {
+class TerminalPrivateOpenTerminalProcessFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("terminalPrivate.openTerminalProcess",
TERMINALPRIVATE_OPENTERMINALPROCESS)
@@ -43,7 +42,7 @@
// Send input to the terminal process specified by the terminal ID, which is set
// as an argument.
-class TerminalPrivateSendInputFunction : public UIThreadExtensionFunction {
+class TerminalPrivateSendInputFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("terminalPrivate.sendInput",
TERMINALPRIVATE_SENDINPUT)
@@ -60,8 +59,7 @@
};
// Closes terminal process.
-class TerminalPrivateCloseTerminalProcessFunction
- : public UIThreadExtensionFunction {
+class TerminalPrivateCloseTerminalProcessFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("terminalPrivate.closeTerminalProcess",
TERMINALPRIVATE_CLOSETERMINALPROCESS)
@@ -77,8 +75,7 @@
};
// Called by extension when terminal size changes.
-class TerminalPrivateOnTerminalResizeFunction
- : public UIThreadExtensionFunction {
+class TerminalPrivateOnTerminalResizeFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("terminalPrivate.onTerminalResize",
TERMINALPRIVATE_ONTERMINALRESIZE)
@@ -95,7 +92,7 @@
void RespondOnUIThread(bool success);
};
-class TerminalPrivateAckOutputFunction : public UIThreadExtensionFunction {
+class TerminalPrivateAckOutputFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("terminalPrivate.ackOutput",
TERMINALPRIVATE_ACKOUTPUT)
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 1b86893..0bcfa27 100644
--- a/chrome/browser/extensions/api/top_sites/top_sites_api.h
+++ b/chrome/browser/extensions/api/top_sites/top_sites_api.h
@@ -10,7 +10,7 @@
namespace extensions {
-class TopSitesGetFunction : public UIThreadExtensionFunction {
+class TopSitesGetFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("topSites.get", TOPSITES_GET)
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 d76a63e..99186382 100644
--- a/chrome/browser/extensions/api/web_navigation/web_navigation_api.h
+++ b/chrome/browser/extensions/api/web_navigation/web_navigation_api.h
@@ -179,14 +179,14 @@
};
// API function that returns the state of a given frame.
-class WebNavigationGetFrameFunction : public UIThreadExtensionFunction {
+class WebNavigationGetFrameFunction : public ExtensionFunction {
~WebNavigationGetFrameFunction() override {}
ResponseAction Run() override;
DECLARE_EXTENSION_FUNCTION("webNavigation.getFrame", WEBNAVIGATION_GETFRAME)
};
// API function that returns the states of all frames in a given tab.
-class WebNavigationGetAllFramesFunction : public UIThreadExtensionFunction {
+class WebNavigationGetAllFramesFunction : public ExtensionFunction {
~WebNavigationGetAllFramesFunction() override {}
ResponseAction Run() override;
DECLARE_EXTENSION_FUNCTION("webNavigation.getAllFrames",
diff --git a/chrome/browser/extensions/api/web_view/chrome_web_view_internal_api.h b/chrome/browser/extensions/api/web_view/chrome_web_view_internal_api.h
index 9ca71ed..b9f6354 100644
--- a/chrome/browser/extensions/api/web_view/chrome_web_view_internal_api.h
+++ b/chrome/browser/extensions/api/web_view/chrome_web_view_internal_api.h
@@ -17,7 +17,7 @@
namespace extensions {
class ChromeWebViewInternalContextMenusCreateFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("chromeWebViewInternal.contextMenusCreate",
WEBVIEWINTERNAL_CONTEXTMENUSCREATE)
@@ -26,7 +26,7 @@
protected:
~ChromeWebViewInternalContextMenusCreateFunction() override {}
- // UIThreadExtensionFunction implementation.
+ // ExtensionFunction implementation.
ResponseAction Run() override;
private:
@@ -34,7 +34,7 @@
};
class ChromeWebViewInternalContextMenusUpdateFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("chromeWebViewInternal.contextMenusUpdate",
WEBVIEWINTERNAL_CONTEXTMENUSUPDATE)
@@ -43,7 +43,7 @@
protected:
~ChromeWebViewInternalContextMenusUpdateFunction() override {}
- // UIThreadExtensionFunction implementation.
+ // ExtensionFunction implementation.
ResponseAction Run() override;
private:
@@ -51,7 +51,7 @@
};
class ChromeWebViewInternalContextMenusRemoveFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("chromeWebViewInternal.contextMenusRemove",
WEBVIEWINTERNAL_CONTEXTMENUSREMOVE)
@@ -60,7 +60,7 @@
protected:
~ChromeWebViewInternalContextMenusRemoveFunction() override {}
- // UIThreadExtensionFunction implementation.
+ // ExtensionFunction implementation.
ResponseAction Run() override;
private:
@@ -68,7 +68,7 @@
};
class ChromeWebViewInternalContextMenusRemoveAllFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("chromeWebViewInternal.contextMenusRemoveAll",
WEBVIEWINTERNAL_CONTEXTMENUSREMOVEALL)
@@ -77,7 +77,7 @@
protected:
~ChromeWebViewInternalContextMenusRemoveAllFunction() override {}
- // UIThreadExtensionFunction implementation.
+ // ExtensionFunction implementation.
ResponseAction Run() override;
private:
diff --git a/chrome/browser/extensions/api/webrtc_logging_private/webrtc_logging_private_api.cc b/chrome/browser/extensions/api/webrtc_logging_private/webrtc_logging_private_api.cc
index c79032d..8a6d956d 100644
--- a/chrome/browser/extensions/api/webrtc_logging_private/webrtc_logging_private_api.cc
+++ b/chrome/browser/extensions/api/webrtc_logging_private/webrtc_logging_private_api.cc
@@ -287,7 +287,7 @@
// Post a task since this is an asynchronous extension function.
// TODO(devlin): This is unneccessary; this should just be a
- // UIThreadExtensionFunction. Fix this.
+ // ExtensionFunction. Fix this.
base::PostTaskWithTraits(
FROM_HERE, {BrowserThread::UI},
base::BindOnce(
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 0e74942..72f6544 100644
--- a/chrome/browser/extensions/api/webstore_private/webstore_private_api.h
+++ b/chrome/browser/extensions/api/webstore_private/webstore_private_api.h
@@ -42,7 +42,7 @@
};
class WebstorePrivateBeginInstallWithManifest3Function
- : public UIThreadExtensionFunction,
+ : public ExtensionFunction,
public WebstoreInstallHelper::Delegate {
public:
DECLARE_EXTENSION_FUNCTION("webstorePrivate.beginInstallWithManifest3",
@@ -97,7 +97,7 @@
};
class WebstorePrivateCompleteInstallFunction
- : public UIThreadExtensionFunction,
+ : public ExtensionFunction,
public WebstoreInstaller::Delegate {
public:
DECLARE_EXTENSION_FUNCTION("webstorePrivate.completeInstall",
@@ -126,8 +126,7 @@
std::unique_ptr<ScopedActiveInstall> scoped_active_install_;
};
-class WebstorePrivateEnableAppLauncherFunction
- : public UIThreadExtensionFunction {
+class WebstorePrivateEnableAppLauncherFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("webstorePrivate.enableAppLauncher",
WEBSTOREPRIVATE_ENABLEAPPLAUNCHER)
@@ -143,8 +142,7 @@
ChromeExtensionFunctionDetails chrome_details_;
};
-class WebstorePrivateGetBrowserLoginFunction
- : public UIThreadExtensionFunction {
+class WebstorePrivateGetBrowserLoginFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("webstorePrivate.getBrowserLogin",
WEBSTOREPRIVATE_GETBROWSERLOGIN)
@@ -160,8 +158,7 @@
ChromeExtensionFunctionDetails chrome_details_;
};
-class WebstorePrivateGetStoreLoginFunction
- : public UIThreadExtensionFunction {
+class WebstorePrivateGetStoreLoginFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("webstorePrivate.getStoreLogin",
WEBSTOREPRIVATE_GETSTORELOGIN)
@@ -177,8 +174,7 @@
ChromeExtensionFunctionDetails chrome_details_;
};
-class WebstorePrivateSetStoreLoginFunction
- : public UIThreadExtensionFunction {
+class WebstorePrivateSetStoreLoginFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("webstorePrivate.setStoreLogin",
WEBSTOREPRIVATE_SETSTORELOGIN)
@@ -194,8 +190,7 @@
ChromeExtensionFunctionDetails chrome_details_;
};
-class WebstorePrivateGetWebGLStatusFunction
- : public UIThreadExtensionFunction {
+class WebstorePrivateGetWebGLStatusFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("webstorePrivate.getWebGLStatus",
WEBSTOREPRIVATE_GETWEBGLSTATUS)
@@ -213,8 +208,7 @@
scoped_refptr<content::GpuFeatureChecker> feature_checker_;
};
-class WebstorePrivateGetIsLauncherEnabledFunction
- : public UIThreadExtensionFunction {
+class WebstorePrivateGetIsLauncherEnabledFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("webstorePrivate.getIsLauncherEnabled",
WEBSTOREPRIVATE_GETISLAUNCHERENABLED)
@@ -230,8 +224,7 @@
void OnIsLauncherCheckCompleted(bool is_enabled);
};
-class WebstorePrivateIsInIncognitoModeFunction
- : public UIThreadExtensionFunction {
+class WebstorePrivateIsInIncognitoModeFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("webstorePrivate.isInIncognitoMode",
WEBSTOREPRIVATE_ISININCOGNITOMODEFUNCTION)
@@ -247,8 +240,7 @@
ChromeExtensionFunctionDetails chrome_details_;
};
-class WebstorePrivateLaunchEphemeralAppFunction
- : public UIThreadExtensionFunction {
+class WebstorePrivateLaunchEphemeralAppFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("webstorePrivate.launchEphemeralApp",
WEBSTOREPRIVATE_LAUNCHEPHEMERALAPP)
@@ -272,7 +264,7 @@
};
class WebstorePrivateGetEphemeralAppsEnabledFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("webstorePrivate.getEphemeralAppsEnabled",
WEBSTOREPRIVATE_GETEPHEMERALAPPSENABLED)
@@ -287,7 +279,7 @@
};
class WebstorePrivateIsPendingCustodianApprovalFunction
- : public UIThreadExtensionFunction {
+ : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("webstorePrivate.isPendingCustodianApproval",
WEBSTOREPRIVATE_ISPENDINGCUSTODIANAPPROVAL)
@@ -305,8 +297,7 @@
ChromeExtensionFunctionDetails chrome_details_;
};
-class WebstorePrivateGetReferrerChainFunction
- : public UIThreadExtensionFunction {
+class WebstorePrivateGetReferrerChainFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("webstorePrivate.getReferrerChain",
WEBSTOREPRIVATE_GETREFERRERCHAIN)
diff --git a/chrome/browser/extensions/chrome_extension_function.cc b/chrome/browser/extensions/chrome_extension_function.cc
index 587f441..db287d0 100644
--- a/chrome/browser/extensions/chrome_extension_function.cc
+++ b/chrome/browser/extensions/chrome_extension_function.cc
@@ -30,7 +30,7 @@
}
const std::string& ChromeAsyncExtensionFunction::GetError() const {
- return error_.empty() ? UIThreadExtensionFunction::GetError() : error_;
+ return error_.empty() ? ExtensionFunction::GetError() : error_;
}
void ChromeAsyncExtensionFunction::SendResponse(bool success) {
diff --git a/chrome/browser/extensions/chrome_extension_function.h b/chrome/browser/extensions/chrome_extension_function.h
index a21d33e..dba9bb2 100644
--- a/chrome/browser/extensions/chrome_extension_function.h
+++ b/chrome/browser/extensions/chrome_extension_function.h
@@ -14,10 +14,10 @@
// A chrome specific analog to AsyncExtensionFunction. This has access to a
// chrome Profile.
//
-// DEPRECATED: Inherit directly from UIThreadExtensionFunction.
+// DEPRECATED: Inherit directly from ExtensionFunction.
// Then if you need access to Chrome details, you can construct a
// ChromeExtensionFunctionDetails object within your function implementation.
-class ChromeAsyncExtensionFunction : public UIThreadExtensionFunction {
+class ChromeAsyncExtensionFunction : public ExtensionFunction {
public:
ChromeAsyncExtensionFunction();
@@ -56,7 +56,7 @@
private:
// If you're hitting a compile error here due to "final" - great! You're doing
- // the right thing, you just need to extend UIThreadExtensionFunction instead
+ // the right thing, you just need to extend ExtensionFunction instead
// of ChromeAsyncExtensionFunction.
ResponseAction Run() final;
diff --git a/chrome/browser/extensions/chrome_extension_function_details.cc b/chrome/browser/extensions/chrome_extension_function_details.cc
index d925583..4adaa2ec 100644
--- a/chrome/browser/extensions/chrome_extension_function_details.cc
+++ b/chrome/browser/extensions/chrome_extension_function_details.cc
@@ -21,9 +21,8 @@
#include "extensions/browser/extension_function_dispatcher.h"
ChromeExtensionFunctionDetails::ChromeExtensionFunctionDetails(
- UIThreadExtensionFunction* function)
- : function_(function) {
-}
+ ExtensionFunction* function)
+ : function_(function) {}
ChromeExtensionFunctionDetails::~ChromeExtensionFunctionDetails() {
}
diff --git a/chrome/browser/extensions/chrome_extension_function_details.h b/chrome/browser/extensions/chrome_extension_function_details.h
index be55786..79f6863 100644
--- a/chrome/browser/extensions/chrome_extension_function_details.h
+++ b/chrome/browser/extensions/chrome_extension_function_details.h
@@ -10,16 +10,16 @@
class Browser;
class Profile;
-class UIThreadExtensionFunction;
+class ExtensionFunction;
-// Provides Chrome-specific details to UIThreadExtensionFunction
+// Provides Chrome-specific details to ExtensionFunction
// implementations.
class ChromeExtensionFunctionDetails {
public:
// Constructs a new ChromeExtensionFunctionDetails instance for |function|.
// This instance does not own |function|. |function| must outlive this
// instance.
- explicit ChromeExtensionFunctionDetails(UIThreadExtensionFunction* function);
+ explicit ChromeExtensionFunctionDetails(ExtensionFunction* function);
~ChromeExtensionFunctionDetails();
Profile* GetProfile() const;
@@ -55,14 +55,14 @@
// - A browser with the same profile
gfx::NativeWindow GetNativeWindowForUI();
- // Returns a pointer to the associated UIThreadExtensionFunction
- UIThreadExtensionFunction* function() { return function_; }
- const UIThreadExtensionFunction* function() const { return function_; }
+ // Returns a pointer to the associated ExtensionFunction
+ ExtensionFunction* function() { return function_; }
+ const ExtensionFunction* function() const { return function_; }
private:
// The function for which these details have been created. Must outlive the
// ChromeExtensionFunctionDetails instance.
- UIThreadExtensionFunction* function_;
+ ExtensionFunction* function_;
DISALLOW_COPY_AND_ASSIGN(ChromeExtensionFunctionDetails);
};
diff --git a/chrome/browser/extensions/chrome_extension_function_unittest.cc b/chrome/browser/extensions/chrome_extension_function_unittest.cc
index 9d3fe1a..d5305a41 100644
--- a/chrome/browser/extensions/chrome_extension_function_unittest.cc
+++ b/chrome/browser/extensions/chrome_extension_function_unittest.cc
@@ -31,7 +31,7 @@
*did_respond = true;
}
-class ValidationFunction : public UIThreadExtensionFunction {
+class ValidationFunction : public ExtensionFunction {
public:
explicit ValidationFunction(bool should_succeed)
: should_succeed_(should_succeed), did_respond_(false) {
diff --git a/chrome/browser/extensions/extension_api_unittest.cc b/chrome/browser/extensions/extension_api_unittest.cc
index b28dfcad..ebc9dd9 100644
--- a/chrome/browser/extensions/extension_api_unittest.cc
+++ b/chrome/browser/extensions/extension_api_unittest.cc
@@ -29,7 +29,7 @@
}
std::unique_ptr<base::Value> ExtensionApiUnittest::RunFunctionAndReturnValue(
- UIThreadExtensionFunction* function,
+ ExtensionFunction* function,
const std::string& args) {
function->set_extension(extension());
return std::unique_ptr<base::Value>(
@@ -38,7 +38,7 @@
std::unique_ptr<base::DictionaryValue>
ExtensionApiUnittest::RunFunctionAndReturnDictionary(
- UIThreadExtensionFunction* function,
+ ExtensionFunction* function,
const std::string& args) {
base::Value* value = RunFunctionAndReturnValue(function, args).release();
base::DictionaryValue* dict = NULL;
@@ -53,7 +53,7 @@
}
std::unique_ptr<base::ListValue> ExtensionApiUnittest::RunFunctionAndReturnList(
- UIThreadExtensionFunction* function,
+ ExtensionFunction* function,
const std::string& args) {
base::Value* value = RunFunctionAndReturnValue(function, args).release();
base::ListValue* list = NULL;
@@ -68,13 +68,14 @@
}
std::string ExtensionApiUnittest::RunFunctionAndReturnError(
- UIThreadExtensionFunction* function, const std::string& args) {
+ ExtensionFunction* function,
+ const std::string& args) {
function->set_extension(extension());
return utils::RunFunctionAndReturnError(function, args, browser());
}
-void ExtensionApiUnittest::RunFunction(
- UIThreadExtensionFunction* function, const std::string& args) {
+void ExtensionApiUnittest::RunFunction(ExtensionFunction* function,
+ const std::string& args) {
RunFunctionAndReturnValue(function, args);
}
diff --git a/chrome/browser/extensions/extension_api_unittest.h b/chrome/browser/extensions/extension_api_unittest.h
index b4922eb..8ddb90b 100644
--- a/chrome/browser/extensions/extension_api_unittest.h
+++ b/chrome/browser/extensions/extension_api_unittest.h
@@ -17,7 +17,7 @@
class ListValue;
}
-class UIThreadExtensionFunction;
+class ExtensionFunction;
namespace extensions {
@@ -54,29 +54,28 @@
// Return the function result as a base::Value.
std::unique_ptr<base::Value> RunFunctionAndReturnValue(
- UIThreadExtensionFunction* function,
+ ExtensionFunction* function,
const std::string& args);
// Return the function result as a base::DictionaryValue, or NULL.
// This will EXPECT-fail if the result is not a DictionaryValue.
std::unique_ptr<base::DictionaryValue> RunFunctionAndReturnDictionary(
- UIThreadExtensionFunction* function,
+ ExtensionFunction* function,
const std::string& args);
// Return the function result as a base::ListValue, or NULL.
// This will EXPECT-fail if the result is not a ListValue.
std::unique_ptr<base::ListValue> RunFunctionAndReturnList(
- UIThreadExtensionFunction* function,
+ ExtensionFunction* function,
const std::string& args);
// Return an error thrown from the function, if one exists.
// This will EXPECT-fail if any result is returned from the function.
- std::string RunFunctionAndReturnError(
- UIThreadExtensionFunction* function, const std::string& args);
+ std::string RunFunctionAndReturnError(ExtensionFunction* function,
+ const std::string& args);
// Run the function and ignore any result.
- void RunFunction(
- UIThreadExtensionFunction* function, const std::string& args);
+ void RunFunction(ExtensionFunction* function, const std::string& args);
private:
// The Extension used when running API function calls.
diff --git a/chrome/browser/extensions/extension_function_test_utils.cc b/chrome/browser/extensions/extension_function_test_utils.cc
index edf3ff8..f6a0e27 100644
--- a/chrome/browser/extensions/extension_function_test_utils.cc
+++ b/chrome/browser/extensions/extension_function_test_utils.cc
@@ -83,14 +83,14 @@
return false;
}
-std::string RunFunctionAndReturnError(UIThreadExtensionFunction* function,
+std::string RunFunctionAndReturnError(ExtensionFunction* function,
const std::string& args,
Browser* browser) {
return RunFunctionAndReturnError(function, args, browser,
extensions::api_test_utils::NONE);
}
std::string RunFunctionAndReturnError(
- UIThreadExtensionFunction* function,
+ ExtensionFunction* function,
const std::string& args,
Browser* browser,
extensions::api_test_utils::RunFunctionFlags flags) {
@@ -106,15 +106,14 @@
return function->GetError();
}
-base::Value* RunFunctionAndReturnSingleResult(
- UIThreadExtensionFunction* function,
- const std::string& args,
- Browser* browser) {
+base::Value* RunFunctionAndReturnSingleResult(ExtensionFunction* function,
+ const std::string& args,
+ Browser* browser) {
return RunFunctionAndReturnSingleResult(function, args, browser,
extensions::api_test_utils::NONE);
}
base::Value* RunFunctionAndReturnSingleResult(
- UIThreadExtensionFunction* function,
+ ExtensionFunction* function,
const std::string& args,
Browser* browser,
extensions::api_test_utils::RunFunctionFlags flags) {
@@ -130,7 +129,7 @@
return NULL;
}
-bool RunFunction(UIThreadExtensionFunction* function,
+bool RunFunction(ExtensionFunction* function,
const std::string& args,
Browser* browser,
extensions::api_test_utils::RunFunctionFlags flags) {
@@ -140,7 +139,7 @@
return RunFunction(function, std::move(parsed_args), browser, flags);
}
-bool RunFunction(UIThreadExtensionFunction* function,
+bool RunFunction(ExtensionFunction* function,
std::unique_ptr<base::ListValue> args,
Browser* browser,
extensions::api_test_utils::RunFunctionFlags flags) {
diff --git a/chrome/browser/extensions/extension_function_test_utils.h b/chrome/browser/extensions/extension_function_test_utils.h
index 27976b63..b6b70f7b 100644
--- a/chrome/browser/extensions/extension_function_test_utils.h
+++ b/chrome/browser/extensions/extension_function_test_utils.h
@@ -12,7 +12,7 @@
#include "extensions/common/manifest.h"
class Browser;
-class UIThreadExtensionFunction;
+class ExtensionFunction;
namespace base {
class Value;
@@ -43,11 +43,11 @@
// the current test if |function| returns a result. Takes ownership of
// |function|.
std::string RunFunctionAndReturnError(
- UIThreadExtensionFunction* function,
+ ExtensionFunction* function,
const std::string& args,
Browser* browser,
extensions::api_test_utils::RunFunctionFlags flags);
-std::string RunFunctionAndReturnError(UIThreadExtensionFunction* function,
+std::string RunFunctionAndReturnError(ExtensionFunction* function,
const std::string& args,
Browser* browser);
@@ -55,14 +55,13 @@
// current test if |function| returns an error. Takes ownership of
// |function|. The caller takes ownership of the result.
base::Value* RunFunctionAndReturnSingleResult(
- UIThreadExtensionFunction* function,
+ ExtensionFunction* function,
const std::string& args,
Browser* browser,
extensions::api_test_utils::RunFunctionFlags flags);
-base::Value* RunFunctionAndReturnSingleResult(
- UIThreadExtensionFunction* function,
- const std::string& args,
- Browser* browser);
+base::Value* RunFunctionAndReturnSingleResult(ExtensionFunction* function,
+ const std::string& args,
+ Browser* browser);
// Create and run |function| with |args|. Works with both synchronous and async
// functions. Ownership of |function| remains with the caller.
@@ -74,11 +73,11 @@
// TODO(aa): I'm concerned that this style won't scale to all the bits and bobs
// we're going to need to frob for all the different extension functions. But
// we can refactor when we see what is needed.
-bool RunFunction(UIThreadExtensionFunction* function,
+bool RunFunction(ExtensionFunction* function,
const std::string& args,
Browser* browser,
extensions::api_test_utils::RunFunctionFlags flags);
-bool RunFunction(UIThreadExtensionFunction* function,
+bool RunFunction(ExtensionFunction* function,
std::unique_ptr<base::ListValue> args,
Browser* browser,
extensions::api_test_utils::RunFunctionFlags flags);
diff --git a/chrome/browser/extensions/extension_tab_util.cc b/chrome/browser/extensions/extension_tab_util.cc
index d508ef4..18b81d0 100644
--- a/chrome/browser/extensions/extension_tab_util.cc
+++ b/chrome/browser/extensions/extension_tab_util.cc
@@ -129,11 +129,10 @@
// Opens a new tab for a given extension. Returns nullptr and sets |error| if an
// error occurs.
-base::DictionaryValue* ExtensionTabUtil::OpenTab(
- UIThreadExtensionFunction* function,
- const OpenTabParams& params,
- bool user_gesture,
- std::string* error) {
+base::DictionaryValue* ExtensionTabUtil::OpenTab(ExtensionFunction* function,
+ const OpenTabParams& params,
+ bool user_gesture,
+ std::string* error) {
ChromeExtensionFunctionDetails chrome_details(function);
Profile* profile = chrome_details.GetProfile();
// windowId defaults to "current" window.
diff --git a/chrome/browser/extensions/extension_tab_util.h b/chrome/browser/extensions/extension_tab_util.h
index f255bc7c..c873ae0176 100644
--- a/chrome/browser/extensions/extension_tab_util.h
+++ b/chrome/browser/extensions/extension_tab_util.h
@@ -16,7 +16,7 @@
class ChromeExtensionFunctionDetails;
class GURL;
class TabStripModel;
-class UIThreadExtensionFunction;
+class ExtensionFunction;
namespace base {
class DictionaryValue;
@@ -75,7 +75,7 @@
// Opens a new tab given an extension function |function| and creation
// parameters |params|. Returns a Tab object if successful, or NULL and
// optionally sets |error| if an error occurs.
- static base::DictionaryValue* OpenTab(UIThreadExtensionFunction* function,
+ static base::DictionaryValue* OpenTab(ExtensionFunction* function,
const OpenTabParams& params,
bool user_gesture,
std::string* error);
diff --git a/chrome/browser/extensions/window_controller_list.cc b/chrome/browser/extensions/window_controller_list.cc
index d419073..74042cc 100644
--- a/chrome/browser/extensions/window_controller_list.cc
+++ b/chrome/browser/extensions/window_controller_list.cc
@@ -55,7 +55,7 @@
}
WindowController* WindowControllerList::FindWindowForFunctionByIdWithFilter(
- const UIThreadExtensionFunction* function,
+ const ExtensionFunction* function,
int id,
WindowController::TypeFilter filter) const {
for (auto iter = windows().begin(); iter != windows().end(); ++iter) {
@@ -69,13 +69,13 @@
}
WindowController* WindowControllerList::CurrentWindowForFunction(
- const UIThreadExtensionFunction* function) const {
+ const ExtensionFunction* function) const {
return CurrentWindowForFunctionWithFilter(function,
WindowController::kNoWindowFilter);
}
WindowController* WindowControllerList::CurrentWindowForFunctionWithFilter(
- const UIThreadExtensionFunction* function,
+ const ExtensionFunction* function,
WindowController::TypeFilter filter) const {
WindowController* result = nullptr;
// Returns either the focused window (if any), or the last window in the list.
diff --git a/chrome/browser/extensions/window_controller_list.h b/chrome/browser/extensions/window_controller_list.h
index 5081543f..47f978c 100644
--- a/chrome/browser/extensions/window_controller_list.h
+++ b/chrome/browser/extensions/window_controller_list.h
@@ -13,7 +13,7 @@
#include "base/observer_list.h"
#include "chrome/browser/extensions/window_controller.h"
-class UIThreadExtensionFunction;
+class ExtensionFunction;
namespace extensions {
@@ -36,19 +36,19 @@
// Returns a window matching the context the function was invoked in
// using |filter|.
WindowController* FindWindowForFunctionByIdWithFilter(
- const UIThreadExtensionFunction* function,
+ const ExtensionFunction* function,
int id,
WindowController::TypeFilter filter) const;
// Returns the focused or last added window matching the context the function
// was invoked in.
WindowController* CurrentWindowForFunction(
- const UIThreadExtensionFunction* function) const;
+ const ExtensionFunction* function) const;
// Returns the focused or last added window matching the context the function
// was invoked in using |filter|.
WindowController* CurrentWindowForFunctionWithFilter(
- const UIThreadExtensionFunction* function,
+ const ExtensionFunction* function,
WindowController::TypeFilter filter) const;
const ControllerList& windows() const { return windows_; }
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 9c358ea..c8c2a73 100644
--- a/chrome/browser/speech/extension_api/tts_engine_extension_api.h
+++ b/chrome/browser/speech/extension_api/tts_engine_extension_api.h
@@ -40,8 +40,7 @@
// Function that allows tts engines to update its list of supported voices at
// runtime.
-class ExtensionTtsEngineUpdateVoicesFunction
- : public UIThreadExtensionFunction {
+class ExtensionTtsEngineUpdateVoicesFunction : public ExtensionFunction {
private:
~ExtensionTtsEngineUpdateVoicesFunction() override {}
ResponseAction Run() override;
@@ -50,8 +49,7 @@
// Hidden/internal extension function used to allow TTS engine extensions
// to send events back to the client that's calling tts.speak().
-class ExtensionTtsEngineSendTtsEventFunction
- : public UIThreadExtensionFunction {
+class ExtensionTtsEngineSendTtsEventFunction : public ExtensionFunction {
private:
~ExtensionTtsEngineSendTtsEventFunction() override {}
ResponseAction Run() override;
diff --git a/chrome/browser/speech/extension_api/tts_extension_api.h b/chrome/browser/speech/extension_api/tts_extension_api.h
index 7caeda6..db88b08 100644
--- a/chrome/browser/speech/extension_api/tts_extension_api.h
+++ b/chrome/browser/speech/extension_api/tts_extension_api.h
@@ -27,35 +27,35 @@
DECLARE_EXTENSION_FUNCTION("tts.speak", TTS_SPEAK)
};
-class TtsStopSpeakingFunction : public UIThreadExtensionFunction {
+class TtsStopSpeakingFunction : public ExtensionFunction {
private:
~TtsStopSpeakingFunction() override {}
ResponseAction Run() override;
DECLARE_EXTENSION_FUNCTION("tts.stop", TTS_STOP)
};
-class TtsPauseFunction : public UIThreadExtensionFunction {
+class TtsPauseFunction : public ExtensionFunction {
private:
~TtsPauseFunction() override {}
ResponseAction Run() override;
DECLARE_EXTENSION_FUNCTION("tts.pause", TTS_PAUSE)
};
-class TtsResumeFunction : public UIThreadExtensionFunction {
+class TtsResumeFunction : public ExtensionFunction {
private:
~TtsResumeFunction() override {}
ResponseAction Run() override;
DECLARE_EXTENSION_FUNCTION("tts.resume", TTS_RESUME)
};
-class TtsIsSpeakingFunction : public UIThreadExtensionFunction {
+class TtsIsSpeakingFunction : public ExtensionFunction {
private:
~TtsIsSpeakingFunction() override {}
ResponseAction Run() override;
DECLARE_EXTENSION_FUNCTION("tts.isSpeaking", TTS_ISSPEAKING)
};
-class TtsGetVoicesFunction : public UIThreadExtensionFunction {
+class TtsGetVoicesFunction : public ExtensionFunction {
private:
~TtsGetVoicesFunction() override {}
ResponseAction Run() override;