shell_main_delegate.cc revision 2a99a7e74a7f215066514fe81d2bfa6639d9eddd
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. 4 5#include "ash/shell/content_client/shell_main_delegate.h" 6 7#include "ash/shell/content_client/shell_content_browser_client.h" 8#include "base/command_line.h" 9#include "base/files/file_path.h" 10#include "base/path_service.h" 11#include "content/public/common/content_switches.h" 12#include "ui/base/resource/resource_bundle.h" 13#include "ui/base/ui_base_paths.h" 14 15namespace ash { 16namespace shell { 17 18ShellMainDelegate::ShellMainDelegate() { 19} 20 21ShellMainDelegate::~ShellMainDelegate() { 22} 23 24bool ShellMainDelegate::BasicStartupComplete(int* exit_code) { 25 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 26 std::string process_type = 27 command_line.GetSwitchValueASCII(switches::kProcessType); 28 29 content::SetContentClient(&content_client_); 30 31 return false; 32} 33 34void ShellMainDelegate::PreSandboxStartup() { 35 InitializeResourceBundle(); 36} 37 38content::ContentBrowserClient* ShellMainDelegate::CreateContentBrowserClient() { 39 browser_client_.reset(new ShellContentBrowserClient); 40 return browser_client_.get(); 41} 42 43void ShellMainDelegate::InitializeResourceBundle() { 44 ui::ResourceBundle::InitSharedInstanceWithLocale("en-US", NULL); 45} 46 47} // namespace shell 48} // namespace ash 49