| 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_SHELL_CONTENT_BROWSER_CLIENT_H_ | 5 #ifndef APPS_SHELL_SHELL_CONTENT_BROWSER_CLIENT_H_ |
| 6 #define APPS_SHELL_SHELL_CONTENT_BROWSER_CLIENT_H_ | 6 #define APPS_SHELL_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; |
| 12 |
| 13 namespace extensions { |
| 14 class Extension; |
| 15 } |
| 16 |
| 11 namespace apps { | 17 namespace apps { |
| 12 class ShellBrowserMainParts; | 18 class ShellBrowserMainParts; |
| 13 | 19 |
| 14 class ShellContentBrowserClient : public content::ContentBrowserClient { | 20 class ShellContentBrowserClient : public content::ContentBrowserClient { |
| 15 public: | 21 public: |
| 16 ShellContentBrowserClient(); | 22 ShellContentBrowserClient(); |
| 17 virtual ~ShellContentBrowserClient(); | 23 virtual ~ShellContentBrowserClient(); |
| 18 | 24 |
| 19 // content::ContentBrowserClient overrides. | 25 // content::ContentBrowserClient overrides. |
| 20 virtual content::BrowserMainParts* CreateBrowserMainParts( | 26 virtual content::BrowserMainParts* CreateBrowserMainParts( |
| 21 const content::MainFunctionParams& parameters) OVERRIDE; | 27 const content::MainFunctionParams& parameters) OVERRIDE; |
| 22 virtual net::URLRequestContextGetter* CreateRequestContext( | 28 virtual net::URLRequestContextGetter* CreateRequestContext( |
| 23 content::BrowserContext* browser_context, | 29 content::BrowserContext* browser_context, |
| 24 content::ProtocolHandlerMap* protocol_handlers) OVERRIDE; | 30 content::ProtocolHandlerMap* protocol_handlers) OVERRIDE; |
| 25 // TODO(jamescook): Quota management? | 31 // TODO(jamescook): Quota management? |
| 26 // TODO(jamescook): Speech recognition? | 32 // TODO(jamescook): Speech recognition? |
| 33 virtual bool IsHandledURL(const GURL& url) OVERRIDE; |
| 34 virtual void SiteInstanceGotProcess(content::SiteInstance* site_instance) |
| 35 OVERRIDE; |
| 36 virtual void SiteInstanceDeleting(content::SiteInstance* site_instance) |
| 37 OVERRIDE; |
| 38 virtual void AppendExtraCommandLineSwitches(CommandLine* command_line, |
| 39 int child_process_id) OVERRIDE; |
| 27 | 40 |
| 28 private: | 41 private: |
| 42 // Returns the extension or app associated with |site_instance| or NULL. |
| 43 const extensions::Extension* GetExtension( |
| 44 content::SiteInstance* site_instance); |
| 45 |
| 29 // Owned by content::BrowserMainLoop. | 46 // Owned by content::BrowserMainLoop. |
| 30 ShellBrowserMainParts* browser_main_parts_; | 47 ShellBrowserMainParts* browser_main_parts_; |
| 31 | 48 |
| 32 DISALLOW_COPY_AND_ASSIGN(ShellContentBrowserClient); | 49 DISALLOW_COPY_AND_ASSIGN(ShellContentBrowserClient); |
| 33 }; | 50 }; |
| 34 | 51 |
| 35 } // namespace apps | 52 } // namespace apps |
| 36 | 53 |
| 37 #endif // APPS_SHELL_SHELL_CONTENT_BROWSER_CLIENT_H_ | 54 #endif // APPS_SHELL_SHELL_CONTENT_BROWSER_CLIENT_H_ |
| OLD | NEW |