Revert "Fix broken channel icon in chrome://help on CrOS" and try again
[chromium-blink-merge.git] / extensions / shell / app / shell_main_delegate.h
blob587de92d50215ee86f7ce546943397683837664f
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 EXTENSIONS_SHELL_APP_SHELL_MAIN_DELEGATE_H_
6 #define EXTENSIONS_SHELL_APP_SHELL_MAIN_DELEGATE_H_
8 #include "base/compiler_specific.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "content/public/app/content_main_delegate.h"
12 namespace content {
13 class BrowserContext;
14 class ContentBrowserClient;
15 class ContentClient;
16 class ContentRendererClient;
19 namespace extensions {
20 class ShellBrowserMainDelegate;
22 class ShellMainDelegate : public content::ContentMainDelegate {
23 public:
24 ShellMainDelegate();
25 ~ShellMainDelegate() override;
27 // ContentMainDelegate implementation:
28 bool BasicStartupComplete(int* exit_code) override;
29 void PreSandboxStartup() override;
30 content::ContentBrowserClient* CreateContentBrowserClient() override;
31 content::ContentRendererClient* CreateContentRendererClient() override;
32 content::ContentUtilityClient* CreateContentUtilityClient() override;
33 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID)
34 void ZygoteStarting(
35 ScopedVector<content::ZygoteForkDelegate>* delegates) override;
36 #endif
38 protected:
39 // The created object is owned by this object.
40 virtual content::ContentClient* CreateContentClient();
41 virtual content::ContentBrowserClient* CreateShellContentBrowserClient();
42 virtual content::ContentRendererClient* CreateShellContentRendererClient();
43 virtual content::ContentUtilityClient* CreateShellContentUtilityClient();
45 // Initializes the resource bundle and resources.pak.
46 virtual void InitializeResourceBundle();
48 private:
49 // |process_type| is zygote, renderer, utility, etc. Returns true if the
50 // process needs data from resources.pak.
51 static bool ProcessNeedsResourceBundle(const std::string& process_type);
53 scoped_ptr<content::ContentClient> content_client_;
54 scoped_ptr<content::ContentBrowserClient> browser_client_;
55 scoped_ptr<content::ContentRendererClient> renderer_client_;
56 scoped_ptr<content::ContentUtilityClient> utility_client_;
58 DISALLOW_COPY_AND_ASSIGN(ShellMainDelegate);
61 } // namespace extensions
63 #endif // EXTENSIONS_SHELL_APP_SHELL_MAIN_DELEGATE_H_