| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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_UI_WEBUI_GESTURE_CONFIG_UI_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_GESTURE_CONFIG_UI_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_GESTURE_CONFIG_UI_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_GESTURE_CONFIG_UI_H_ |
| 7 | 7 |
| 8 #include "content/public/browser/web_ui_controller.h" | 8 #include "content/public/browser/web_ui_controller.h" |
| 9 | 9 |
| 10 namespace base { | 10 namespace base { |
| 11 class ListValue; | 11 class ListValue; |
| 12 } // namespace base | 12 } // namespace base |
| 13 | 13 |
| 14 // The WebUI for 'chrome://gesture'. | 14 // The WebUI for 'chrome://gesture'. |
| 15 class GestureConfigUI : public content::WebUIController { | 15 class GestureConfigUI : public content::WebUIController { |
| 16 public: | 16 public: |
| 17 // Constructs a new GestureConfig for the specified |web_ui|. | 17 // Constructs a new GestureConfig for the specified |web_ui|. |
| 18 explicit GestureConfigUI(content::WebUI* web_ui); | 18 explicit GestureConfigUI(content::WebUI* web_ui); |
| 19 virtual ~GestureConfigUI(); | 19 ~GestureConfigUI() override; |
| 20 | 20 |
| 21 private: | 21 private: |
| 22 // TODO(mohsen): Add a whitelist of preferences that are allowed to be set or | 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. | 23 // get here and check requested preferences against this whitelist. |
| 24 | 24 |
| 25 /** | 25 /** |
| 26 * Request a preference setting's value. | 26 * Request a preference setting's value. |
| 27 * This method is asynchronous; the result is provided by a call to | 27 * This method is asynchronous; the result is provided by a call to |
| 28 * the JS method 'gesture_config.updatePreferenceValueResult'. | 28 * the JS method 'gesture_config.updatePreferenceValueResult'. |
| 29 */ | 29 */ |
| (...skipping 10 matching lines...) Expand all Loading... |
| 40 * Set a preference setting's value. | 40 * Set a preference setting's value. |
| 41 * Two parameters are provided in a JS list: prefName and value, the | 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. | 42 * key of the preference value to be set, and the value it's to be set to. |
| 43 */ | 43 */ |
| 44 void SetPreferenceValue(const base::ListValue* args); | 44 void SetPreferenceValue(const base::ListValue* args); |
| 45 | 45 |
| 46 DISALLOW_COPY_AND_ASSIGN(GestureConfigUI); | 46 DISALLOW_COPY_AND_ASSIGN(GestureConfigUI); |
| 47 }; | 47 }; |
| 48 | 48 |
| 49 #endif // CHROME_BROWSER_UI_WEBUI_GESTURE_CONFIG_UI_H_ | 49 #endif // CHROME_BROWSER_UI_WEBUI_GESTURE_CONFIG_UI_H_ |
| OLD | NEW |