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
3 // found in the LICENSE file.
5 #ifndef CHROMECAST_SHELL_APP_CAST_MAIN_DELEGATE_H_
6 #define CHROMECAST_SHELL_APP_CAST_MAIN_DELEGATE_H_
8 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "chromecast/shell/common/cast_content_client.h"
11 #include "content/public/app/content_main_delegate.h"
13 namespace chromecast
{
15 class CastResourceDelegate
;
19 class CastContentBrowserClient
;
20 class CastContentRendererClient
;
22 class CastMainDelegate
: public content::ContentMainDelegate
{
25 virtual ~CastMainDelegate();
27 // content::ContentMainDelegate implementation:
28 virtual bool BasicStartupComplete(int* exit_code
) OVERRIDE
;
29 virtual void PreSandboxStartup() OVERRIDE
;
30 virtual void ZygoteForked() OVERRIDE
;
31 virtual content::ContentBrowserClient
* CreateContentBrowserClient() OVERRIDE
;
32 virtual content::ContentRendererClient
*
33 CreateContentRendererClient() OVERRIDE
;
36 void InitializeResourceBundle();
38 scoped_ptr
<CastContentBrowserClient
> browser_client_
;
39 scoped_ptr
<CastContentRendererClient
> renderer_client_
;
40 scoped_ptr
<CastResourceDelegate
> resource_delegate_
;
41 CastContentClient content_client_
;
43 DISALLOW_COPY_AND_ASSIGN(CastMainDelegate
);
47 } // namespace chromecast
49 #endif // CHROMECAST_SHELL_APP_CAST_MAIN_DELEGATE_H_