feat: partially support chrome.tabs.update (#30069)
This commit is contained in:
parent
cce27a0961
commit
ceebae170e
7 changed files with 315 additions and 7 deletions
|
@ -88,6 +88,25 @@ class TabsGetZoomSettingsFunction : public ExtensionFunction {
|
|||
DECLARE_EXTENSION_FUNCTION("tabs.getZoomSettings", TABS_GETZOOMSETTINGS)
|
||||
};
|
||||
|
||||
class TabsUpdateFunction : public ExtensionFunction {
|
||||
public:
|
||||
TabsUpdateFunction();
|
||||
|
||||
protected:
|
||||
~TabsUpdateFunction() override {}
|
||||
bool UpdateURL(const std::string& url, int tab_id, std::string* error);
|
||||
ResponseValue GetResult();
|
||||
|
||||
content::WebContents* web_contents_;
|
||||
|
||||
private:
|
||||
ResponseAction Run() override;
|
||||
void OnExecuteCodeFinished(const std::string& error,
|
||||
const GURL& on_url,
|
||||
const base::ListValue& script_result);
|
||||
|
||||
DECLARE_EXTENSION_FUNCTION("tabs.update", TABS_UPDATE)
|
||||
};
|
||||
} // namespace extensions
|
||||
|
||||
#endif // SHELL_BROWSER_EXTENSIONS_API_TABS_TABS_API_H_
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue