2021-09-15 13:56:38 +00:00
|
|
|
// Copyright (c) 2021 Microsoft, Inc.
|
|
|
|
// Use of this source code is governed by the MIT license that can be
|
|
|
|
// found in the LICENSE file.
|
|
|
|
|
2021-11-22 07:34:31 +00:00
|
|
|
#ifndef ELECTRON_SHELL_BROWSER_FONT_ELECTRON_FONT_ACCESS_DELEGATE_H_
|
|
|
|
#define ELECTRON_SHELL_BROWSER_FONT_ELECTRON_FONT_ACCESS_DELEGATE_H_
|
2021-09-15 13:56:38 +00:00
|
|
|
|
|
|
|
#include <memory>
|
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
#include "content/public/browser/font_access_chooser.h"
|
|
|
|
#include "content/public/browser/font_access_delegate.h"
|
|
|
|
|
|
|
|
class ElectronFontAccessDelegate : public content::FontAccessDelegate {
|
|
|
|
public:
|
|
|
|
ElectronFontAccessDelegate();
|
|
|
|
~ElectronFontAccessDelegate() override;
|
|
|
|
|
2021-11-03 11:41:45 +00:00
|
|
|
// disable copy
|
|
|
|
ElectronFontAccessDelegate(const ElectronFontAccessDelegate&) = delete;
|
|
|
|
ElectronFontAccessDelegate& operator=(const ElectronFontAccessDelegate&) =
|
|
|
|
delete;
|
|
|
|
|
2021-09-15 13:56:38 +00:00
|
|
|
std::unique_ptr<content::FontAccessChooser> RunChooser(
|
|
|
|
content::RenderFrameHost* frame,
|
|
|
|
const std::vector<std::string>& selection,
|
|
|
|
content::FontAccessChooser::Callback callback) override;
|
|
|
|
};
|
|
|
|
|
2021-11-22 07:34:31 +00:00
|
|
|
#endif // ELECTRON_SHELL_BROWSER_FONT_ELECTRON_FONT_ACCESS_DELEGATE_H_
|