| Index: chrome/browser/extensions/api/sessions/sessions_api.h
|
| diff --git a/chrome/browser/extensions/api/sessions/sessions_api.h b/chrome/browser/extensions/api/sessions/sessions_api.h
|
| index 6f8480581b6baef37ff842f8c0f4b3406adb6823..d859f6434bb1e6ff7d970f338b282288910f393d 100644
|
| --- a/chrome/browser/extensions/api/sessions/sessions_api.h
|
| +++ b/chrome/browser/extensions/api/sessions/sessions_api.h
|
| @@ -27,10 +27,10 @@ namespace extensions {
|
|
|
| class SessionId;
|
|
|
| -class SessionsGetRecentlyClosedFunction : public ChromeSyncExtensionFunction {
|
| +class SessionsGetRecentlyClosedFunction : public UIThreadExtensionFunction {
|
| protected:
|
| ~SessionsGetRecentlyClosedFunction() override {}
|
| - bool RunSync() override;
|
| + ResponseAction Run() override;
|
| DECLARE_EXTENSION_FUNCTION("sessions.getRecentlyClosed",
|
| SESSIONS_GETRECENTLYCLOSED)
|
|
|
| @@ -43,10 +43,10 @@ class SessionsGetRecentlyClosedFunction : public ChromeSyncExtensionFunction {
|
| const sessions::TabRestoreService::Entry& entry);
|
| };
|
|
|
| -class SessionsGetDevicesFunction : public ChromeSyncExtensionFunction {
|
| +class SessionsGetDevicesFunction : public UIThreadExtensionFunction {
|
| protected:
|
| ~SessionsGetDevicesFunction() override {}
|
| - bool RunSync() override;
|
| + ResponseAction Run() override;
|
| DECLARE_EXTENSION_FUNCTION("sessions.getDevices", SESSIONS_GETDEVICES)
|
|
|
| private:
|
| @@ -64,20 +64,20 @@ class SessionsGetDevicesFunction : public ChromeSyncExtensionFunction {
|
| const sync_sessions::SyncedSession* session);
|
| };
|
|
|
| -class SessionsRestoreFunction : public ChromeSyncExtensionFunction {
|
| +class SessionsRestoreFunction : public UIThreadExtensionFunction {
|
| protected:
|
| ~SessionsRestoreFunction() override {}
|
| - bool RunSync() override;
|
| + ResponseAction Run() override;
|
| DECLARE_EXTENSION_FUNCTION("sessions.restore", SESSIONS_RESTORE)
|
|
|
| private:
|
| - void SetInvalidIdError(const std::string& invalid_id);
|
| - void SetResultRestoredTab(content::WebContents* contents);
|
| - bool SetResultRestoredWindow(int window_id);
|
| - bool RestoreMostRecentlyClosed(Browser* browser);
|
| - bool RestoreLocalSession(const SessionId& session_id, Browser* browser);
|
| - bool RestoreForeignSession(const SessionId& session_id,
|
| - Browser* browser);
|
| + ResponseValue GetRestoredTabResult(content::WebContents* contents);
|
| + ResponseValue GetRestoredWindowResult(int window_id);
|
| + ResponseValue RestoreMostRecentlyClosed(Browser* browser);
|
| + ResponseValue RestoreLocalSession(const SessionId& session_id,
|
| + Browser* browser);
|
| + ResponseValue RestoreForeignSession(const SessionId& session_id,
|
| + Browser* browser);
|
| };
|
|
|
| class SessionsEventRouter : public sessions::TabRestoreServiceObserver {
|
|
|