Persist zoom levels per partition

This commit is contained in:
deepak1556 2017-01-30 17:25:46 +05:30
parent 6e2f9935fe
commit 0b76a9c073
4 changed files with 244 additions and 0 deletions

View file

@ -11,6 +11,7 @@
#include "browser/network_delegate.h"
#include "browser/permission_manager.h"
#include "browser/special_storage_policy.h"
#include "browser/zoom_level_delegate.h"
#include "common/application_info.h"
#include "base/files/file_path.h"
@ -123,6 +124,7 @@ void BrowserContext::InitPrefs() {
void BrowserContext::RegisterInternalPrefs(PrefRegistrySimple* registry) {
InspectableWebContentsImpl::RegisterPrefs(registry);
MediaDeviceIDSalt::RegisterPrefs(registry);
ZoomLevelDelegate::RegisterPrefs(registry);
}
URLRequestContextGetter* BrowserContext::GetRequestContext() {
@ -166,6 +168,9 @@ base::FilePath BrowserContext::GetPath() const {
std::unique_ptr<content::ZoomLevelDelegate> BrowserContext::CreateZoomLevelDelegate(
const base::FilePath& partition_path) {
if (!IsOffTheRecord()) {
return base::MakeUnique<ZoomLevelDelegate>(prefs(), partition_path);
}
return std::unique_ptr<content::ZoomLevelDelegate>();
}