electron/shell/browser/extensions/electron_extensions_api_client.h
Eryk Rakowski 3745b76da8
feat(extensions): add support for some chrome.management APIs (#25098)
* fix: initialize management policy

* fix(extensions): crash when using chrome.management

* test: add tests

* docs: add a note about chrome.management

* fix: lint errors

* fix: lint errors

* fix: remove favicon_service include

* fix: add missing management permission

* docs: more supported apis

* fix: extensions.md line endings
2020-09-02 09:59:56 +09:00

36 lines
1.1 KiB
C++

// Copyright (c) 2019 Slack Technologies, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#ifndef SHELL_BROWSER_EXTENSIONS_ELECTRON_EXTENSIONS_API_CLIENT_H_
#define SHELL_BROWSER_EXTENSIONS_ELECTRON_EXTENSIONS_API_CLIENT_H_
#include <memory>
#include "extensions/browser/api/extensions_api_client.h"
namespace extensions {
class ElectronMessagingDelegate;
class ElectronExtensionsAPIClient : public ExtensionsAPIClient {
public:
ElectronExtensionsAPIClient();
~ElectronExtensionsAPIClient() override;
// ExtensionsAPIClient
MessagingDelegate* GetMessagingDelegate() override;
void AttachWebContentsHelpers(
content::WebContents* web_contents) const override;
std::unique_ptr<MimeHandlerViewGuestDelegate>
CreateMimeHandlerViewGuestDelegate(
MimeHandlerViewGuest* guest) const override;
ManagementAPIDelegate* CreateManagementAPIDelegate() const override;
private:
std::unique_ptr<ElectronMessagingDelegate> messaging_delegate_;
};
} // namespace extensions
#endif // SHELL_BROWSER_EXTENSIONS_ELECTRON_EXTENSIONS_API_CLIENT_H_