refactor: move media/net from brightray to atom (#15288)

This commit is contained in:
Milan Burda 2018-10-19 20:51:43 +02:00 committed by John Kleinschmidt
parent 6f3c46cc7e
commit 6d844a0b67
32 changed files with 108 additions and 152 deletions

View file

@ -17,6 +17,7 @@
#include "atom/browser/special_storage_policy.h"
#include "atom/browser/ui/inspectable_web_contents_impl.h"
#include "atom/browser/web_view_manager.h"
#include "atom/browser/zoom_level_delegate.h"
#include "atom/common/atom_version.h"
#include "atom/common/chrome_version.h"
#include "atom/common/options_switches.h"
@ -28,7 +29,6 @@
#include "base/threading/sequenced_task_runner_handle.h"
#include "base/threading/thread_restrictions.h"
#include "brightray/browser/brightray_paths.h"
#include "brightray/browser/zoom_level_delegate.h"
#include "brightray/common/application_info.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/pref_names.h"
@ -153,8 +153,8 @@ void AtomBrowserContext::InitPrefs() {
download_dir);
registry->RegisterDictionaryPref(prefs::kDevToolsFileSystemPaths);
InspectableWebContentsImpl::RegisterPrefs(registry.get());
brightray::MediaDeviceIDSalt::RegisterPrefs(registry.get());
brightray::ZoomLevelDelegate::RegisterPrefs(registry.get());
MediaDeviceIDSalt::RegisterPrefs(registry.get());
ZoomLevelDelegate::RegisterPrefs(registry.get());
PrefProxyConfigTrackerImpl::RegisterPrefs(registry.get());
prefs_ = prefs_factory.Create(
@ -210,7 +210,7 @@ content::ResourceContext* AtomBrowserContext::GetResourceContext() {
std::string AtomBrowserContext::GetMediaDeviceIDSalt() {
if (!media_device_id_salt_.get())
media_device_id_salt_.reset(new brightray::MediaDeviceIDSalt(prefs_.get()));
media_device_id_salt_.reset(new MediaDeviceIDSalt(prefs_.get()));
return media_device_id_salt_->GetSalt();
}
@ -218,8 +218,7 @@ std::unique_ptr<content::ZoomLevelDelegate>
AtomBrowserContext::CreateZoomLevelDelegate(
const base::FilePath& partition_path) {
if (!IsOffTheRecord()) {
return std::make_unique<brightray::ZoomLevelDelegate>(prefs(),
partition_path);
return std::make_unique<ZoomLevelDelegate>(prefs(), partition_path);
}
return std::unique_ptr<content::ZoomLevelDelegate>();
}