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
3 // found in the LICENSE file.
5 #ifndef APPS_SHELL_SHELL_CONTENT_BROWSER_CLIENT_H_
6 #define APPS_SHELL_SHELL_CONTENT_BROWSER_CLIENT_H_
8 #include "base/compiler_specific.h"
9 #include "content/public/browser/content_browser_client.h"
13 namespace extensions {
18 class ShellBrowserMainParts;
20 class ShellContentBrowserClient : public content::ContentBrowserClient {
22 ShellContentBrowserClient();
23 virtual ~ShellContentBrowserClient();
25 // content::ContentBrowserClient overrides.
26 virtual content::BrowserMainParts* CreateBrowserMainParts(
27 const content::MainFunctionParams& parameters) OVERRIDE;
28 virtual net::URLRequestContextGetter* CreateRequestContext(
29 content::BrowserContext* browser_context,
30 content::ProtocolHandlerMap* protocol_handlers) OVERRIDE;
31 // TODO(jamescook): Quota management?
32 // TODO(jamescook): Speech recognition?
33 virtual bool IsHandledURL(const GURL& url) OVERRIDE;
34 virtual void SiteInstanceGotProcess(content::SiteInstance* site_instance)
36 virtual void SiteInstanceDeleting(content::SiteInstance* site_instance)
38 virtual void AppendExtraCommandLineSwitches(CommandLine* command_line,
39 int child_process_id) OVERRIDE;
42 // Returns the extension or app associated with |site_instance| or NULL.
43 const extensions::Extension* GetExtension(
44 content::SiteInstance* site_instance);
46 // Owned by content::BrowserMainLoop.
47 ShellBrowserMainParts* browser_main_parts_;
49 DISALLOW_COPY_AND_ASSIGN(ShellContentBrowserClient);
54 #endif // APPS_SHELL_SHELL_CONTENT_BROWSER_CLIENT_H_