| 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_APP_SHELL_MAIN_DELEGATE_H_ | 5 #ifndef APPS_SHELL_APP_SHELL_MAIN_DELEGATE_H_ |
| 6 #define APPS_SHELL_APP_SHELL_MAIN_DELEGATE_H_ | 6 #define APPS_SHELL_APP_SHELL_MAIN_DELEGATE_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "content/public/app/content_main_delegate.h" | 10 #include "content/public/app/content_main_delegate.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 virtual ~ShellMainDelegate(); | 26 virtual ~ShellMainDelegate(); |
| 27 | 27 |
| 28 // ContentMainDelegate implementation: | 28 // ContentMainDelegate implementation: |
| 29 virtual bool BasicStartupComplete(int* exit_code) OVERRIDE; | 29 virtual bool BasicStartupComplete(int* exit_code) OVERRIDE; |
| 30 virtual void PreSandboxStartup() OVERRIDE; | 30 virtual void PreSandboxStartup() OVERRIDE; |
| 31 virtual content::ContentBrowserClient* CreateContentBrowserClient() OVERRIDE; | 31 virtual content::ContentBrowserClient* CreateContentBrowserClient() OVERRIDE; |
| 32 virtual content::ContentRendererClient* CreateContentRendererClient() | 32 virtual content::ContentRendererClient* CreateContentRendererClient() |
| 33 OVERRIDE; | 33 OVERRIDE; |
| 34 | 34 |
| 35 protected: | 35 protected: |
| 36 // The created object is owned by ShellBrowserMainParts. | 36 // The created object is owned by this object. |
| 37 virtual ShellBrowserMainDelegate* CreateShellBrowserMainDelegate(); | 37 virtual content::ContentBrowserClient* CreateShellContentBrowserClient(); |
| 38 | 38 |
| 39 // The returned object is owned by ShellContentRendererClient. | 39 // The returned object is owned by ShellContentRendererClient. |
| 40 virtual scoped_ptr<ShellRendererMainDelegate> | 40 virtual scoped_ptr<ShellRendererMainDelegate> |
| 41 CreateShellRendererMainDelegate(); | 41 CreateShellRendererMainDelegate(); |
| 42 | 42 |
| 43 // Initializes the resource bundle and resources.pak. | 43 // Initializes the resource bundle and resources.pak. |
| 44 virtual void InitializeResourceBundle(); | 44 virtual void InitializeResourceBundle(); |
| 45 | 45 |
| 46 private: | 46 private: |
| 47 // |process_type| is zygote, renderer, utility, etc. Returns true if the | 47 // |process_type| is zygote, renderer, utility, etc. Returns true if the |
| 48 // process needs data from resources.pak. | 48 // process needs data from resources.pak. |
| 49 static bool ProcessNeedsResourceBundle(const std::string& process_type); | 49 static bool ProcessNeedsResourceBundle(const std::string& process_type); |
| 50 | 50 |
| 51 scoped_ptr<content::ContentClient> content_client_; | 51 scoped_ptr<content::ContentClient> content_client_; |
| 52 scoped_ptr<content::ContentBrowserClient> browser_client_; | 52 scoped_ptr<content::ContentBrowserClient> browser_client_; |
| 53 scoped_ptr<content::ContentRendererClient> renderer_client_; | 53 scoped_ptr<content::ContentRendererClient> renderer_client_; |
| 54 | 54 |
| 55 DISALLOW_COPY_AND_ASSIGN(ShellMainDelegate); | 55 DISALLOW_COPY_AND_ASSIGN(ShellMainDelegate); |
| 56 }; | 56 }; |
| 57 | 57 |
| 58 } // namespace apps | 58 } // namespace apps |
| 59 | 59 |
| 60 #endif // APPS_SHELL_APP_SHELL_MAIN_DELEGATE_H_ | 60 #endif // APPS_SHELL_APP_SHELL_MAIN_DELEGATE_H_ |
| OLD | NEW |