2014-08-21 07:38:20 +00:00
|
|
|
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
|
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
|
|
// found in the LICENSE file.
|
|
|
|
|
|
|
|
#include "chrome/browser/browser_process.h"
|
|
|
|
|
2017-02-17 08:33:46 +00:00
|
|
|
#include "chrome/browser/icon_manager.h"
|
2014-08-21 07:38:20 +00:00
|
|
|
#include "chrome/browser/printing/print_job_manager.h"
|
|
|
|
#include "ui/base/l10n/l10n_util.h"
|
|
|
|
|
|
|
|
BrowserProcess* g_browser_process = NULL;
|
|
|
|
|
2017-01-13 00:55:26 +00:00
|
|
|
BrowserProcess::BrowserProcess()
|
2017-02-17 08:33:46 +00:00
|
|
|
: print_job_manager_(new printing::PrintJobManager),
|
|
|
|
icon_manager_(new IconManager) {
|
2014-08-21 07:38:20 +00:00
|
|
|
g_browser_process = this;
|
|
|
|
}
|
|
|
|
|
|
|
|
BrowserProcess::~BrowserProcess() {
|
|
|
|
g_browser_process = NULL;
|
|
|
|
}
|
|
|
|
|
2017-12-16 09:21:29 +00:00
|
|
|
void BrowserProcess::SetApplicationLocale(const std::string& locale) {
|
|
|
|
locale_ = locale;
|
|
|
|
}
|
|
|
|
|
2014-08-21 07:38:20 +00:00
|
|
|
std::string BrowserProcess::GetApplicationLocale() {
|
2017-12-16 09:21:29 +00:00
|
|
|
return locale_;
|
2014-08-21 07:38:20 +00:00
|
|
|
}
|
|
|
|
|
2017-02-17 08:33:46 +00:00
|
|
|
IconManager* BrowserProcess::GetIconManager() {
|
|
|
|
if (!icon_manager_.get())
|
|
|
|
icon_manager_.reset(new IconManager);
|
|
|
|
return icon_manager_.get();
|
|
|
|
}
|
|
|
|
|
2014-08-21 07:38:20 +00:00
|
|
|
printing::PrintJobManager* BrowserProcess::print_job_manager() {
|
|
|
|
return print_job_manager_.get();
|
|
|
|
}
|