blob: 922e418e789403f12288cf17ab6795809884dd60 [file] [log] [blame]
Avi Drissman4e1b7bc32022-09-15 14:03:501// Copyright 2020 The Chromium Authors
danakj8de3b7492020-07-02 22:41:422// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "content/shell/browser/shell_platform_delegate.h"
6
Julie Jeongeun Kimec508272023-03-17 04:17:127#include "content/public/browser/file_select_listener.h"
danakj8de3b7492020-07-02 22:41:428#include "content/public/browser/javascript_dialog_manager.h"
Dave Tapuskab4998782020-10-08 17:22:479#include "content/public/browser/web_contents.h"
arthursonzogni75ede192021-07-06 14:45:4610#include "content/shell/browser/shell.h"
danakj8de3b7492020-07-02 22:41:4211
Jose Dapena Paz07023972023-08-21 18:25:3912#if !BUILDFLAG(IS_IOS)
13#include "content/public/browser/color_chooser.h"
14#endif
15
danakj8de3b7492020-07-02 22:41:4216namespace content {
17
18void ShellPlatformDelegate::DidCreateOrAttachWebContents(
19 Shell* shell,
20 WebContents* web_contents) {}
21
arthursonzogni75ede192021-07-06 14:45:4622void ShellPlatformDelegate::DidCloseLastWindow() {
23 Shell::Shutdown();
24}
25
danakj8de3b7492020-07-02 22:41:4226std::unique_ptr<JavaScriptDialogManager>
27ShellPlatformDelegate::CreateJavaScriptDialogManager(Shell* shell) {
28 return nullptr;
29}
30
Takumi Fujimoto4661871d2024-01-25 02:04:1831bool ShellPlatformDelegate::HandlePointerLockRequest(
Dave Tapuskab4998782020-10-08 17:22:4732 Shell* shell,
33 WebContents* web_contents,
34 bool user_gesture,
35 bool last_unlocked_by_target) {
36 return false;
37}
38
danakj8de3b7492020-07-02 22:41:4239bool ShellPlatformDelegate::ShouldAllowRunningInsecureContent(Shell* shell) {
40 return false;
41}
42
Julie Jeongeun Kim1f306fa42023-03-30 08:10:1743#if !BUILDFLAG(IS_IOS)
Julie Jeongeun Kim88ce9ec2023-07-28 02:25:4044std::unique_ptr<ColorChooser> ShellPlatformDelegate::OpenColorChooser(
45 WebContents* web_contents,
46 SkColor color,
47 const std::vector<blink::mojom::ColorSuggestionPtr>& suggestions) {
48 return nullptr;
49}
50
Julie Jeongeun Kimec508272023-03-17 04:17:1251void ShellPlatformDelegate::RunFileChooser(
52 RenderFrameHost* render_frame_host,
53 scoped_refptr<FileSelectListener> listener,
54 const blink::mojom::FileChooserParams& params) {
55 listener->FileSelectionCanceled();
56}
Julie Jeongeun Kim1f306fa42023-03-30 08:10:1757#endif
Julie Jeongeun Kimec508272023-03-17 04:17:1258
danakj8de3b7492020-07-02 22:41:4259} // namespace content