1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_UI_WEBUI_GESTURE_CONFIG_UI_H_
6 #define CHROME_BROWSER_UI_WEBUI_GESTURE_CONFIG_UI_H_
8 #include "content/public/browser/web_ui_controller.h"
14 // The WebUI for 'chrome://gesture'.
15 class GestureConfigUI
: public content::WebUIController
{
17 // Constructs a new GestureConfig for the specified |web_ui|.
18 explicit GestureConfigUI(content::WebUI
* web_ui
);
19 ~GestureConfigUI() override
;
22 // TODO(mohsen): Add a whitelist of preferences that are allowed to be set or
23 // get here and check requested preferences against this whitelist.
26 * Request a preference setting's value.
27 * This method is asynchronous; the result is provided by a call to
28 * the JS method 'gesture_config.updatePreferenceValueResult'.
30 void UpdatePreferenceValue(const base::ListValue
* args
);
33 * Reset a preference to its default value and return this value
34 * via asynchronous callback to the JS method
35 * 'gesture_config.updatePreferenceValueResult'.
37 void ResetPreferenceValue(const base::ListValue
* args
);
40 * Set a preference setting's value.
41 * Two parameters are provided in a JS list: prefName and value, the
42 * key of the preference value to be set, and the value it's to be set to.
44 void SetPreferenceValue(const base::ListValue
* args
);
46 DISALLOW_COPY_AND_ASSIGN(GestureConfigUI
);
49 #endif // CHROME_BROWSER_UI_WEBUI_GESTURE_CONFIG_UI_H_