Move chrome members to BrowserProcess and add ProfileManager support (issue #1947)

This commit is contained in:
Marshall Greenblatt
2016-07-18 17:22:22 -04:00
parent 3cc539b506
commit f4425a9a0c
15 changed files with 178 additions and 350 deletions

View File

@@ -3,16 +3,24 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// This file provides a stub implementation of Chrome's BrowserProcess object
// for use as an interop layer between CEF and files that live in chrome/.
#ifndef CEF_LIBCEF_BROWSER_CHROME_BROWSER_PROCESS_STUB_H_
#define CEF_LIBCEF_BROWSER_CHROME_BROWSER_PROCESS_STUB_H_
#include <memory>
#include <string>
#include "chrome/browser/browser_process.h"
#include "chrome/browser/extensions/event_router_forwarder.h"
#include "base/compiler_specific.h"
// This file provides a stub implementation of Chrome's BrowserProcess object
// for use as an interop layer between CEF and files that live in chrome/.
namespace component_updater {
class ComponentUpdateService;
}
class ChromeProfileManagerStub;
class BackgroundModeManager {
public:
@@ -27,6 +35,9 @@ class ChromeBrowserProcessStub : public BrowserProcess {
ChromeBrowserProcessStub();
~ChromeBrowserProcessStub() override;
void Initialize();
void Shutdown();
// BrowserProcess implementation.
void ResourceDispatcherHostCreated() override;
void EndSession() override;
@@ -100,7 +111,14 @@ class ChromeBrowserProcessStub : public BrowserProcess {
memory::TabManager* GetTabManager() override;
private:
bool initialized_;
bool shutdown_;
std::string locale_;
std::unique_ptr<printing::PrintJobManager> print_job_manager_;
std::unique_ptr<ChromeProfileManagerStub> profile_manager_;
scoped_refptr<extensions::EventRouterForwarder> event_router_forwarder_;
std::unique_ptr<component_updater::ComponentUpdateService> component_updater_;
DISALLOW_COPY_AND_ASSIGN(ChromeBrowserProcessStub);
};