OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/extensions/api/settings_private/settings_private_delega
te.h" | 5 #include "chrome/browser/extensions/api/settings_private/settings_private_delega
te.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/prefs/pref_service.h" | |
10 #include "base/values.h" | 9 #include "base/values.h" |
11 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
12 #include "chrome/browser/chromeos/settings/cros_settings.h" | 11 #include "chrome/browser/chromeos/settings/cros_settings.h" |
13 #include "chrome/browser/extensions/api/settings_private/prefs_util.h" | 12 #include "chrome/browser/extensions/api/settings_private/prefs_util.h" |
14 #include "chrome/browser/profiles/profile.h" | 13 #include "chrome/browser/profiles/profile.h" |
15 #include "chrome/browser/ui/zoom/chrome_zoom_level_prefs.h" | 14 #include "chrome/browser/ui/zoom/chrome_zoom_level_prefs.h" |
16 #include "chrome/common/pref_names.h" | 15 #include "chrome/common/pref_names.h" |
| 16 #include "components/prefs/pref_service.h" |
17 #include "content/public/common/page_zoom.h" | 17 #include "content/public/common/page_zoom.h" |
18 #include "extensions/browser/extension_registry.h" | 18 #include "extensions/browser/extension_registry.h" |
19 #include "extensions/common/extension.h" | 19 #include "extensions/common/extension.h" |
20 #include "url/gurl.h" | 20 #include "url/gurl.h" |
21 | 21 |
22 namespace extensions { | 22 namespace extensions { |
23 | 23 |
24 namespace settings_private = api::settings_private; | 24 namespace settings_private = api::settings_private; |
25 | 25 |
26 SettingsPrivateDelegate::SettingsPrivateDelegate(Profile* profile) | 26 SettingsPrivateDelegate::SettingsPrivateDelegate(Profile* profile) |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 } | 66 } |
67 | 67 |
68 PrefsUtil::SetPrefResult SettingsPrivateDelegate::SetDefaultZoomPercent( | 68 PrefsUtil::SetPrefResult SettingsPrivateDelegate::SetDefaultZoomPercent( |
69 int percent) { | 69 int percent) { |
70 double zoom_factor = content::ZoomFactorToZoomLevel(percent * 0.01); | 70 double zoom_factor = content::ZoomFactorToZoomLevel(percent * 0.01); |
71 profile_->GetZoomLevelPrefs()->SetDefaultZoomLevelPref(zoom_factor); | 71 profile_->GetZoomLevelPrefs()->SetDefaultZoomLevelPref(zoom_factor); |
72 return PrefsUtil::SetPrefResult::SUCCESS; | 72 return PrefsUtil::SetPrefResult::SUCCESS; |
73 } | 73 } |
74 | 74 |
75 } // namespace extensions | 75 } // namespace extensions |
OLD | NEW |