blob: 9ee3373f907959048a81e2645535dd70abb25d49 (
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef ASH_SHELL_CONTENT_CLIENT_SHELL_CONTENT_BROWSER_CLIENT_H_
#define ASH_SHELL_CONTENT_CLIENT_SHELL_CONTENT_BROWSER_CLIENT_H_
#include <string>
#include "base/compiler_specific.h"
#include "content/public/browser/content_browser_client.h"
namespace content {
class ShellBrowserContext;
class ShellBrowserMainParts;
class ShellResourceDispatcherHostDelegate;
}
namespace ash {
namespace shell {
class ShellBrowserMainParts;
class ShellContentBrowserClient : public content::ContentBrowserClient {
public:
ShellContentBrowserClient();
~ShellContentBrowserClient() override;
// Overridden from content::ContentBrowserClient:
content::BrowserMainParts* CreateBrowserMainParts(
const content::MainFunctionParams& parameters) override;
net::URLRequestContextGetter* CreateRequestContext(
content::BrowserContext* browser_context,
content::ProtocolHandlerMap* protocol_handlers,
content::URLRequestInterceptorScopedVector request_interceptors) override;
void AppendExtraCommandLineSwitches(base::CommandLine* command_line,
int child_process_id) override;
#if defined(OS_POSIX) && !defined(OS_MACOSX)
void GetAdditionalMappedFilesForChildProcess(
const base::CommandLine& command_line,
int child_process_id,
content::FileDescriptorInfo* mappings) override;
#endif
content::ShellBrowserContext* browser_context();
private:
#if defined(OS_POSIX) && !defined(OS_MACOSX)
base::ScopedFD v8_natives_fd_;
base::ScopedFD v8_snapshot_fd_;
#endif
ShellBrowserMainParts* shell_browser_main_parts_;
DISALLOW_COPY_AND_ASSIGN(ShellContentBrowserClient);
};
} // namespace shell
} // namespace ash
#endif // ASH_SHELL_CONTENT_CLIENT_SHELL_CONTENT_BROWSER_CLIENT_H_
|