browser_process.cc 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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. #include "chrome/browser/browser_process.h"
  5. #include "chrome/browser/icon_manager.h"
  6. #include "chrome/browser/printing/print_job_manager.h"
  7. #include "ui/base/l10n/l10n_util.h"
  8. BrowserProcess* g_browser_process = NULL;
  9. BrowserProcess::BrowserProcess()
  10. : print_job_manager_(new printing::PrintJobManager),
  11. icon_manager_(new IconManager) {
  12. g_browser_process = this;
  13. }
  14. BrowserProcess::~BrowserProcess() {
  15. g_browser_process = NULL;
  16. }
  17. void BrowserProcess::SetApplicationLocale(const std::string& locale) {
  18. locale_ = locale;
  19. }
  20. std::string BrowserProcess::GetApplicationLocale() {
  21. return locale_;
  22. }
  23. IconManager* BrowserProcess::GetIconManager() {
  24. if (!icon_manager_.get())
  25. icon_manager_.reset(new IconManager);
  26. return icon_manager_.get();
  27. }
  28. printing::PrintJobManager* BrowserProcess::print_job_manager() {
  29. return print_job_manager_.get();
  30. }