1 // Copyright (c) 2012 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 "ash/shell/content_client/shell_main_delegate.h"
7 #include "ash/shell/content_client/shell_content_browser_client.h"
8 #include "base/command_line.h"
9 #include "content/public/common/content_switches.h"
10 #include "ui/base/resource/resource_bundle.h"
15 ShellMainDelegate::ShellMainDelegate() {
18 ShellMainDelegate::~ShellMainDelegate() {
21 bool ShellMainDelegate::BasicStartupComplete(int* exit_code
) {
22 const base::CommandLine
& command_line
=
23 *base::CommandLine::ForCurrentProcess();
24 std::string process_type
=
25 command_line
.GetSwitchValueASCII(switches::kProcessType
);
27 content::SetContentClient(&content_client_
);
32 void ShellMainDelegate::PreSandboxStartup() {
33 InitializeResourceBundle();
36 content::ContentBrowserClient
* ShellMainDelegate::CreateContentBrowserClient() {
37 browser_client_
.reset(new ShellContentBrowserClient
);
38 return browser_client_
.get();
41 void ShellMainDelegate::InitializeResourceBundle() {
42 ui::ResourceBundle::InitSharedInstanceWithLocale(
43 "en-US", NULL
, ui::ResourceBundle::LOAD_COMMON_RESOURCES
);