OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef EXTENSIONS_SHELL_BROWSER_SHELL_CONTENT_BROWSER_CLIENT_H_ | 5 #ifndef EXTENSIONS_SHELL_BROWSER_SHELL_CONTENT_BROWSER_CLIENT_H_ |
6 #define EXTENSIONS_SHELL_BROWSER_SHELL_CONTENT_BROWSER_CLIENT_H_ | 6 #define EXTENSIONS_SHELL_BROWSER_SHELL_CONTENT_BROWSER_CLIENT_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "content/public/browser/content_browser_client.h" | 9 #include "content/public/browser/content_browser_client.h" |
10 | 10 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 net::URLRequestContextGetter* CreateRequestContext( | 45 net::URLRequestContextGetter* CreateRequestContext( |
46 content::BrowserContext* browser_context, | 46 content::BrowserContext* browser_context, |
47 content::ProtocolHandlerMap* protocol_handlers, | 47 content::ProtocolHandlerMap* protocol_handlers, |
48 content::URLRequestInterceptorScopedVector request_interceptors) override; | 48 content::URLRequestInterceptorScopedVector request_interceptors) override; |
49 // TODO(jamescook): Quota management? | 49 // TODO(jamescook): Quota management? |
50 bool IsHandledURL(const GURL& url) override; | 50 bool IsHandledURL(const GURL& url) override; |
51 void SiteInstanceGotProcess(content::SiteInstance* site_instance) override; | 51 void SiteInstanceGotProcess(content::SiteInstance* site_instance) override; |
52 void SiteInstanceDeleting(content::SiteInstance* site_instance) override; | 52 void SiteInstanceDeleting(content::SiteInstance* site_instance) override; |
53 void AppendExtraCommandLineSwitches(base::CommandLine* command_line, | 53 void AppendExtraCommandLineSwitches(base::CommandLine* command_line, |
54 int child_process_id) override; | 54 int child_process_id) override; |
| 55 void AppendMappedFileCommandLineSwitches( |
| 56 base::CommandLine* command_line) override; |
55 content::SpeechRecognitionManagerDelegate* | 57 content::SpeechRecognitionManagerDelegate* |
56 CreateSpeechRecognitionManagerDelegate() override; | 58 CreateSpeechRecognitionManagerDelegate() override; |
57 content::BrowserPpapiHost* GetExternalBrowserPpapiHost( | 59 content::BrowserPpapiHost* GetExternalBrowserPpapiHost( |
58 int plugin_process_id) override; | 60 int plugin_process_id) override; |
59 void GetAdditionalAllowedSchemesForFileSystem( | 61 void GetAdditionalAllowedSchemesForFileSystem( |
60 std::vector<std::string>* additional_schemes) override; | 62 std::vector<std::string>* additional_schemes) override; |
| 63 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
| 64 void GetAdditionalMappedFilesForChildProcess( |
| 65 const base::CommandLine& command_line, |
| 66 int child_process_id, |
| 67 content::FileDescriptorInfo* mappings) override; |
| 68 #endif |
| 69 |
61 content::DevToolsManagerDelegate* GetDevToolsManagerDelegate() override; | 70 content::DevToolsManagerDelegate* GetDevToolsManagerDelegate() override; |
62 | 71 |
63 protected: | 72 protected: |
64 // Subclasses may wish to provide their own ShellBrowserMainParts. | 73 // Subclasses may wish to provide their own ShellBrowserMainParts. |
65 virtual ShellBrowserMainParts* CreateShellBrowserMainParts( | 74 virtual ShellBrowserMainParts* CreateShellBrowserMainParts( |
66 const content::MainFunctionParams& parameters, | 75 const content::MainFunctionParams& parameters, |
67 ShellBrowserMainDelegate* browser_main_delegate); | 76 ShellBrowserMainDelegate* browser_main_delegate); |
68 | 77 |
69 private: | 78 private: |
70 // Appends command line switches for a renderer process. | 79 // Appends command line switches for a renderer process. |
71 void AppendRendererSwitches(base::CommandLine* command_line); | 80 void AppendRendererSwitches(base::CommandLine* command_line); |
72 | 81 |
73 // Returns the extension or app associated with |site_instance| or NULL. | 82 // Returns the extension or app associated with |site_instance| or NULL. |
74 const Extension* GetExtension(content::SiteInstance* site_instance); | 83 const Extension* GetExtension(content::SiteInstance* site_instance); |
75 | 84 |
| 85 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
| 86 base::ScopedFD v8_natives_fd_; |
| 87 base::ScopedFD v8_snapshot_fd_; |
| 88 bool natives_fd_exists() { return v8_natives_fd_ != -1; } |
| 89 bool snapshot_fd_exists() { return v8_snapshot_fd_ != -1; } |
| 90 #endif |
| 91 |
76 // Owned by content::BrowserMainLoop. | 92 // Owned by content::BrowserMainLoop. |
77 ShellBrowserMainParts* browser_main_parts_; | 93 ShellBrowserMainParts* browser_main_parts_; |
78 | 94 |
79 // Owned by ShellBrowserMainParts. | 95 // Owned by ShellBrowserMainParts. |
80 ShellBrowserMainDelegate* browser_main_delegate_; | 96 ShellBrowserMainDelegate* browser_main_delegate_; |
81 | 97 |
82 DISALLOW_COPY_AND_ASSIGN(ShellContentBrowserClient); | 98 DISALLOW_COPY_AND_ASSIGN(ShellContentBrowserClient); |
83 }; | 99 }; |
84 | 100 |
85 } // namespace extensions | 101 } // namespace extensions |
86 | 102 |
87 #endif // EXTENSIONS_SHELL_BROWSER_SHELL_CONTENT_BROWSER_CLIENT_H_ | 103 #endif // EXTENSIONS_SHELL_BROWSER_SHELL_CONTENT_BROWSER_CLIENT_H_ |
OLD | NEW |