OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 CHROME_BROWSER_DOM_UI_OPTIONS_CORE_OPTIONS_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_DOM_UI_OPTIONS_CORE_OPTIONS_HANDLER_H_ |
6 #define CHROME_BROWSER_DOM_UI_OPTIONS_CORE_OPTIONS_HANDLER_H_ | 6 #define CHROME_BROWSER_DOM_UI_OPTIONS_CORE_OPTIONS_HANDLER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 // notification observing for given array of preference names. | 76 // notification observing for given array of preference names. |
77 void HandleObservePrefs(const ListValue* args); | 77 void HandleObservePrefs(const ListValue* args); |
78 | 78 |
79 // Callbacks for the "set<type>Pref" message. This message saves the new | 79 // Callbacks for the "set<type>Pref" message. This message saves the new |
80 // preference value. |args| is an array of parameters as follows: | 80 // preference value. |args| is an array of parameters as follows: |
81 // item 0 - name of the preference. | 81 // item 0 - name of the preference. |
82 // item 1 - the value of the preference in string form. | 82 // item 1 - the value of the preference in string form. |
83 // item 2 - name of the metric identifier (optional). | 83 // item 2 - name of the metric identifier (optional). |
84 void HandleSetBooleanPref(const ListValue* args); | 84 void HandleSetBooleanPref(const ListValue* args); |
85 void HandleSetIntegerPref(const ListValue* args); | 85 void HandleSetIntegerPref(const ListValue* args); |
86 void HandleSetRealPref(const ListValue* args); | 86 void HandleSetDoublePref(const ListValue* args); |
87 void HandleSetStringPref(const ListValue* args); | 87 void HandleSetStringPref(const ListValue* args); |
88 void HandleSetObjectPref(const ListValue* args); | 88 void HandleSetObjectPref(const ListValue* args); |
89 | 89 |
90 void HandleSetPref(const ListValue* args, Value::ValueType type); | 90 void HandleSetPref(const ListValue* args, Value::ValueType type); |
91 | 91 |
92 // Callback for the "clearPref" message. This message clears a preference | 92 // Callback for the "clearPref" message. This message clears a preference |
93 // value. |args| is an array of parameters as follows: | 93 // value. |args| is an array of parameters as follows: |
94 // item 0 - name of the preference. | 94 // item 0 - name of the preference. |
95 // item 1 - name of the metric identifier (optional). | 95 // item 1 - name of the metric identifier (optional). |
96 void HandleClearPref(const ListValue* args); | 96 void HandleClearPref(const ListValue* args); |
97 | 97 |
98 // Callback for the "coreOptionsUserMetricsAction" message. This records | 98 // Callback for the "coreOptionsUserMetricsAction" message. This records |
99 // an action that should be tracked if metrics recording is enabled. |args| | 99 // an action that should be tracked if metrics recording is enabled. |args| |
100 // is an array that contains a single item, the name of the metric identifier. | 100 // is an array that contains a single item, the name of the metric identifier. |
101 void HandleUserMetricsAction(const ListValue* args); | 101 void HandleUserMetricsAction(const ListValue* args); |
102 | 102 |
103 void NotifyPrefChanged(const std::string* pref_name); | 103 void NotifyPrefChanged(const std::string* pref_name); |
104 | 104 |
105 PrefChangeRegistrar registrar_; | 105 PrefChangeRegistrar registrar_; |
106 | 106 |
107 DISALLOW_COPY_AND_ASSIGN(CoreOptionsHandler); | 107 DISALLOW_COPY_AND_ASSIGN(CoreOptionsHandler); |
108 }; | 108 }; |
109 | 109 |
110 #endif // CHROME_BROWSER_DOM_UI_OPTIONS_CORE_OPTIONS_HANDLER_H_ | 110 #endif // CHROME_BROWSER_DOM_UI_OPTIONS_CORE_OPTIONS_HANDLER_H_ |
OLD | NEW |