mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2024-12-13 10:06:28 +01:00
84f3ff2afd
As part of introducing the Chrome runtime we now need to distinguish between the classes that implement the current CEF runtime and the classes the implement the shared CEF library/runtime structure and public API. We choose the name Alloy for the current CEF runtime because it describes a combination of Chrome and other elements. Shared CEF library/runtime classes will continue to use the Cef prefix. Classes that implement the Alloy or Chrome runtime will use the Alloy or Chrome prefixes respectively. Classes that extend an existing Chrome-prefixed class will add the Cef or Alloy suffix, thereby following the existing naming pattern of Chrome-derived classes. This change applies the new naming pattern to an initial set of runtime-related classes. Additional classes/files will be renamed and moved as the Chrome runtime implementation progresses.
126 lines
5.0 KiB
C++
126 lines
5.0 KiB
C++
// 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.
|
|
|
|
// 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_ALLOY_CHROME_BROWSER_PROCESS_ALLOY_H_
|
|
#define CEF_LIBCEF_BROWSER_ALLOY_CHROME_BROWSER_PROCESS_ALLOY_H_
|
|
|
|
#include <memory>
|
|
#include <string>
|
|
|
|
#include "base/compiler_specific.h"
|
|
#include "base/metrics/field_trial.h"
|
|
#include "chrome/browser/browser_process.h"
|
|
#include "chrome/browser/extensions/event_router_forwarder.h"
|
|
#include "media/media_buildflags.h"
|
|
|
|
class ChromeProfileManagerAlloy;
|
|
|
|
class BackgroundModeManager {
|
|
public:
|
|
BackgroundModeManager();
|
|
virtual ~BackgroundModeManager();
|
|
|
|
private:
|
|
DISALLOW_COPY_AND_ASSIGN(BackgroundModeManager);
|
|
};
|
|
|
|
class ChromeBrowserProcessAlloy : public BrowserProcess {
|
|
public:
|
|
ChromeBrowserProcessAlloy();
|
|
~ChromeBrowserProcessAlloy() override;
|
|
|
|
void Initialize();
|
|
void OnContextInitialized();
|
|
void CleanupOnUIThread();
|
|
|
|
// BrowserProcess implementation.
|
|
void EndSession() override;
|
|
void FlushLocalStateAndReply(base::OnceClosure reply) override;
|
|
metrics_services_manager::MetricsServicesManager* GetMetricsServicesManager()
|
|
override;
|
|
metrics::MetricsService* metrics_service() override;
|
|
rappor::RapporServiceImpl* rappor_service() override;
|
|
SystemNetworkContextManager* system_network_context_manager() override;
|
|
network::NetworkQualityTracker* network_quality_tracker() override;
|
|
WatchDogThread* watchdog_thread() override;
|
|
ProfileManager* profile_manager() override;
|
|
PrefService* local_state() override;
|
|
scoped_refptr<network::SharedURLLoaderFactory> shared_url_loader_factory()
|
|
override;
|
|
variations::VariationsService* variations_service() override;
|
|
BrowserProcessPlatformPart* platform_part() override;
|
|
extensions::EventRouterForwarder* extension_event_router_forwarder() override;
|
|
NotificationUIManager* notification_ui_manager() override;
|
|
NotificationPlatformBridge* notification_platform_bridge() override;
|
|
policy::ChromeBrowserPolicyConnector* browser_policy_connector() override;
|
|
policy::PolicyService* policy_service() override;
|
|
IconManager* icon_manager() override;
|
|
GpuModeManager* gpu_mode_manager() override;
|
|
void CreateDevToolsProtocolHandler() override;
|
|
void CreateDevToolsAutoOpener() 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;
|
|
#if BUILDFLAG(ENABLE_BACKGROUND_MODE)
|
|
BackgroundModeManager* background_mode_manager() override;
|
|
void set_background_mode_manager_for_test(
|
|
std::unique_ptr<BackgroundModeManager> manager) override;
|
|
#endif
|
|
StatusTray* status_tray() override;
|
|
safe_browsing::SafeBrowsingService* safe_browsing_service() override;
|
|
subresource_filter::RulesetService* subresource_filter_ruleset_service()
|
|
override;
|
|
optimization_guide::OptimizationGuideService* optimization_guide_service()
|
|
override;
|
|
StartupData* startup_data() override;
|
|
|
|
#if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
|
|
void StartAutoupdateTimer() override;
|
|
#endif
|
|
|
|
component_updater::ComponentUpdateService* component_updater() override;
|
|
MediaFileSystemRegistry* media_file_system_registry() override;
|
|
WebRtcLogUploader* webrtc_log_uploader() override;
|
|
network_time::NetworkTimeTracker* network_time_tracker() override;
|
|
gcm::GCMDriver* gcm_driver() override;
|
|
resource_coordinator::TabManager* GetTabManager() override;
|
|
resource_coordinator::ResourceCoordinatorParts* resource_coordinator_parts()
|
|
override;
|
|
BuildState* GetBuildState() override;
|
|
|
|
private:
|
|
bool initialized_;
|
|
bool context_initialized_;
|
|
bool shutdown_;
|
|
|
|
std::string locale_;
|
|
std::unique_ptr<printing::PrintJobManager> print_job_manager_;
|
|
std::unique_ptr<ChromeProfileManagerAlloy> profile_manager_;
|
|
scoped_refptr<extensions::EventRouterForwarder> event_router_forwarder_;
|
|
scoped_refptr<printing::PrintPreviewDialogController>
|
|
print_preview_dialog_controller_;
|
|
std::unique_ptr<printing::BackgroundPrintingManager>
|
|
background_printing_manager_;
|
|
std::unique_ptr<PrefService> local_state_;
|
|
// Must be destroyed after |local_state_|.
|
|
std::unique_ptr<policy::ChromeBrowserPolicyConnector>
|
|
browser_policy_connector_;
|
|
std::unique_ptr<base::FieldTrialList> field_trial_list_;
|
|
|
|
DISALLOW_COPY_AND_ASSIGN(ChromeBrowserProcessAlloy);
|
|
};
|
|
|
|
#endif // CEF_LIBCEF_BROWSER_ALLOY_CHROME_BROWSER_PROCESS_ALLOY_H_
|