Home | History | Annotate | Download | only in shell
      1 // Copyright (c) 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.
      4 
      5 #include "apps/shell/shell_main_delegate.h"
      6 
      7 #include "apps/shell/shell_content_browser_client.h"
      8 #include "base/command_line.h"
      9 #include "base/files/file_path.h"
     10 #include "base/logging.h"
     11 #include "base/path_service.h"
     12 #include "content/public/browser/browser_main_runner.h"
     13 #include "ui/base/resource/resource_bundle.h"
     14 
     15 namespace apps {
     16 
     17 ShellMainDelegate::ShellMainDelegate() {
     18 }
     19 
     20 ShellMainDelegate::~ShellMainDelegate() {
     21 }
     22 
     23 bool ShellMainDelegate::BasicStartupComplete(int* exit_code) {
     24   // TODO(jamescook): Initialize logging here.
     25   SetContentClient(&content_client_);
     26   return false;
     27 }
     28 
     29 void ShellMainDelegate::PreSandboxStartup() {
     30   InitializeResourceBundle();
     31 }
     32 
     33 content::ContentBrowserClient* ShellMainDelegate::CreateContentBrowserClient() {
     34   browser_client_.reset(new apps::ShellContentBrowserClient);
     35   return browser_client_.get();
     36 }
     37 
     38 void ShellMainDelegate::InitializeResourceBundle() {
     39   ui::ResourceBundle::InitSharedInstanceWithLocale("en-US", NULL);
     40 }
     41 
     42 }  // namespace apps
     43