summaryrefslogtreecommitdiffstats
path: root/src/core/extensions/extension_host_delegate_qt.h
blob: a9eed646201cc59cce46b30c16cc55dad31c151a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// Copyright (C) 2020 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only

#ifndef EXTENSION_HOST_DELEGATE_QT_H
#define EXTENSION_HOST_DELEGATE_QT_H

#include "extensions/browser/extension_host_delegate.h"

namespace extensions {

class ExtensionHostDelegateQt : public ExtensionHostDelegate
{
public:
    ExtensionHostDelegateQt();

    // EtensionHostDelegate implementation.
    void OnExtensionHostCreated(content::WebContents *web_contents) override;
    void OnMainFrameCreatedForBackgroundPage(ExtensionHost *host) override;
    content::JavaScriptDialogManager *GetJavaScriptDialogManager() override;
    void CreateTab(std::unique_ptr<content::WebContents> web_contents,
                   const std::string &extension_id,
                   WindowOpenDisposition disposition,
                   const gfx::Rect &initial_rect,
                   bool user_gesture) override;
    void ProcessMediaAccessRequest(content::WebContents *web_contents,
                                   const content::MediaStreamRequest &request,
                                   content::MediaResponseCallback callback,
                                   const Extension *extension) override;
    bool CheckMediaAccessPermission(content::RenderFrameHost *render_frame_host,
                                    const GURL &security_origin,
                                    blink::mojom::MediaStreamType type,
                                    const Extension *extension) override;
    content::PictureInPictureResult EnterPictureInPicture(content::WebContents *web_contents,
                                                          const viz::SurfaceId &surface_id,
                                                          const gfx::Size &natural_size) override;
    void ExitPictureInPicture() override;
};

} // namespace extensions

#endif // EXTENSION_HOST_DELEGATE_QT_H