Upstream version 9.37.197.0
[platform/framework/web/crosswalk.git] / src / apps / shell / browser / shell_content_browser_client.h
index de9331d..984dd6f 100644 (file)
 
 class GURL;
 
+namespace content {
+class BrowserContext;
+}
+
 namespace extensions {
 class Extension;
 }
 
 namespace apps {
+class ShellBrowserMainDelegate;
 class ShellBrowserMainParts;
 
 // Content module browser process support for app_shell.
 class ShellContentBrowserClient : public content::ContentBrowserClient {
  public:
-  ShellContentBrowserClient();
+  explicit ShellContentBrowserClient(
+      ShellBrowserMainDelegate* browser_main_delegate);
   virtual ~ShellContentBrowserClient();
 
+  // Returns the single instance.
+  static ShellContentBrowserClient* Get();
+
+  // Returns the single browser context for app_shell.
+  content::BrowserContext* GetBrowserContext();
+
   // content::ContentBrowserClient overrides.
   virtual content::BrowserMainParts* CreateBrowserMainParts(
       const content::MainFunctionParams& parameters) OVERRIDE;
@@ -33,7 +45,7 @@ class ShellContentBrowserClient : public content::ContentBrowserClient {
   virtual net::URLRequestContextGetter* CreateRequestContext(
       content::BrowserContext* browser_context,
       content::ProtocolHandlerMap* protocol_handlers,
-      content::ProtocolHandlerScopedVector protocol_interceptors) OVERRIDE;
+      content::URLRequestInterceptorScopedVector request_interceptors) OVERRIDE;
   // TODO(jamescook): Quota management?
   // TODO(jamescook): Speech recognition?
   virtual bool IsHandledURL(const GURL& url) OVERRIDE;
@@ -54,6 +66,9 @@ class ShellContentBrowserClient : public content::ContentBrowserClient {
   // Owned by content::BrowserMainLoop.
   ShellBrowserMainParts* browser_main_parts_;
 
+  // Owned by ShellBrowserMainParts.
+  ShellBrowserMainDelegate* browser_main_delegate_;
+
   DISALLOW_COPY_AND_ASSIGN(ShellContentBrowserClient);
 };