OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "components/dom_distiller/core/distilled_page_prefs.h" | 5 #include "components/dom_distiller/core/distilled_page_prefs.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/location.h" | 8 #include "base/location.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "base/observer_list.h" | 10 #include "base/observer_list.h" |
11 #include "base/prefs/pref_service.h" | |
12 #include "base/single_thread_task_runner.h" | 11 #include "base/single_thread_task_runner.h" |
13 #include "base/thread_task_runner_handle.h" | 12 #include "base/thread_task_runner_handle.h" |
14 #include "components/pref_registry/pref_registry_syncable.h" | 13 #include "components/pref_registry/pref_registry_syncable.h" |
| 14 #include "components/prefs/pref_service.h" |
15 | 15 |
16 namespace { | 16 namespace { |
17 | 17 |
18 // Path to the integer corresponding to user's preference theme. | 18 // Path to the integer corresponding to user's preference theme. |
19 const char kFontPref[] = "dom_distiller.font_family"; | 19 const char kFontPref[] = "dom_distiller.font_family"; |
20 // Path to the integer corresponding to user's preference font family. | 20 // Path to the integer corresponding to user's preference font family. |
21 const char kThemePref[] = "dom_distiller.theme"; | 21 const char kThemePref[] = "dom_distiller.theme"; |
22 // Path to the float corresponding to user's preference font scaling. | 22 // Path to the float corresponding to user's preference font scaling. |
23 const char kFontScalePref[] = "dom_distiller.font_scale"; | 23 const char kFontScalePref[] = "dom_distiller.font_scale"; |
24 } | 24 } |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 DistilledPagePrefs::Theme new_theme) { | 122 DistilledPagePrefs::Theme new_theme) { |
123 FOR_EACH_OBSERVER(Observer, observers_, OnChangeTheme(new_theme)); | 123 FOR_EACH_OBSERVER(Observer, observers_, OnChangeTheme(new_theme)); |
124 } | 124 } |
125 | 125 |
126 void DistilledPagePrefs::NotifyOnChangeFontScaling( | 126 void DistilledPagePrefs::NotifyOnChangeFontScaling( |
127 float scaling) { | 127 float scaling) { |
128 FOR_EACH_OBSERVER(Observer, observers_, OnChangeFontScaling(scaling)); | 128 FOR_EACH_OBSERVER(Observer, observers_, OnChangeFontScaling(scaling)); |
129 } | 129 } |
130 | 130 |
131 } // namespace dom_distiller | 131 } // namespace dom_distiller |
OLD | NEW |