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 #include "apps/shell/shell_main_delegate.h"
7 #include "apps/shell/shell_content_browser_client.h"
8 #include "apps/shell/shell_content_client.h"
9 #include "base/command_line.h"
10 #include "base/files/file_path.h"
11 #include "base/logging.h"
12 #include "base/path_service.h"
13 #include "content/public/browser/browser_main_runner.h"
14 #include "ui/base/resource/resource_bundle.h"
18 ShellMainDelegate::ShellMainDelegate() {
21 ShellMainDelegate::~ShellMainDelegate() {
24 bool ShellMainDelegate::BasicStartupComplete(int* exit_code) {
25 // TODO(jamescook): Initialize logging here.
26 content_client_.reset(new ShellContentClient);
27 SetContentClient(content_client_.get());
31 void ShellMainDelegate::PreSandboxStartup() {
32 InitializeResourceBundle();
35 content::ContentBrowserClient* ShellMainDelegate::CreateContentBrowserClient() {
36 browser_client_.reset(new apps::ShellContentBrowserClient);
37 return browser_client_.get();
40 content::ContentRendererClient*
41 ShellMainDelegate::CreateContentRendererClient() {
42 // TODO(jamescook): Create a ShellContentRendererClient with the extensions
43 // initialization pieces of ChromeContentRendererClient.
44 return content::ContentMainDelegate::CreateContentRendererClient();
47 void ShellMainDelegate::InitializeResourceBundle() {
48 ui::ResourceBundle::InitSharedInstanceWithLocale("en-US", NULL);