blob: 68590241568eb1d12c59f4d976aa257b7f512625 [file] [log] [blame]
[email protected]de7d61ff2013-08-20 11:30:411// Copyright 2013 The Chromium Authors. All rights reserved.
[email protected]5629e0c2011-09-12 22:07:362// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
[email protected]de7d61ff2013-08-20 11:30:415#ifndef CONTENT_SHELL_BROWSER_SHELL_CONTENT_BROWSER_CLIENT_H_
6#define CONTENT_SHELL_BROWSER_SHELL_CONTENT_BROWSER_CLIENT_H_
[email protected]5629e0c2011-09-12 22:07:367
dcheng6003e0b2016-04-09 18:42:348#include <memory>
[email protected]5629e0c2011-09-12 22:07:369#include <string>
10
Jun Caibc561f412018-02-28 18:41:3911#include "base/callback.h"
[email protected]5629e0c2011-09-12 22:07:3612#include "base/compiler_specific.h"
[email protected]57999812013-02-24 05:40:5213#include "base/files/file_path.h"
avi66a07722015-12-25 23:38:1214#include "build/build_config.h"
[email protected]87f3c082011-10-19 18:07:4415#include "content/public/browser/content_browser_client.h"
[email protected]9896c552013-08-29 19:03:2016#include "content/shell/browser/shell_speech_recognition_manager_delegate.h"
Ben Goodger6a695c012017-06-20 20:21:2017#include "services/service_manager/public/cpp/binder_registry.h"
[email protected]5629e0c2011-09-12 22:07:3618
19namespace content {
20
Jun Caibc561f412018-02-28 18:41:3921class ResourceDispatcherHostDelegate;
[email protected]147f8092012-03-21 11:47:4522class ShellBrowserContext;
[email protected]b0f146f2011-09-15 22:14:2523class ShellBrowserMainParts;
24
[email protected]7f5500872013-11-12 20:03:5425class ShellContentBrowserClient : public ContentBrowserClient {
[email protected]5629e0c2011-09-12 22:07:3626 public:
[email protected]eabbfb12013-04-05 23:28:3527 // Gets the current instance.
28 static ShellContentBrowserClient* Get();
29
[email protected]b0f146f2011-09-15 22:14:2530 ShellContentBrowserClient();
dchenge933b3e2014-10-21 11:44:0931 ~ShellContentBrowserClient() override;
[email protected]5629e0c2011-09-12 22:07:3632
[email protected]bdcf9152012-07-19 17:43:2133 // ContentBrowserClient overrides.
dchenge933b3e2014-10-21 11:44:0934 BrowserMainParts* CreateBrowserMainParts(
anand.ratn449f39a42014-10-06 13:45:5735 const MainFunctionParams& parameters) override;
nickd4106442015-12-08 21:53:1136 bool DoesSiteRequireDedicatedProcess(BrowserContext* browser_context,
nickdb193a12016-09-09 23:09:2337 const GURL& effective_site_url) override;
dchenge933b3e2014-10-21 11:44:0938 bool IsHandledURL(const GURL& url) override;
Ben Goodger6a695c012017-06-20 20:21:2039 void BindInterfaceRequestFromFrame(
40 content::RenderFrameHost* render_frame_host,
Ben Goodger6a695c012017-06-20 20:21:2041 const std::string& interface_name,
42 mojo::ScopedMessagePipeHandle interface_pipe) override;
Scott Violetb7f4df22018-05-17 04:43:1243 void RegisterInProcessServices(StaticServiceMap* services,
44 ServiceManagerConnection* connection) override;
bend32292b2016-10-07 00:21:5845 void RegisterOutOfProcessServices(OutOfProcessServiceMap* services) override;
James Cook5b2b3982017-10-17 03:04:2146 bool ShouldTerminateOnServiceQuit(
47 const service_manager::Identity& id) override;
ben6c7a8a72016-09-30 18:35:2148 std::unique_ptr<base::Value> GetServiceManifestOverlay(
sammc2b0375b2016-12-22 01:26:1749 base::StringPiece name) override;
dchenge933b3e2014-10-21 11:44:0950 void AppendExtraCommandLineSwitches(base::CommandLine* command_line,
51 int child_process_id) override;
Xiyuan Xiaaf075dbd2018-09-19 18:14:1252 void AdjustUtilityServiceProcessCommandLine(
53 const service_manager::Identity& identity,
54 base::CommandLine* command_line) override;
Matt Menkeeda739b2018-07-31 18:51:2855 std::string GetAcceptLangs(BrowserContext* context) override;
dchenge933b3e2014-10-21 11:44:0956 void ResourceDispatcherHostCreated() override;
dchenge933b3e2014-10-21 11:44:0957 std::string GetDefaultDownloadName() override;
58 WebContentsViewDelegate* GetWebContentsViewDelegate(
anand.ratn449f39a42014-10-06 13:45:5759 WebContents* web_contents) override;
dchenge933b3e2014-10-21 11:44:0960 QuotaPermissionContext* CreateQuotaPermissionContext() override;
michaeln10e5fc352017-02-07 02:07:58