Add icon manager to browser process
This commit is contained in:
parent
602aba8723
commit
1b3cd87fc9
3 changed files with 12 additions and 1 deletions
|
@ -42,7 +42,7 @@ class FileIconFetcher {
|
||||||
gfx::Image* icon);
|
gfx::Image* icon);
|
||||||
|
|
||||||
// Tracks tasks requesting file icons.
|
// Tracks tasks requesting file icons.
|
||||||
base::CancelableTaskTracker cancelable_task_tracker_;
|
static base::CancelableTaskTracker cancelable_task_tracker_;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // ATOM_COMMON_API_FILEICON_FETCHER_H_
|
#endif // ATOM_COMMON_API_FILEICON_FETCHER_H_
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
#include "chrome/browser/browser_process.h"
|
#include "chrome/browser/browser_process.h"
|
||||||
|
|
||||||
#include "chrome/browser/printing/print_job_manager.h"
|
#include "chrome/browser/printing/print_job_manager.h"
|
||||||
|
#include "chrome/browser/icon_manager.h"
|
||||||
#include "ui/base/l10n/l10n_util.h"
|
#include "ui/base/l10n/l10n_util.h"
|
||||||
|
|
||||||
BrowserProcess* g_browser_process = NULL;
|
BrowserProcess* g_browser_process = NULL;
|
||||||
|
@ -12,6 +13,8 @@ BrowserProcess* g_browser_process = NULL;
|
||||||
BrowserProcess::BrowserProcess()
|
BrowserProcess::BrowserProcess()
|
||||||
: print_job_manager_(new printing::PrintJobManager) {
|
: print_job_manager_(new printing::PrintJobManager) {
|
||||||
g_browser_process = this;
|
g_browser_process = this;
|
||||||
|
|
||||||
|
icon_manager_.reset(new IconManager);
|
||||||
}
|
}
|
||||||
|
|
||||||
BrowserProcess::~BrowserProcess() {
|
BrowserProcess::~BrowserProcess() {
|
||||||
|
@ -25,3 +28,7 @@ std::string BrowserProcess::GetApplicationLocale() {
|
||||||
printing::PrintJobManager* BrowserProcess::print_job_manager() {
|
printing::PrintJobManager* BrowserProcess::print_job_manager() {
|
||||||
return print_job_manager_.get();
|
return print_job_manager_.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
IconManager* BrowserProcess::icon_manager() {
|
||||||
|
return icon_manager_.get();
|
||||||
|
}
|
||||||
|
|
|
@ -19,6 +19,8 @@ namespace printing {
|
||||||
class PrintJobManager;
|
class PrintJobManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class IconManager;
|
||||||
|
|
||||||
// NOT THREAD SAFE, call only from the main thread.
|
// NOT THREAD SAFE, call only from the main thread.
|
||||||
// These functions shouldn't return NULL unless otherwise noted.
|
// These functions shouldn't return NULL unless otherwise noted.
|
||||||
class BrowserProcess {
|
class BrowserProcess {
|
||||||
|
@ -29,9 +31,11 @@ class BrowserProcess {
|
||||||
std::string GetApplicationLocale();
|
std::string GetApplicationLocale();
|
||||||
|
|
||||||
printing::PrintJobManager* print_job_manager();
|
printing::PrintJobManager* print_job_manager();
|
||||||
|
IconManager* icon_manager();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::unique_ptr<printing::PrintJobManager> print_job_manager_;
|
std::unique_ptr<printing::PrintJobManager> print_job_manager_;
|
||||||
|
std::unique_ptr<IconManager> icon_manager_;
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(BrowserProcess);
|
DISALLOW_COPY_AND_ASSIGN(BrowserProcess);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue