blob: e938334400ddd001dd998197953ed663f317df7a [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
12namespace content {
13
14void ShellPlatformDelegate::DidCreateOrAttachWebContents(
15 Shell* shell,
16 WebContents* web_contents) {}
17
arthursonzogni75ede192021-07-06 14:45:4618void ShellPlatformDelegate::DidCloseLastWindow() {
19 Shell::Shutdown();
20}
21
danakj8de3b7492020-07-02 22:41:4222std::unique_ptr<JavaScriptDialogManager>
23ShellPlatformDelegate::CreateJavaScriptDialogManager(Shell* shell) {
24 return nullptr;
25}
26
Dave Tapuskab4998782020-10-08 17:22:4727bool ShellPlatformDelegate::HandleRequestToLockMouse(
28 Shell* shell,
29 WebContents* web_contents,
30 bool user_gesture,
31 bool last_unlocked_by_target) {
32 return false;
33}
34
danakj8de3b7492020-07-02 22:41:4235bool ShellPlatformDelegate::ShouldAllowRunningInsecureContent(Shell* shell) {
36 return false;
37}
38
Julie Jeongeun Kim1f306fa42023-03-30 08:10:1739#if !BUILDFLAG(IS_IOS)
Julie Jeongeun Kim88ce9ec2023-07-28 02:25:4040std::unique_ptr<ColorChooser> ShellPlatformDelegate::OpenColorChooser(
41 WebContents* web_contents,
42 SkColor color,
43 const std::vector<blink::mojom::ColorSuggestionPtr>& suggestions) {
44 return nullptr;
45}
46
Julie Jeongeun Kimec508272023-03-17 04:17:1247void ShellPlatformDelegate::RunFileChooser(
48 RenderFrameHost* render_frame_host,
49 scoped_refptr<FileSelectListener> listener,
50 const blink::mojom::FileChooserParams& params) {
51 listener->FileSelectionCanceled();
52}
Julie Jeongeun Kim1f306fa42023-03-30 08:10:1753#endif
Julie Jeongeun Kimec508272023-03-17 04:17:1254
danakj8de3b7492020-07-02 22:41:4255} // namespace content