2013-10-23 21:30:47 +02:00
|
|
|
// Copyright (c) 2013 The Chromium Embedded Framework Authors.
|
|
|
|
// Portions (c) 2011 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.
|
|
|
|
|
|
|
|
#ifndef CEF_LIBCEF_BROWSER_CHROME_BROWSER_PROCESS_STUB_H_
|
|
|
|
#define CEF_LIBCEF_BROWSER_CHROME_BROWSER_PROCESS_STUB_H_
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
#include "chrome/browser/browser_process.h"
|
|
|
|
#include "base/compiler_specific.h"
|
|
|
|
#include "base/memory/scoped_ptr.h"
|
|
|
|
|
2015-10-17 02:44:00 +02:00
|
|
|
// 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/.
|
2013-10-23 21:30:47 +02:00
|
|
|
|
|
|
|
class BackgroundModeManager {
|
|
|
|
public:
|
|
|
|
BackgroundModeManager();
|
|
|
|
virtual ~BackgroundModeManager();
|
|
|
|
private:
|
|
|
|
DISALLOW_COPY_AND_ASSIGN(BackgroundModeManager);
|
|
|
|
};
|
|
|
|
|
|
|
|
class ChromeBrowserProcessStub : public BrowserProcess {
|
|
|
|
public:
|
|
|
|
ChromeBrowserProcessStub();
|
2014-11-12 20:25:15 +01:00
|
|
|
~ChromeBrowserProcessStub() override;
|
2013-10-23 21:30:47 +02:00
|
|
|
|
|
|
|
// BrowserProcess implementation.
|
2014-11-12 20:25:15 +01:00
|
|
|
void ResourceDispatcherHostCreated() override;
|
|
|
|
void EndSession() override;
|
2015-11-10 21:18:16 +01:00
|
|
|
metrics_services_manager::MetricsServicesManager*
|
|
|
|
GetMetricsServicesManager() override;
|
2014-11-12 20:25:15 +01:00
|
|
|
metrics::MetricsService* metrics_service() override;
|
|
|
|
rappor::RapporService* rappor_service() override;
|
|
|
|
IOThread* io_thread() override;
|
|
|
|
WatchDogThread* watchdog_thread() override;
|
|
|
|
ProfileManager* profile_manager() override;
|
|
|
|
PrefService* local_state() override;
|
|
|
|
net::URLRequestContextGetter* system_request_context() override;
|
2015-10-09 17:23:12 +02:00
|
|
|
variations::VariationsService* variations_service() override;
|
|
|
|
web_resource::PromoResourceService* promo_resource_service() override;
|
2014-11-12 20:25:15 +01:00
|
|
|
BrowserProcessPlatformPart* platform_part() override;
|
|
|
|
extensions::EventRouterForwarder*
|
|
|
|
extension_event_router_forwarder() override;
|
|
|
|
NotificationUIManager* notification_ui_manager() override;
|
|
|
|
message_center::MessageCenter* message_center() override;
|
|
|
|
policy::BrowserPolicyConnector* browser_policy_connector() override;
|
|
|
|
policy::PolicyService* policy_service() override;
|
|
|
|
IconManager* icon_manager() override;
|
|
|
|
GLStringManager* gl_string_manager() override;
|
|
|
|
GpuModeManager* gpu_mode_manager() override;
|
|
|
|
void CreateDevToolsHttpProtocolHandler(
|
2013-10-23 21:30:47 +02:00
|
|
|
chrome::HostDesktopType host_desktop_type,
|
|
|
|
const std::string& ip,
|
2016-01-06 20:20:54 +01:00
|
|
|
uint16_t port) override;
|
2014-11-12 20:25:15 +01:00
|
|
|
unsigned int AddRefModule() override;
|
|
|
|
unsigned int ReleaseModule() override;
|
|
|
|
bool IsShuttingDown() override;
|
|
|
|
printing::PrintJobManager* print_job_manager() override;
|
|
|
|
printing::PrintPreviewDialogController*
|
|
|
|
print_preview_dialog_controller() override;
|
|
|
|
printing::BackgroundPrintingManager*
|
|
|
|
background_printing_manager() override;
|
|
|
|
IntranetRedirectDetector* intranet_redirect_detector() override;
|
|
|
|
const std::string& GetApplicationLocale() override;
|
|
|
|
void SetApplicationLocale(const std::string& locale) override;
|
|
|
|
DownloadStatusUpdater* download_status_updater() override;
|
|
|
|
DownloadRequestLimiter* download_request_limiter() override;
|
|
|
|
BackgroundModeManager* background_mode_manager() override;
|
|
|
|
void set_background_mode_manager_for_test(
|
|
|
|
scoped_ptr<BackgroundModeManager> manager) override;
|
|
|
|
StatusTray* status_tray() override;
|
2015-12-09 17:10:16 +01:00
|
|
|
safe_browsing::SafeBrowsingService* safe_browsing_service() override;
|
2014-11-12 20:25:15 +01:00
|
|
|
safe_browsing::ClientSideDetectionService*
|
|
|
|
safe_browsing_detection_service() override;
|
2013-10-23 21:30:47 +02:00
|
|
|
|
|
|
|
#if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
|
2014-11-12 20:25:15 +01:00
|
|
|
void StartAutoupdateTimer() override;
|
2013-10-23 21:30:47 +02:00
|
|
|
#endif
|
|
|
|
|
2015-10-09 17:23:12 +02:00
|
|
|
net_log::ChromeNetLog* net_log() override;
|
2014-11-12 20:25:15 +01:00
|
|
|
component_updater::ComponentUpdateService*
|
|
|
|
component_updater() override;
|
|
|
|
CRLSetFetcher* crl_set_fetcher() override;
|
|
|
|
component_updater::PnaclComponentInstaller*
|
|
|
|
pnacl_component_installer() override;
|
2015-03-04 02:00:13 +01:00
|
|
|
component_updater::SupervisedUserWhitelistInstaller*
|
|
|
|
supervised_user_whitelist_installer() override;
|
2014-11-12 20:25:15 +01:00
|
|
|
MediaFileSystemRegistry*
|
|
|
|
media_file_system_registry() override;
|
|
|
|
bool created_local_state() const override;
|
2013-10-23 21:30:47 +02:00
|
|
|
#if defined(ENABLE_WEBRTC)
|
2014-11-12 20:25:15 +01:00
|
|
|
WebRtcLogUploader* webrtc_log_uploader() override;
|
2013-10-23 21:30:47 +02:00
|
|
|
#endif
|
2014-11-12 20:25:15 +01:00
|
|
|
network_time::NetworkTimeTracker* network_time_tracker() override;
|
|
|
|
gcm::GCMDriver* gcm_driver() override;
|
2015-08-14 16:41:08 +02:00
|
|
|
ShellIntegration::DefaultWebClientState
|
|
|
|
CachedDefaultWebClientState() override;
|
2015-10-09 17:23:12 +02:00
|
|
|
memory::TabManager* GetTabManager() override;
|
2013-10-23 21:30:47 +02:00
|
|
|
|
|
|
|
private:
|
|
|
|
std::string locale_;
|
|
|
|
|
|
|
|
DISALLOW_COPY_AND_ASSIGN(ChromeBrowserProcessStub);
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // CEF_LIBCEF_BROWSER_CHROME_BROWSER_PROCESS_STUB_H_
|