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; | |
57 content::SpeechRecognitionManagerDelegate* | 55 content::SpeechRecognitionManagerDelegate* |
58 CreateSpeechRecognitionManagerDelegate() override; | 56 CreateSpeechRecognitionManagerDelegate() override; |
59 content::BrowserPpapiHost* GetExternalBrowserPpapiHost( | 57 content::BrowserPpapiHost* GetExternalBrowserPpapiHost( |
60 int plugin_process_id) override; | 58 int plugin_process_id) override; |
61 void GetAdditionalAllowedSchemesForFileSystem( | 59 void GetAdditionalAllowedSchemesForFileSystem( |
62 std::vector<std::string>* additional_schemes) override; | 60 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 | |
70 content::DevToolsManagerDelegate* GetDevToolsManagerDelegate() override; | 61 content::DevToolsManagerDelegate* GetDevToolsManagerDelegate() override; |
71 | 62 |
72 protected: | 63 protected: |
73 // Subclasses may wish to provide their own ShellBrowserMainParts. | 64 // Subclasses may wish to provide their own ShellBrowserMainParts. |
74 virtual ShellBrowserMainParts* CreateShellBrowserMainParts( | 65 virtual ShellBrowserMainParts* CreateShellBrowserMainParts( |
75 const content::MainFunctionParams& parameters, | 66 const content::MainFunctionParams& parameters, |
76 ShellBrowserMainDelegate* browser_main_delegate); | 67 ShellBrowserMainDelegate* browser_main_delegate); |
77 | 68 |
78 private: | 69 private: |
79 // Appends command line switches for a renderer process. | 70 // Appends command line switches for a renderer process. |
80 void AppendRendererSwitches(base::CommandLine* command_line); | 71 void AppendRendererSwitches(base::CommandLine* command_line); |
81 | 72 |
82 // Returns the extension or app associated with |site_instance| or NULL. | 73 // Returns the extension or app associated with |site_instance| or NULL. |
83 const Extension* GetExtension(content::SiteInstance* site_instance); | 74 const Extension* GetExtension(content::SiteInstance* site_instance); |
84 | 75 |
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 | |
92 // Owned by content::BrowserMainLoop. | 76 // Owned by content::BrowserMainLoop. |
93 ShellBrowserMainParts* browser_main_parts_; | 77 ShellBrowserMainParts* browser_main_parts_; |
94 | 78 |
95 // Owned by ShellBrowserMainParts. | 79 // Owned by ShellBrowserMainParts. |
96 ShellBrowserMainDelegate* browser_main_delegate_; | 80 ShellBrowserMainDelegate* browser_main_delegate_; |
97 | 81 |
98 DISALLOW_COPY_AND_ASSIGN(ShellContentBrowserClient); | 82 DISALLOW_COPY_AND_ASSIGN(ShellContentBrowserClient); |
99 }; | 83 }; |
100 | 84 |
101 } // namespace extensions | 85 } // namespace extensions |
102 | 86 |
103 #endif // EXTENSIONS_SHELL_BROWSER_SHELL_CONTENT_BROWSER_CLIENT_H_ | 87 #endif // EXTENSIONS_SHELL_BROWSER_SHELL_CONTENT_BROWSER_CLIENT_H_ |
OLD | NEW |