OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 APPS_SHELL_BROWSER_SHELL_CONTENT_BROWSER_CLIENT_H_ | 5 #ifndef EXTENSIONS_SHELL_BROWSER_SHELL_CONTENT_BROWSER_CLIENT_H_ |
6 #define APPS_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 |
11 class GURL; | 11 class GURL; |
12 | 12 |
13 namespace content { | 13 namespace content { |
14 class BrowserContext; | 14 class BrowserContext; |
15 } | 15 } |
16 | 16 |
17 namespace extensions { | 17 namespace extensions { |
18 class Extension; | 18 class Extension; |
19 } | |
20 | |
21 namespace apps { | |
22 class ShellBrowserMainDelegate; | 19 class ShellBrowserMainDelegate; |
23 class ShellBrowserMainParts; | 20 class ShellBrowserMainParts; |
24 | 21 |
25 // Content module browser process support for app_shell. | 22 // Content module browser process support for app_shell. |
26 class ShellContentBrowserClient : public content::ContentBrowserClient { | 23 class ShellContentBrowserClient : public content::ContentBrowserClient { |
27 public: | 24 public: |
28 explicit ShellContentBrowserClient( | 25 explicit ShellContentBrowserClient( |
29 ShellBrowserMainDelegate* browser_main_delegate); | 26 ShellBrowserMainDelegate* browser_main_delegate); |
30 virtual ~ShellContentBrowserClient(); | 27 virtual ~ShellContentBrowserClient(); |
31 | 28 |
(...skipping 10 matching lines...) Expand all Loading... |
42 content::RenderProcessHost* host) OVERRIDE; | 39 content::RenderProcessHost* host) OVERRIDE; |
43 virtual bool ShouldUseProcessPerSite(content::BrowserContext* browser_context, | 40 virtual bool ShouldUseProcessPerSite(content::BrowserContext* browser_context, |
44 const GURL& effective_url) OVERRIDE; | 41 const GURL& effective_url) OVERRIDE; |
45 virtual net::URLRequestContextGetter* CreateRequestContext( | 42 virtual net::URLRequestContextGetter* CreateRequestContext( |
46 content::BrowserContext* browser_context, | 43 content::BrowserContext* browser_context, |
47 content::ProtocolHandlerMap* protocol_handlers, | 44 content::ProtocolHandlerMap* protocol_handlers, |
48 content::URLRequestInterceptorScopedVector request_interceptors) OVERRIDE; | 45 content::URLRequestInterceptorScopedVector request_interceptors) OVERRIDE; |
49 // TODO(jamescook): Quota management? | 46 // TODO(jamescook): Quota management? |
50 // TODO(jamescook): Speech recognition? | 47 // TODO(jamescook): Speech recognition? |
51 virtual bool IsHandledURL(const GURL& url) OVERRIDE; | 48 virtual bool IsHandledURL(const GURL& url) OVERRIDE; |
52 virtual void SiteInstanceGotProcess(content::SiteInstance* site_instance) | 49 virtual void SiteInstanceGotProcess( |
53 OVERRIDE; | 50 content::SiteInstance* site_instance) OVERRIDE; |
54 virtual void SiteInstanceDeleting(content::SiteInstance* site_instance) | 51 virtual void SiteInstanceDeleting( |
55 OVERRIDE; | 52 content::SiteInstance* site_instance) OVERRIDE; |
56 virtual void AppendExtraCommandLineSwitches(base::CommandLine* command_line, | 53 virtual void AppendExtraCommandLineSwitches(base::CommandLine* command_line, |
57 int child_process_id) OVERRIDE; | 54 int child_process_id) OVERRIDE; |
58 virtual void GetAdditionalAllowedSchemesForFileSystem( | 55 virtual void GetAdditionalAllowedSchemesForFileSystem( |
59 std::vector<std::string>* additional_schemes) OVERRIDE; | 56 std::vector<std::string>* additional_schemes) OVERRIDE; |
60 | 57 |
61 private: | 58 private: |
62 // Returns the extension or app associated with |site_instance| or NULL. | 59 // Returns the extension or app associated with |site_instance| or NULL. |
63 const extensions::Extension* GetExtension( | 60 const Extension* GetExtension(content::SiteInstance* site_instance); |
64 content::SiteInstance* site_instance); | |
65 | 61 |
66 // Owned by content::BrowserMainLoop. | 62 // Owned by content::BrowserMainLoop. |
67 ShellBrowserMainParts* browser_main_parts_; | 63 ShellBrowserMainParts* browser_main_parts_; |
68 | 64 |
69 // Owned by ShellBrowserMainParts. | 65 // Owned by ShellBrowserMainParts. |
70 ShellBrowserMainDelegate* browser_main_delegate_; | 66 ShellBrowserMainDelegate* browser_main_delegate_; |
71 | 67 |
72 DISALLOW_COPY_AND_ASSIGN(ShellContentBrowserClient); | 68 DISALLOW_COPY_AND_ASSIGN(ShellContentBrowserClient); |
73 }; | 69 }; |
74 | 70 |
75 } // namespace apps | 71 } // namespace extensions |
76 | 72 |
77 #endif // APPS_SHELL_BROWSER_SHELL_CONTENT_BROWSER_CLIENT_H_ | 73 #endif // EXTENSIONS_SHELL_BROWSER_SHELL_CONTENT_BROWSER_CLIENT_H_ |
OLD | NEW |