Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(111)

Side by Side Diff: components/dom_distiller/core/distilled_page_prefs.h

Issue 340403004: Java wrapper for DistilledPagePrefs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: modified DEPS for test dependencies Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 #ifndef COMPONENTS_DOM_DISTILLER_CORE_DISTILLED_PAGE_PREFS_H_ 5 #ifndef COMPONENTS_DOM_DISTILLER_CORE_DISTILLED_PAGE_PREFS_H_
6 #define COMPONENTS_DOM_DISTILLER_CORE_DISTILLED_PAGE_PREFS_H_ 6 #define COMPONENTS_DOM_DISTILLER_CORE_DISTILLED_PAGE_PREFS_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.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 11
12 class PrefService; 12 class PrefService;
13 13
14 namespace user_prefs { 14 namespace user_prefs {
15 class PrefRegistrySyncable; 15 class PrefRegistrySyncable;
16 } 16 }
17 17
18 namespace dom_distiller { 18 namespace dom_distiller {
19 19
20 // Interface for preferences used for distilled page. 20 // Interface for preferences used for distilled page.
21 class DistilledPagePrefs { 21 class DistilledPagePrefs {
22 public: 22 public:
23 // Possible themes for distilled page. 23 // Possible themes for distilled page.
24 enum Theme { 24 enum Theme {
25 LIGHT, 25 #define DEFINE_THEME(name, value) name = value,
26 DARK, 26 #include "components/dom_distiller/core/theme_list.h"
27 SEPIA, 27 #undef DEFINE_THEME
28 THEME_COUNT
29 }; 28 };
30 29
31 class Observer { 30 class Observer {
32 public: 31 public:
33 virtual void OnChangeTheme(Theme theme) = 0; 32 virtual void OnChangeTheme(Theme theme) = 0;
34 }; 33 };
35 34
36 explicit DistilledPagePrefs(PrefService* pref_service); 35 explicit DistilledPagePrefs(PrefService* pref_service);
37 ~DistilledPagePrefs(); 36 ~DistilledPagePrefs();
38 37
(...skipping 15 matching lines...) Expand all
54 ObserverList<Observer> observers_; 53 ObserverList<Observer> observers_;
55 54
56 base::WeakPtrFactory<DistilledPagePrefs> weak_ptr_factory_; 55 base::WeakPtrFactory<DistilledPagePrefs> weak_ptr_factory_;
57 56
58 DISALLOW_COPY_AND_ASSIGN(DistilledPagePrefs); 57 DISALLOW_COPY_AND_ASSIGN(DistilledPagePrefs);
59 }; 58 };
60 59
61 } // namespace dom_distiller 60 } // namespace dom_distiller
62 61
63 #endif // COMPONENTS_DOM_DISTILLER_CORE_DISTILLED_PAGE_PREFS_H_ 62 #endif // COMPONENTS_DOM_DISTILLER_CORE_DISTILLED_PAGE_PREFS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698